Changeset 1203 for trunk/MagicSoft/Mars/mgui/MCamDisplay.cc
- Timestamp:
- 01/21/02 20:52:12 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mgui/MCamDisplay.cc
r1082 r1203 11 11 12 12 #include "MHexagon.h" 13 14 #include "MGeomPix.h" 13 15 #include "MGeomCam.h" 14 16 … … 27 29 : fAutoScale(kTRUE), fMinPhe(-2), fMaxPhe(50), fW(0), fH(0), fDrawingPad(NULL) 28 30 { 31 fGeomCam = geom; // FIXME: Clone doesn't work! (MGeomCam*)geom->Clone(); 32 29 33 // 30 34 // create the hexagons of the display … … 80 84 delete fLegend; 81 85 delete fLegText; 82 } 83 84 inline void MCamDisplay::SetPixColor(const MCerPhotPix &pix) 85 { 86 (*this)[pix.GetPixId()].SetFillColor(GetColor(pix.GetNumPhotons())); 86 87 delete fGeomCam; 88 } 89 90 inline void MCamDisplay::SetPixColor(const MCerPhotPix &pix, const Int_t i) 91 { 92 // 93 // Fixme: Divide pnum by the (real) area of the pixel 94 // 95 96 const Float_t ratio = (*fGeomCam)[0].GetA()/(*fGeomCam)[i].GetA(); 97 const Float_t pnum = ratio*pix.GetNumPhotons(); 98 99 (*this)[pix.GetPixId()].SetFillColor(GetColor(pnum)); 87 100 } 88 101 … … 221 234 if (fAutoScale) 222 235 { 223 fMinPhe = event->GetNumPhotonsMin( );224 fMaxPhe = event->GetNumPhotonsMax( );236 fMinPhe = event->GetNumPhotonsMin(fGeomCam); 237 fMaxPhe = event->GetNumPhotonsMax(fGeomCam); 225 238 226 239 if (fMaxPhe < 20.) … … 242 255 continue; 243 256 244 SetPixColor(pix );257 SetPixColor(pix, i); 245 258 } 246 259
Note:
See TracChangeset
for help on using the changeset viewer.