Changeset 2229 for trunk/MagicSoft/Mars/mreflector
- Timestamp:
- 06/24/03 15:01:48 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mreflector
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mreflector/MRflEvtData.cc
r2224 r2229 38 38 ///////////////////////////////////////////////////////////////////////////// 39 39 #include "MRflEvtData.h" 40 41 #include <TMarker.h> 40 42 41 43 #include "MLog.h" … … 98 100 return; 99 101 100 fList.ExpandCreate Fast(fPos);102 fList.ExpandCreate(fPos); 101 103 } 102 104 … … 119 121 // sum the photons content in each pixel 120 122 // 121 const Int_t entries = GetNumPhotons();122 123 123 val = 0; 124 124 125 125 MHexagon hex(cam[idx]); 126 for (Int_t i=0; i<entries; i++)127 {128 const MRflSinglePhoton &ph = GetPhoton(i);129 126 130 if (hex.DistanceToPrimitive(ph.GetX(), ph.GetY())<=0) 127 MRflSinglePhoton *ph=NULL; 128 129 TIter Next(&fList); 130 while ((ph=(MRflSinglePhoton*)Next())) 131 if (hex.DistanceToPrimitive(ph->GetX(), ph->GetY())<=0) 131 132 val += cam.GetPixRatio(idx); 132 }133 133 134 134 return val>0; 135 135 } 136 137 // ------------------------------------------------------------------------ 138 // 139 // You can call Draw() to add the photons to the current pad. 140 // The photons are painted each tim ethe pad is updated. 141 // Make sure that you use the right (world) coordinate system, 142 // like created, eg. by the MHCamera histogram. 143 // 144 void MRflEvtData::Paint(Option_t *) 145 { 146 MRflSinglePhoton *ph=NULL; 147 148 TMarker m; 149 m.SetMarkerStyle(kFullDotMedium); // Gtypes.h 150 151 TIter Next(&fList); 152 while ((ph=(MRflSinglePhoton*)Next())) 153 { 154 m.SetX(ph->GetX()); 155 m.SetY(ph->GetY()); 156 m.Paint(); 157 } 158 } 159 -
trunk/MagicSoft/Mars/mreflector/MRflEvtData.h
r2208 r2229 30 30 31 31 void Print(Option_t *o="") const; 32 void Paint(Option_t *o=""); 32 33 33 34 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
Note:
See TracChangeset
for help on using the changeset viewer.