Changeset 9567
- Timestamp:
- 04/13/10 11:22:26 (15 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9565 r9567 18 18 19 19 -*-*- END OF LINE -*-*- 20 21 2010/04/13 Thomas Bretz 22 23 * msim/MHPhotonEvent.cc: 24 - automatic binning for case 3 25 - new case 5 26 27 * msim/MHPhotonEvent.h: 28 - this can be a huge memory consumption and we don't need double 29 precision (range) accordingly changed all TH*D to TH*F. 30 consequently increased class version number 31 32 20 33 21 34 2010/03/30 Thomas Bretz -
trunk/MagicSoft/Mars/msim/MHPhotonEvent.cc
r9367 r9567 38 38 // Type 1: 39 39 // The maximum in x and y is determined from MCorsikaRunHeader 40 // (not yet implemented. Fixed to 25000 )40 // (not yet implemented. Fixed to 25000, 100 bins) 41 41 // 42 42 // Type 2: 43 43 // The maximum in x and y is determined from MReflector->GetMaxR(); 44 // (100 bins) 44 45 // 45 46 // Type 3: 46 47 // The maximum in x and y is determined from MGeomCam->GetMaxR(); 48 // (roughly 10 bins per pixel) 47 49 // 48 50 // Type 4: 49 // As type 3 but divided by 10. 50 // 51 // The binning is optimized using MH::FindGoodLimits. The number of bins 52 // in 100 in the default case and 50 for type 3-4. 51 // Two times the traversal size of pixel #0 ( 4*MGeomCam[0].GetT() ) 52 // (101 bins, units cm) 53 // 54 // Type 5: 55 // As type 3 but in cm instead of mm 56 // 57 // The binning is optimized using MH::FindGoodLimits. 53 58 // 54 59 // Fill expects a MPhotonEvent (the second argumnet in MFillH). … … 59 64 // + TH1D fHistH; 60 65 // 66 // Class Version 3: 67 // ---------------- 68 // + replaced TH1D by TH1F 69 // + replaced TH2D by TH2F 61 70 // 62 71 ///////////////////////////////////////////////////////////////////////////// … … 173 182 174 183 MH::FindGoodLimits(num, num, min, max, kFALSE); 175 184 MH::FindGoodLimits(num, num, min, max, kFALSE); 176 185 MBinning binsd, binsa, binsz; 177 186 binsd.SetEdges(num, min, max); … … 213 222 break; 214 223 } 215 case 3: // The maximum radius 224 case 3: // The maximum radius (mm) 225 fHistXY.SetXTitle("X [mm]"); 226 fHistXY.SetYTitle("Y [mm]"); 227 fHistT.SetXTitle("X [mm]"); 228 fHistT.SetYTitle("Y [mm]"); 229 // *Fallthrough* 230 216 231 case 4: // Two times the pixel-0 traversal size 232 case 5: // The maximum radius (cm) 217 233 { 218 234 MGeomCam *c = (MGeomCam*)pList->FindObject("MGeomCam"); … … 222 238 return kFALSE; 223 239 } 224 xmax = fType==3 ? c->GetMaxRadius()/10 : 2*(*c)[0].GetT()/10; 225 num = 50; 240 // Type 3: Define ~10 bins per pixel 241 xmax = fType==3 ? c->GetMaxRadius() : 4*(*c)[0].GetT()/10; 242 num = fType==3 ? TMath::Nint(10*(2*c->GetMaxRadius())/(2*(*c)[0].GetT())) : 101; 243 244 if (fType==5) 245 xmax /= 10; 226 246 227 247 break; -
trunk/MagicSoft/Mars/msim/MHPhotonEvent.h
r9347 r9567 19 19 { 20 20 private: 21 TH2 DfHistXY;22 TH2 DfHistUV;21 TH2F fHistXY; 22 TH2F fHistUV; 23 23 TProfile2D fHistT; 24 TH1 DfHistWL;25 TH1 DfHistH;24 TH1F fHistWL; 25 TH1F fHistH; 26 26 27 27 Int_t fType; … … 60 60 } 61 61 62 ClassDef(MHPhotonEvent, 2) // Histogram to display the information of MPhotonEvents 62 const TH2F &GetHistXY() const { return fHistXY; } 63 const TProfile2D &GetHistT() const { return fHistT; } 64 65 ClassDef(MHPhotonEvent, 3) // Histogram to display the information of MPhotonEvents 63 66 }; 64 67
Note:
See TracChangeset
for help on using the changeset viewer.