Changeset 2421 for trunk/MagicSoft/Mars/mhist
- Timestamp:
- 10/22/03 20:59:40 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mhist
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHCamera.cc
r2416 r2421 818 818 // ------------------------------------------------------------------------ 819 819 // 820 // Fill the colors in respect to the cleaning levels 821 // 822 void MHCamera::FillLevels(const MCerPhotEvt &event, Float_t lvl1, Float_t lvl2) 820 // The array must be in increasing order, eg: 2.5, 3.7, 4.9 821 // The values in each bin are replaced by the interval in which the value 822 // fits. In the example we have four intervals 823 // (<2.5, 2.5-3.7, 3.7-4.9, >4.9). Maximum and minimum are set 824 // accordingly. 825 // 826 void MHCamera::SetLevels(const TArrayF &arr) 823 827 { 824 828 if (fNcells<=1) 825 829 return; 826 827 SetCamContent(event, 2);828 830 829 831 for (Int_t i=0; i<fNcells-2; i++) … … 832 834 continue; 833 835 834 if (fArray[i+1]>lvl1) 835 fArray[i+1] = 0; 836 else 837 if (fArray[i+1]>lvl2) 838 fArray[i+1] = 1; 839 else 840 fArray[i+1] = 2; 841 } 842 } 843 844 // ------------------------------------------------------------------------ 845 // 846 // Fill the colors in respect to the cleaning levels 847 // 848 void MHCamera::FillLevels(const MCerPhotEvt &event, const MImgCleanStd &clean) 849 { 850 FillLevels(event, clean.GetCleanLvl1(), clean.GetCleanLvl2()); 836 Int_t j = arr.GetSize(); 837 while (j && fArray[i+1]<arr[j-1]) 838 j--; 839 840 fArray[i+1] = j; 841 } 842 SetMaximum(arr.GetSize()); 843 SetMinimum(0); 851 844 } 852 845 -
trunk/MagicSoft/Mars/mhist/MHCamera.h
r2409 r2421 138 138 Double_t GetMaximum() const { return GetMaximum(0/*kTRUE*/); } 139 139 140 void FillLevels(const MCerPhotEvt &event, Float_t lvl1, Float_t lvl2); 141 void FillLevels(const MCerPhotEvt &event, const MImgCleanStd &clean); 140 void SetLevels(const TArrayF &arr); 142 141 143 142 void FillRandom(const char *fname, Int_t ntimes=5000) { TH1::FillRandom(fname, ntimes); } … … 152 151 void Reset() { Reset(""); } // *MENU* 153 152 TH1 *DrawCopy() const/* { gPad=NULL; return TH1D::DrawCopy(); }*/; // *MENU* 153 TH1 *DrawCopy(Option_t *o) const { return TH1D::DrawCopy(o); } 154 154 155 155 void Print(Option_t *) const; -
trunk/MagicSoft/Mars/mhist/MHMatrix.cc
r2419 r2421 126 126 // 127 127 Bool_t MHMatrix::SetNumRow(Int_t row) 128 { 129 if (row>=fM.GetNrows() || row<0) return kFALSE; 130 fRow = row; 131 return kTRUE; 132 } 133 128 { 129 if (row>=fM.GetNrows() || row<0) return kFALSE; 130 fRow = row; 131 return kTRUE; 132 } 134 133 135 134 // -------------------------------------------------------------------------- … … 1191 1190 return kTRUE; 1192 1191 } 1193
Note:
See TracChangeset
for help on using the changeset viewer.