Changeset 9338 for trunk


Ignore:
Timestamp:
02/15/09 15:09:12 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mfilter/MFMagicCuts.cc

    r8890 r9338  
    188188Int_t MFMagicCuts::PreProcess(MParList *pList)
    189189{
    190     MGeomCam *cam = (MGeomCam*)pList->FindObject("MGeomCam");
    191     if (!cam)
     190    fGeom = (MGeomCam*)pList->FindObject("MGeomCam");
     191    if (!fGeom)
    192192    {
    193193        *fLog << err << "MGeomCam not found... aborting." << endl;
    194194        return kFALSE;
    195195    }
    196 
    197     // Geometry in SPONDE?
    198 
    199     fMm2Deg = cam->GetConvMm2Deg();
    200196
    201197    fThetaSq = (MParameterD*)pList->FindCreateObj("MParameterD", "ThetaSquared");
     
    425421    // For simplicity
    426422    const Double_t *c = fVariables.GetArray();
     423
     424    const Float_t fMm2Deg = fGeom->GetConvMm2Deg();
    427425
    428426    // Default if we return before the end
  • trunk/MagicSoft/Mars/mfilter/MFMagicCuts.h

    r8890 r9338  
    1212class MParList;
    1313
     14class MGeomCam;
    1415class MHillas;
    1516class MHillasSrc;
     
    4950    };
    5051
     52    MGeomCam       *fGeom;              //! Conversion factor from mm to deg
    5153    MHillas        *fHil;               //! Pointer to MHillas container
    5254    MHillasSrc     *fHilSrc;            //! Pointer to MHillasSrc container
     
    5961    MParameterD    *fHadronness;        //! Pointer to MParameterD container called Hadronness
    6062
    61     Float_t         fMm2Deg;            //! Conversion factor from mm to deg, from MGeomCam
    6263    Bool_t          fResult;            //! Result of the filter evaluation
    6364
  • trunk/MagicSoft/Mars/mmuon/MHMuonPar.cc

    r9303 r9338  
    138138Bool_t MHMuonPar::SetupFill(const MParList *plist)
    139139{
    140     MGeomCam *geom = (MGeomCam*)plist->FindObject("MGeomCam");
    141     if (!geom)
     140    fGeom = (MGeomCam*)plist->FindObject("MGeomCam");
     141    if (!fGeom)
    142142    {
    143143        *fLog << warn << "MGeomCam not found... abort." << endl;
    144144        return kFALSE;
    145145    }
    146     fMm2Deg = geom->GetConvMm2Deg();
    147146
    148147    fMuonSearchPar = (MMuonSearchPar*)plist->FindObject("MMuonSearchPar");
     
    174173Int_t MHMuonPar::Fill(const MParContainer *par, const Stat_t w)
    175174{
     175    const Double_t fMm2Deg = fGeom->GetConvMm2Deg();
     176
    176177    fHistRadius.Fill(fMm2Deg*fMuonSearchPar->GetRadius(), w);
    177178
  • trunk/MagicSoft/Mars/mpointing/MHSrcPosCam.cc

    r9153 r9338  
    5858//
    5959MHSrcPosCam::MHSrcPosCam(Bool_t wobble, const char *name, const char *title)
    60     : fTimeEffOn(NULL), fEffOnTime(NULL), fSourcePos(NULL),
     60    : fTimeEffOn(NULL), fEffOnTime(NULL), fSourcePos(NULL), fGeom(NULL),
    6161    fPositions("TVector2", 50000)
    6262{
     
    8989Bool_t MHSrcPosCam::SetupFill(const MParList *pl)
    9090{
    91     MGeomCam *geom = (MGeomCam*)pl->FindObject("MGeomCam");
    92     if (!geom)
     91    fGeom = (MGeomCam*)pl->FindObject("MGeomCam");
     92    if (!fGeom)
    9393    {
    9494        *fLog << err << "ERROR - MGeomCam not found... aborting." << endl;
     
    121121
    122122    fHist.Reset();
    123     fConvMm2Deg = geom->GetConvMm2Deg();
    124     fNum        = 0;
     123    fNum = 0;
    125124
    126125    return kTRUE;
     
    146145    if (!fEffOnTime)
    147146    {
    148         const TVector2 v(cam->GetXY()*fConvMm2Deg);
     147        const TVector2 v(cam->GetXY()*fGeom->GetConvMm2Deg());
    149148        fHist.Fill(v.X(), v.Y(), w);
    150149        return kTRUE;
     
    157156    // buffer position into array (could be speed up a little bit more
    158157    // by using ExpandCreate and memcpy)
    159     new (fPositions[fNum++]) TVector2(cam->GetXY()*fConvMm2Deg);
     158    new (fPositions[fNum++]) TVector2(cam->GetXY()*fGeom->GetConvMm2Deg());
    160159
    161160    // Check if there is a new effective on time
  • trunk/MagicSoft/Mars/mpointing/MHSrcPosCam.h

    r9153 r9338  
    1818#endif
    1919
     20class MGeomCam;
    2021class MParList;
    2122class MParameterD;
     
    3132    MParameterD  *fEffOnTime;      //! Effective on time
    3233    MPointingPos *fSourcePos;      //! Pointing position of the telescope
     34    MGeomCam     *fGeom;           //! Conversion from mm to deg
    3335
    34     Double_t      fConvMm2Deg;     //! Conversion factor from mm to deg
    3536    TClonesArray  fPositions;      //! Buffer to store source positions
    3637    Int_t         fNum;            //! Position in array
  • 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}
  • trunk/MagicSoft/Mars/mpointing/MSrcPosRndm.h

    r8802 r9338  
    66#endif
    77
     8class MGeomCam;
    89class MSrcPosCam;
    910class MHSrcPosCam;
     
    1516    MSrcPosCam   *fSrcPosAnti; //!
    1617    MHSrcPosCam  *fHist;       //!
    17 
    18     Double_t fConvMm2Deg;
     18    MGeomCam     *fGeom;       //! Conversion factor from mm to deg
    1919
    2020    Double_t fDistOfSource; // [deg] Distance of the source from the camera center
     
    2424
    2525public:
    26     MSrcPosRndm() : fSrcPos(0), fHist(0), fDistOfSource(-1)
     26    MSrcPosRndm() : fSrcPos(0), fSrcPosAnti(0), fHist(0), fGeom(0), fDistOfSource(-1)
    2727    {
    2828        fName  = "MSrcPosRndm";
Note: See TracChangeset for help on using the changeset viewer.