Changeset 9338
- Timestamp:
- 02/15/09 15:09:12 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mfilter/MFMagicCuts.cc
r8890 r9338 188 188 Int_t MFMagicCuts::PreProcess(MParList *pList) 189 189 { 190 MGeomCam *cam = (MGeomCam*)pList->FindObject("MGeomCam");191 if (! cam)190 fGeom = (MGeomCam*)pList->FindObject("MGeomCam"); 191 if (!fGeom) 192 192 { 193 193 *fLog << err << "MGeomCam not found... aborting." << endl; 194 194 return kFALSE; 195 195 } 196 197 // Geometry in SPONDE?198 199 fMm2Deg = cam->GetConvMm2Deg();200 196 201 197 fThetaSq = (MParameterD*)pList->FindCreateObj("MParameterD", "ThetaSquared"); … … 425 421 // For simplicity 426 422 const Double_t *c = fVariables.GetArray(); 423 424 const Float_t fMm2Deg = fGeom->GetConvMm2Deg(); 427 425 428 426 // Default if we return before the end -
trunk/MagicSoft/Mars/mfilter/MFMagicCuts.h
r8890 r9338 12 12 class MParList; 13 13 14 class MGeomCam; 14 15 class MHillas; 15 16 class MHillasSrc; … … 49 50 }; 50 51 52 MGeomCam *fGeom; //! Conversion factor from mm to deg 51 53 MHillas *fHil; //! Pointer to MHillas container 52 54 MHillasSrc *fHilSrc; //! Pointer to MHillasSrc container … … 59 61 MParameterD *fHadronness; //! Pointer to MParameterD container called Hadronness 60 62 61 Float_t fMm2Deg; //! Conversion factor from mm to deg, from MGeomCam62 63 Bool_t fResult; //! Result of the filter evaluation 63 64 -
trunk/MagicSoft/Mars/mmuon/MHMuonPar.cc
r9303 r9338 138 138 Bool_t MHMuonPar::SetupFill(const MParList *plist) 139 139 { 140 MGeomCam *geom = (MGeomCam*)plist->FindObject("MGeomCam");141 if (! geom)140 fGeom = (MGeomCam*)plist->FindObject("MGeomCam"); 141 if (!fGeom) 142 142 { 143 143 *fLog << warn << "MGeomCam not found... abort." << endl; 144 144 return kFALSE; 145 145 } 146 fMm2Deg = geom->GetConvMm2Deg();147 146 148 147 fMuonSearchPar = (MMuonSearchPar*)plist->FindObject("MMuonSearchPar"); … … 174 173 Int_t MHMuonPar::Fill(const MParContainer *par, const Stat_t w) 175 174 { 175 const Double_t fMm2Deg = fGeom->GetConvMm2Deg(); 176 176 177 fHistRadius.Fill(fMm2Deg*fMuonSearchPar->GetRadius(), w); 177 178 -
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.