Changeset 9338 for trunk/MagicSoft/Mars/mpointing
- Timestamp:
- 02/15/09 15:09:12 (16 years ago)
- Location:
- trunk/MagicSoft/Mars/mpointing
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mpointing/MHSrcPosCam.cc
r9153 r9338 58 58 // 59 59 MHSrcPosCam::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), 61 61 fPositions("TVector2", 50000) 62 62 { … … 89 89 Bool_t MHSrcPosCam::SetupFill(const MParList *pl) 90 90 { 91 MGeomCam *geom = (MGeomCam*)pl->FindObject("MGeomCam");92 if (! geom)91 fGeom = (MGeomCam*)pl->FindObject("MGeomCam"); 92 if (!fGeom) 93 93 { 94 94 *fLog << err << "ERROR - MGeomCam not found... aborting." << endl; … … 121 121 122 122 fHist.Reset(); 123 fConvMm2Deg = geom->GetConvMm2Deg(); 124 fNum = 0; 123 fNum = 0; 125 124 126 125 return kTRUE; … … 146 145 if (!fEffOnTime) 147 146 { 148 const TVector2 v(cam->GetXY()*f ConvMm2Deg);147 const TVector2 v(cam->GetXY()*fGeom->GetConvMm2Deg()); 149 148 fHist.Fill(v.X(), v.Y(), w); 150 149 return kTRUE; … … 157 156 // buffer position into array (could be speed up a little bit more 158 157 // by using ExpandCreate and memcpy) 159 new (fPositions[fNum++]) TVector2(cam->GetXY()*f ConvMm2Deg);158 new (fPositions[fNum++]) TVector2(cam->GetXY()*fGeom->GetConvMm2Deg()); 160 159 161 160 // Check if there is a new effective on time -
trunk/MagicSoft/Mars/mpointing/MHSrcPosCam.h
r9153 r9338 18 18 #endif 19 19 20 class MGeomCam; 20 21 class MParList; 21 22 class MParameterD; … … 31 32 MParameterD *fEffOnTime; //! Effective on time 32 33 MPointingPos *fSourcePos; //! Pointing position of the telescope 34 MGeomCam *fGeom; //! Conversion from mm to deg 33 35 34 Double_t fConvMm2Deg; //! Conversion factor from mm to deg35 36 TClonesArray fPositions; //! Buffer to store source positions 36 37 Int_t fNum; //! Position in array -
trunk/MagicSoft/Mars/mpointing/MSrcPosRndm.cc
r8802 r9338 57 57 Int_t MSrcPosRndm::PreProcess(MParList *plist) 58 58 { 59 MGeomCam *geom = (MGeomCam*)plist->FindObject("MGeomCam");60 if (! geom)59 fGeom = (MGeomCam*)plist->FindObject("MGeomCam"); 60 if (!fGeom) 61 61 { 62 62 *fLog << err << "ERROR - MGeomCam not found... aborting." << endl; … … 86 86 *fLog << inf << "Source position will be produced randomly in a distance of " << fDistOfSource << "° from the camera center!" << endl; 87 87 88 fConvMm2Deg = geom->GetConvMm2Deg();89 90 88 return kTRUE; 91 89 } … … 107 105 } 108 106 109 fSrcPos->SetXY(x/fConvMm2Deg, y/fConvMm2Deg); 107 const Double_t f = fGeom->GetConvMm2Deg(); 108 109 fSrcPos->SetXY(x/f, y/f); 110 110 if (fDistOfSource>=0) 111 fSrcPosAnti->SetXY(-x/f ConvMm2Deg, -y/fConvMm2Deg);111 fSrcPosAnti->SetXY(-x/f, -y/f); 112 112 return kTRUE; 113 113 } -
trunk/MagicSoft/Mars/mpointing/MSrcPosRndm.h
r8802 r9338 6 6 #endif 7 7 8 class MGeomCam; 8 9 class MSrcPosCam; 9 10 class MHSrcPosCam; … … 15 16 MSrcPosCam *fSrcPosAnti; //! 16 17 MHSrcPosCam *fHist; //! 17 18 Double_t fConvMm2Deg; 18 MGeomCam *fGeom; //! Conversion factor from mm to deg 19 19 20 20 Double_t fDistOfSource; // [deg] Distance of the source from the camera center … … 24 24 25 25 public: 26 MSrcPosRndm() : fSrcPos(0), f Hist(0), fDistOfSource(-1)26 MSrcPosRndm() : fSrcPos(0), fSrcPosAnti(0), fHist(0), fGeom(0), fDistOfSource(-1) 27 27 { 28 28 fName = "MSrcPosRndm";
Note:
See TracChangeset
for help on using the changeset viewer.