Changeset 2208 for trunk/MagicSoft/Mars/mreflector
- Timestamp:
- 06/23/03 11:48:53 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/mreflector
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mreflector/MRflEvtData.cc
r2173 r2208 42 42 #include "MLogManip.h" 43 43 44 #include "MHexagon.h" 45 #include "MGeomCam.h" 46 47 #include "MRflSinglePhoton.h" 48 44 49 ClassImp(MRflEvtData); 45 50 … … 55 60 fName = name ? name : "MRflEvtData"; 56 61 fTitle = title ? title : "All Photons from a reflector event"; 62 } 63 64 const MRflSinglePhoton &MRflEvtData::GetPhoton(Int_t i) const 65 { 66 return *static_cast<MRflSinglePhoton*>(fList.UncheckedAt(i)); 57 67 } 58 68 … … 91 101 } 92 102 103 void MRflEvtData::DrawPixelContent(Int_t num) const 104 { 105 } 106 107 // ------------------------------------------------------------------------ 108 // 109 // Fill a reflector event. Sums all pixels in each pixel as the 110 // pixel contents. 111 // 112 // WARNING: Due to the estimation in DistanceToPrimitive and the 113 // calculation in pixels instead of x, y this is only a 114 // rough estimate. 115 // 116 Bool_t MRflEvtData::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const 117 { 118 // 119 // sum the photons content in each pixel 120 // 121 const Int_t entries = GetNumPhotons(); 122 123 val = 0; 124 125 for (Int_t i=0; i<entries; i++) 126 { 127 const MRflSinglePhoton &ph = GetPhoton(i); 128 129 UInt_t idx; 130 for (idx=0; idx<cam.GetNumPixels(); idx++) 131 { 132 MHexagon hex(cam[idx]); 133 if (hex.DistanceToPrimitive(ph.GetX(), ph.GetY())<0) 134 break; 135 } 136 if (idx==cam.GetNumPixels()) 137 continue; 138 139 val += cam.GetPixRatio(idx); 140 } 141 142 return val>0; 143 } -
trunk/MagicSoft/Mars/mreflector/MRflEvtData.h
r2135 r2208 2 2 #define MARS_MRflEvtData 3 3 4 #ifndef MARS_M RflSinglePhoton5 #include "M RflSinglePhoton.h"4 #ifndef MARS_MCamEvent 5 #include "MCamEvent.h" 6 6 #endif 7 7 … … 10 10 #endif 11 11 12 class MRflEvtData : public MParContainer 12 class MRflSinglePhoton; 13 14 class MRflEvtData : public MCamEvent 13 15 { 14 16 TClonesArray fList; … … 25 27 void FixSize(); 26 28 27 const MRflSinglePhoton &GetPhoton(Int_t i) const { return (MRflSinglePhoton&)*fList.UncheckedAt(i); }29 const MRflSinglePhoton &GetPhoton(Int_t i) const; 28 30 29 31 void Print(Option_t *o="") const; 32 33 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const; 34 void DrawPixelContent(Int_t num) const; 30 35 31 36 ClassDef(MRflEvtData, 0) // All Photons of a event from the reflector program -
trunk/MagicSoft/Mars/mreflector/Makefile
r2142 r2208 22 22 # connect the include files defined in the config.mk file 23 23 # 24 INCLUDES = -I. -I../mbase 24 INCLUDES = -I. -I../mbase -I../mgui -I../mgeom 25 25 26 26 #------------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.