Ignore:
Timestamp:
02/15/09 15:09:12 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mpointing/MSrcPosRndm.cc

    r8802 r9338  
    5757Int_t MSrcPosRndm::PreProcess(MParList *plist)
    5858{
    59     MGeomCam *geom = (MGeomCam*)plist->FindObject("MGeomCam");
    60     if (!geom)
     59    fGeom = (MGeomCam*)plist->FindObject("MGeomCam");
     60    if (!fGeom)
    6161    {
    6262        *fLog << err << "ERROR - MGeomCam not found... aborting." << endl;
     
    8686        *fLog << inf << "Source position will be produced randomly in a distance of " << fDistOfSource << "° from the camera center!" << endl;
    8787
    88     fConvMm2Deg = geom->GetConvMm2Deg();
    89 
    9088    return kTRUE;
    9189}
     
    107105    }
    108106
    109     fSrcPos->SetXY(x/fConvMm2Deg, y/fConvMm2Deg);
     107    const Double_t f = fGeom->GetConvMm2Deg();
     108
     109    fSrcPos->SetXY(x/f, y/f);
    110110    if (fDistOfSource>=0)
    111         fSrcPosAnti->SetXY(-x/fConvMm2Deg, -y/fConvMm2Deg);
     111        fSrcPosAnti->SetXY(-x/f, -y/f);
    112112    return kTRUE;
    113113}
Note: See TracChangeset for help on using the changeset viewer.