Changeset 2147 for trunk/MagicSoft/Mars
- Timestamp:
- 06/02/03 09:51:18 (22 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2145 r2147 1 1 -*-*- END OF LINE -*-*- 2 2003/06/02: Thomas Bretz 3 4 * manalysis/AnalysisLinkDef.h, manalysis/Makefile: 5 - added MCurrents 6 7 * manalysis/MCerPhotEvt.[h,cc]: 8 - added MGeomCam argument to GetRatioMin/Max 9 10 * mfileio/FileIOLinkDef.h, mfileio/Makefile: 11 - added MReadCurrents 12 13 * mfileio/MReadCurrents.[h,cc]: 14 - added 15 16 * manalysis/MCurrents.[h,cc]: 17 - added 18 19 * mgui/MCamDisplay.[h,cc]: 20 - added current support 21 22 23 2 24 2003/05/30: Wolfgang Wittek 3 25 -
trunk/MagicSoft/Mars/manalysis/AnalysisLinkDef.h
r2124 r2147 12 12 #pragma link C++ class MBlindPixels+; 13 13 #pragma link C++ class MBlindPixelCalc+; 14 15 #pragma link C++ class MCurrents+; 14 16 15 17 #pragma link C++ class MPedestalPix+; -
trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc
r2139 r2147 236 236 // get the minimum ratio of photons/error 237 237 // 238 Float_t MCerPhotEvt::GetRatioMin( ) const238 Float_t MCerPhotEvt::GetRatioMin(const MGeomCam *geom) const 239 239 { 240 240 if (fNumPixels <= 0) … … 250 250 251 251 Float_t testval = pix.GetNumPhotons()/pix.GetErrorPhot(); 252 if (geom) 253 testval *= TMath::Sqrt(geom->GetPixRatio(pix.GetPixId())); 254 252 255 if (testval < minval) 253 256 minval = testval; … … 261 264 // get the maximum ratio of photons/error 262 265 // 263 Float_t MCerPhotEvt::GetRatioMax( ) const266 Float_t MCerPhotEvt::GetRatioMax(const MGeomCam *geom) const 264 267 { 265 268 if (fNumPixels <= 0) … … 275 278 276 279 Float_t testval = pix.GetNumPhotons()/pix.GetErrorPhot(); 280 if (geom) 281 testval *= TMath::Sqrt(geom->GetPixRatio(pix.GetPixId())); 282 277 283 if (testval > maxval) 278 284 maxval = testval; -
trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h
r2135 r2147 41 41 Float_t GetNumPhotonsMax(const MGeomCam *geom=NULL) const; 42 42 43 Float_t GetRatioMin( ) const;44 Float_t GetRatioMax( ) const;43 Float_t GetRatioMin(const MGeomCam *geom=NULL) const; 44 Float_t GetRatioMax(const MGeomCam *geom=NULL) const; 45 45 46 46 Float_t GetErrorPhotMin(const MGeomCam *geom=NULL) const; -
trunk/MagicSoft/Mars/manalysis/Makefile
r2124 r2147 33 33 MMcPedestalCopy.cc \ 34 34 MMcPedestalNSBAdd.cc \ 35 MCurrents.cc \ 35 36 MEnergyEst.cc \ 36 37 MEnergyEstimate.cc \ -
trunk/MagicSoft/Mars/mfileio/FileIOLinkDef.h
r2134 r2147 9 9 #pragma link C++ class MReadTree+; 10 10 #pragma link C++ class MReadMarsFile+; 11 #pragma link C++ class MReadCurrents+; 11 12 #pragma link C++ class MReadRflFile+; 12 13 -
trunk/MagicSoft/Mars/mfileio/Makefile
r2134 r2147 35 35 MChain.cc \ 36 36 MReadTree.cc \ 37 MReadCurrents.cc \ 37 38 MReadMarsFile.cc \ 38 39 MReadRflFile.cc \ -
trunk/MagicSoft/Mars/mgui/MCamDisplay.cc
r2135 r2147 59 59 #include "MPedestalCam.h" 60 60 61 #include "MCurrents.h" 62 61 63 #include "MImgCleanStd.h" 62 64 … … 249 251 // Fixme: Use absolute value per mm^2. Needs another scaling algorithm. 250 252 // 251 const Float_t pnum = pix.GetNumPhotons()/pix.GetErrorPhot(); 252 (*this)[pix.GetPixId()].SetFillColor(GetColor(pnum, min, max)); 253 // *OLD* const Float_t r = pix.GetNumPhotons()/pix.GetErrorPhot(); 254 // if (entry * ratio <= fCleanLvl1 * noise) 255 256 const Float_t entry = pix.GetNumPhotons(); 257 const Float_t noise = pix.GetErrorPhot(); 258 const Double_t ratio = TMath::Sqrt(fGeomCam->GetPixRatio(pix.GetPixId())); 259 260 const Float_t r = entry*ratio/noise; 261 //const Float_t pnum = pix.GetNumPhotons()/pix.GetErrorPhot(); 262 263 (*this)[pix.GetPixId()].SetFillColor(GetColor(r, min, max)); 253 264 } 254 265 … … 259 270 MHexagon &hex = (*this)[pix.GetPixId()]; 260 271 261 const Float_t r = pix.GetNumPhotons()/pix.GetErrorPhot(); 272 // *OLD* const Float_t r = pix.GetNumPhotons()/pix.GetErrorPhot(); 273 // if (entry * ratio <= fCleanLvl1 * noise) 274 275 const Float_t entry = pix.GetNumPhotons(); 276 const Float_t noise = pix.GetErrorPhot(); 277 const Double_t ratio = TMath::Sqrt(fGeomCam->GetPixRatio(pix.GetPixId())); 278 279 const Float_t r = entry*ratio/noise; 262 280 263 281 if (r>lvl1) … … 618 636 if (fAutoScale) 619 637 { 620 min = event.GetRatioMin( );621 max = event.GetRatioMax( );638 min = event.GetRatioMin(fGeomCam); 639 max = event.GetRatioMax(fGeomCam); 622 640 623 641 UpdateLegend(min, max); … … 637 655 638 656 SetPixColorRatio(pix, min, max); 657 } 658 } 659 660 // ------------------------------------------------------------------------ 661 // 662 // Call this function to fill the currents 663 // 664 void MCamDisplay::FillCurrents(const MCurrents &event) 665 { 666 // 667 // Reset pixel colors to default value 668 // 669 Reset(); 670 671 // 672 // if the autoscale is true, set the values for the range for 673 // each event 674 // 675 Float_t min = 0; 676 Float_t max = 20; 677 if (fAutoScale) 678 { 679 min = event.GetMin(); 680 max = event.GetMax(); 681 682 UpdateLegend(min, max); 683 } 684 685 // 686 // update the colors in the picture 687 // 688 // FIXME: Security check missing! 689 for (UInt_t i=0; i<fNumPixels; i++) 690 { 691 //const Float_t pnum = pix.GetNumPhotons()/pix.GetErrorPhot(); 692 (*this)[i].SetFillColor(GetColor(event[i], min, max)); 639 693 } 640 694 } -
trunk/MagicSoft/Mars/mgui/MCamDisplay.h
r2135 r2147 19 19 class MHexagon; 20 20 class MRflEvtData; 21 class MCurrents; 21 22 class MCerPhotEvt; 22 23 class MCerPhotPix; … … 80 81 void FillPedestals(const MPedestalCam &event); 81 82 void FillRflEvent(const MRflEvtData &event); 83 void FillCurrents(const MCurrents &event); 82 84 void ShowRflEvent(const MRflEvtData *event=NULL, EMarkerStyle m=kFullDotMedium); 83 85
Note:
See TracChangeset
for help on using the changeset viewer.