Changeset 4901 for trunk/MagicSoft
- Timestamp:
- 09/09/04 17:28:11 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r4900 r4901 53 53 occurrance of multiple intensities and the new *Intensity* 54 54 containers 55 56 * mcalib/MHCalibrationChargePix.[h,cc] 57 * mcalib/MHCalibrationRelTimePix.[h,cc] 58 * mcalib/MHCalibrationTestPix.[h,cc] 59 * mcalib/MHCalibrationTestTimePix.[h,cc] 60 - derive from MHCalibrationPix 61 - new functions Reset() 55 62 56 63 * msignal/MExtractor.cc -
trunk/MagicSoft/Mars/mcalib/MHCalibrationCam.cc
r4882 r4901 39 39 // GetAverageLoGainArea(), GetAverageHiGainSector() and GetAverageLoGainSector() 40 40 // have to be cast to the corresponding class. It is assumed that all classes 41 // dealing with calibration pixels derive from MH GausEvents.41 // dealing with calibration pixels derive from MHCalibrationPix. 42 42 // 43 43 // The following flag can be set: … … 63 63 #include "MCalibrationCam.h" 64 64 65 #include "MH GausEvents.h"65 #include "MHCalibrationPix.h" 66 66 67 67 #include "MBadPixelsPix.h" … … 99 99 MHCalibrationCam::MHCalibrationCam(const char *name, const char *title) 100 100 : fColor(MCalibrationCam::kNONE), 101 fBadPixels(NULL), f Cam(NULL), fGeom(NULL), fRunHeader(NULL),101 fBadPixels(NULL), fIntensCam(NULL), fCam(NULL), fGeom(NULL), fRunHeader(NULL), 102 102 fDebug(kFALSE), fLoGain(kFALSE) 103 103 { … … 151 151 } 152 152 153 void MHCalibrationCam::ResetHists() 154 { 155 156 if (fHiGainArray) 157 { fHiGainArray->ForEach(MHCalibrationPix,Reset)(); } 158 if (fLoGainArray) 159 { fLoGainArray->ForEach(MHCalibrationPix,Reset)(); } 160 161 if (fAverageHiGainAreas) 162 { fAverageHiGainAreas->ForEach(MHCalibrationPix,Reset)(); } 163 if (fAverageLoGainAreas) 164 { fAverageLoGainAreas->ForEach(MHCalibrationPix,Reset)(); } 165 if (fAverageHiGainSectors) 166 { fAverageHiGainSectors->ForEach(MHCalibrationPix,Reset)(); } 167 if (fAverageLoGainSectors) 168 { fAverageLoGainSectors->ForEach(MHCalibrationPix,Reset)(); } 169 170 } 171 172 173 153 174 // -------------------------------------------------------------------------- 154 175 // 155 176 // Get i-th High Gain pixel (pixel number) 156 177 // 157 MH GausEvents&MHCalibrationCam::operator[](UInt_t i)158 { 159 return *static_cast<MH GausEvents*>(fHiGainArray->UncheckedAt(i));178 MHCalibrationPix &MHCalibrationCam::operator[](UInt_t i) 179 { 180 return *static_cast<MHCalibrationPix*>(fHiGainArray->UncheckedAt(i)); 160 181 } 161 182 … … 164 185 // Get i-th High Gain pixel (pixel number) 165 186 // 166 const MH GausEvents&MHCalibrationCam::operator[](UInt_t i) const167 { 168 return *static_cast<MH GausEvents*>(fHiGainArray->UncheckedAt(i));187 const MHCalibrationPix &MHCalibrationCam::operator[](UInt_t i) const 188 { 189 return *static_cast<MHCalibrationPix*>(fHiGainArray->UncheckedAt(i)); 169 190 } 170 191 … … 173 194 // Get i-th Low Gain pixel (pixel number) 174 195 // 175 MH GausEvents&MHCalibrationCam::operator()(UInt_t i)176 { 177 return *static_cast<MH GausEvents*>(fLoGainArray->UncheckedAt(i));196 MHCalibrationPix &MHCalibrationCam::operator()(UInt_t i) 197 { 198 return *static_cast<MHCalibrationPix*>(fLoGainArray->UncheckedAt(i)); 178 199 } 179 200 … … 182 203 // Get i-th Low Gain pixel (pixel number) 183 204 // 184 const MH GausEvents&MHCalibrationCam::operator()(UInt_t i) const185 { 186 return *static_cast<MH GausEvents*>(fLoGainArray->UncheckedAt(i));205 const MHCalibrationPix &MHCalibrationCam::operator()(UInt_t i) const 206 { 207 return *static_cast<MHCalibrationPix*>(fLoGainArray->UncheckedAt(i)); 187 208 } 188 209 … … 190 211 // 191 212 // Returns the current size of the TObjArray fAverageHiGainAreas 192 // independently if the MH GausEventsis filled with values or not.213 // independently if the MHCalibrationPix is filled with values or not. 193 214 // 194 215 const Int_t MHCalibrationCam::GetAverageAreas() const … … 201 222 // Get i-th High Gain pixel Area (area number) 202 223 // 203 MH GausEvents&MHCalibrationCam::GetAverageHiGainArea(UInt_t i)204 { 205 return *static_cast<MH GausEvents*>(fAverageHiGainAreas->UncheckedAt(i));224 MHCalibrationPix &MHCalibrationCam::GetAverageHiGainArea(UInt_t i) 225 { 226 return *static_cast<MHCalibrationPix*>(fAverageHiGainAreas->UncheckedAt(i)); 206 227 } 207 228 … … 210 231 // Get i-th High Gain pixel Area (area number) 211 232 // 212 const MH GausEvents&MHCalibrationCam::GetAverageHiGainArea(UInt_t i) const213 { 214 return *static_cast<MH GausEvents*>(fAverageHiGainAreas->UncheckedAt(i));233 const MHCalibrationPix &MHCalibrationCam::GetAverageHiGainArea(UInt_t i) const 234 { 235 return *static_cast<MHCalibrationPix *>(fAverageHiGainAreas->UncheckedAt(i)); 215 236 } 216 237 … … 219 240 // Get i-th Low Gain pixel Area (area number) 220 241 // 221 MH GausEvents&MHCalibrationCam::GetAverageLoGainArea(UInt_t i)222 { 223 return *static_cast<MH GausEvents*>(fAverageLoGainAreas->UncheckedAt(i));242 MHCalibrationPix &MHCalibrationCam::GetAverageLoGainArea(UInt_t i) 243 { 244 return *static_cast<MHCalibrationPix*>(fAverageLoGainAreas->UncheckedAt(i)); 224 245 } 225 246 … … 228 249 // Get i-th Low Gain pixel Area (area number) 229 250 // 230 const MH GausEvents&MHCalibrationCam::GetAverageLoGainArea(UInt_t i) const231 { 232 return *static_cast<MH GausEvents*>(fAverageLoGainAreas->UncheckedAt(i));251 const MHCalibrationPix &MHCalibrationCam::GetAverageLoGainArea(UInt_t i) const 252 { 253 return *static_cast<MHCalibrationPix*>(fAverageLoGainAreas->UncheckedAt(i)); 233 254 } 234 255 … … 236 257 // 237 258 // Returns the current size of the TObjArray fAverageHiGainSectors 238 // independently if the MH GausEventsis filled with values or not.259 // independently if the MHCalibrationPix is filled with values or not. 239 260 // 240 261 const Int_t MHCalibrationCam::GetAverageSectors() const … … 247 268 // Get i-th High Gain Sector (sector number) 248 269 // 249 MH GausEvents&MHCalibrationCam::GetAverageHiGainSector(UInt_t i)250 { 251 return *static_cast<MH GausEvents*>(fAverageHiGainSectors->UncheckedAt(i));270 MHCalibrationPix &MHCalibrationCam::GetAverageHiGainSector(UInt_t i) 271 { 272 return *static_cast<MHCalibrationPix*>(fAverageHiGainSectors->UncheckedAt(i)); 252 273 } 253 274 … … 256 277 // Get i-th High Gain Sector (sector number) 257 278 // 258 const MH GausEvents&MHCalibrationCam::GetAverageHiGainSector(UInt_t i) const259 { 260 return *static_cast<MH GausEvents*>(fAverageHiGainSectors->UncheckedAt(i));279 const MHCalibrationPix &MHCalibrationCam::GetAverageHiGainSector(UInt_t i) const 280 { 281 return *static_cast<MHCalibrationPix*>(fAverageHiGainSectors->UncheckedAt(i)); 261 282 } 262 283 … … 265 286 // Get i-th Low Gain Sector (sector number) 266 287 // 267 MH GausEvents&MHCalibrationCam::GetAverageLoGainSector(UInt_t i)268 { 269 return *static_cast<MH GausEvents*>(fAverageLoGainSectors->UncheckedAt(i));288 MHCalibrationPix &MHCalibrationCam::GetAverageLoGainSector(UInt_t i) 289 { 290 return *static_cast<MHCalibrationPix*>(fAverageLoGainSectors->UncheckedAt(i)); 270 291 } 271 292 … … 274 295 // Get i-th Low Gain Sector (sector number) 275 296 // 276 const MH GausEvents&MHCalibrationCam::GetAverageLoGainSector(UInt_t i) const277 { 278 return *static_cast<MH GausEvents*>(fAverageLoGainSectors->UncheckedAt(i));297 const MHCalibrationPix &MHCalibrationCam::GetAverageLoGainSector(UInt_t i) const 298 { 299 return *static_cast<MHCalibrationPix*>(fAverageLoGainSectors->UncheckedAt(i)); 279 300 } 280 301 … … 666 687 // 667 688 // If MBadPixelsPix::IsBad(): 668 // - calls MH GausEvents::SetExcluded()689 // - calls MHCalibrationPix::SetExcluded() 669 690 // 670 691 // Calls: 671 692 // - MHGausEvents::InitBins() 672 // - MH GausEvents::ChangeHistId(i)673 // - MH GausEvents::SetEventFrequency(fPulserFrequency)693 // - MHCalibrationPix::ChangeHistId(i) 694 // - MHCalibrationPix::SetEventFrequency(fPulserFrequency) 674 695 // 675 void MHCalibrationCam::InitHists(MH GausEvents&hist, MBadPixelsPix &bad, const Int_t i)696 void MHCalibrationCam::InitHists(MHCalibrationPix &hist, MBadPixelsPix &bad, const Int_t i) 676 697 { 677 698 … … 695 716 { 696 717 697 MH GausEvents&hist = (*this)[i];718 MHCalibrationPix &hist = (*this)[i]; 698 719 699 720 if (hist.IsExcluded()) … … 710 731 { 711 732 712 MH GausEvents&hist = GetAverageHiGainArea(j);733 MHCalibrationPix &hist = GetAverageHiGainArea(j); 713 734 MCalibrationPix &pix = calcam.GetAverageArea(j); 714 735 MBadPixelsPix &bad = calcam.GetAverageBadArea(j); … … 721 742 { 722 743 723 MH GausEvents&hist = GetAverageHiGainSector(j);744 MHCalibrationPix &hist = GetAverageHiGainSector(j); 724 745 MCalibrationPix &pix = calcam.GetAverageSector(j); 725 746 MBadPixelsPix &bad = calcam.GetAverageBadSector(j); … … 738 759 { 739 760 740 MH GausEvents&hist = (*this)(i);761 MHCalibrationPix &hist = (*this)(i); 741 762 742 763 if (hist.IsExcluded()) … … 753 774 { 754 775 755 MH GausEvents&hist = GetAverageLoGainArea(j);776 MHCalibrationPix &hist = GetAverageLoGainArea(j); 756 777 MCalibrationPix &pix = calcam.GetAverageArea(j); 757 778 MBadPixelsPix &bad = calcam.GetAverageBadArea(j); … … 764 785 { 765 786 766 MH GausEvents&hist = GetAverageLoGainSector(j);787 MHCalibrationPix &hist = GetAverageLoGainSector(j); 767 788 MCalibrationPix &pix = calcam.GetAverageSector(j); 768 789 MBadPixelsPix &bad = calcam.GetAverageBadSector(j); … … 779 800 void MHCalibrationCam::CalcAverageSigma() 780 801 { 802 803 if (!fCam) 804 return; 781 805 782 806 for (UInt_t j=0; j<fGeom->GetNumAreas(); j++) … … 805 829 // 806 830 // Fits the histograms with a Gaussian, in case of failure 807 // calls MH GausEvents::RepeatFit(), in case of repeated failure808 // calls MH GausEvents::BypassFit() and sets the following flags:831 // calls MHCalibrationPix::RepeatFit(), in case of repeated failure 832 // calls MHCalibrationPix::BypassFit() and sets the following flags: 809 833 // - MBadPixelsPix::SetUncalibrated( MBadPixelsPix::UncalibratedType_t fittyp ) 810 834 // - MBadPixelsPix::SetUnsuitable( MBadPixelsPix::kUnreliableRun ) … … 817 841 // Retrieves the results and store them in MCalibrationPix 818 842 // 819 void MHCalibrationCam::FitHiGainHists(MH GausEvents&hist,843 void MHCalibrationCam::FitHiGainHists(MHCalibrationPix &hist, 820 844 MCalibrationPix &pix, 821 845 MBadPixelsPix &bad, … … 885 909 // 886 910 // Fits the histograms with a Gaussian, in case of failure 887 // calls MH GausEvents::RepeatFit(), in case of repeated failure888 // calls MH GausEvents::BypassFit() and sets the following flags:911 // calls MHCalibrationPix::RepeatFit(), in case of repeated failure 912 // calls MHCalibrationPix::BypassFit() and sets the following flags: 889 913 // - MBadPixelsPix::SetUncalibrated( MBadPixelsPix::UncalibratedType_t fittyp ) 890 914 // - MBadPixelsPix::SetUnsuitable( MBadPixelsPix::kUnreliableRun ) … … 897 921 // Retrieves the results and store them in MCalibrationPix 898 922 // 899 void MHCalibrationCam::FitLoGainHists(MH GausEvents&hist,923 void MHCalibrationCam::FitLoGainHists(MHCalibrationPix &hist, 900 924 MCalibrationPix &pix, 901 925 MBadPixelsPix &bad, -
trunk/MagicSoft/Mars/mcalib/MHCalibrationCam.h
r4882 r4901 28 28 class TObjArray; 29 29 30 class MH GausEvents;30 class MHCalibrationPix; 31 31 class MGeomCam; 32 32 class MRawRunHeader; 33 class MCalibrationIntensityCam; 33 34 class MCalibrationCam; 34 35 class MCalibrationPix; … … 62 63 TArrayI fAverageSectorNum; // Number of pixels in average pixels per sector 63 64 TArrayI fRunNumbers; // Numbers of runs used 64 TArrayI fHiGainOverFlow; // Number of times overflow occurred in whole run65 TArrayI fLoGainOverFlow; // Number of times overflow occurred in whole run66 65 67 66 MCalibrationCam::PulserColor_t fColor; // Colour of the pulsed LEDs 68 67 69 68 MBadPixelsCam *fBadPixels; //! Bad Pixels storage container 69 MCalibrationIntensityCam *fIntensCam; //! Intensity Calibration Cam with the results 70 70 MCalibrationCam *fCam; //! Calibration Cam with the results 71 71 MGeomCam *fGeom; //! Camera geometry … … 95 95 MBadPixelsPix::UncalibratedType_t osctyp); 96 96 97 void FitHiGainHists(MH GausEvents&hist,97 void FitHiGainHists(MHCalibrationPix &hist, 98 98 MCalibrationPix &pix, 99 99 MBadPixelsPix &bad, … … 105 105 MBadPixelsPix::UncalibratedType_t osctyp); 106 106 107 void FitLoGainHists(MH GausEvents&hist,107 void FitLoGainHists(MHCalibrationPix &hist, 108 108 MCalibrationPix &pix, 109 109 MBadPixelsPix &bad, … … 111 111 MBadPixelsPix::UncalibratedType_t osctyp); 112 112 113 void InitHists(MH GausEvents&hist, MBadPixelsPix &bad, const Int_t i);113 void InitHists(MHCalibrationPix &hist, MBadPixelsPix &bad, const Int_t i); 114 114 115 115 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print); … … 125 125 virtual Bool_t Finalize ( ); 126 126 127 virtual void ResetHists(); 128 127 129 // Clone 128 130 virtual TObject *Clone(const char *name="") const; … … 135 137 136 138 const Int_t GetAverageAreas () const; 137 MH GausEvents&GetAverageHiGainArea (UInt_t i);138 const MH GausEvents&GetAverageHiGainArea (UInt_t i) const;139 MH GausEvents&GetAverageLoGainArea (UInt_t i);140 const MH GausEvents&GetAverageLoGainArea (UInt_t i) const;141 MH GausEvents&GetAverageHiGainSector(UInt_t i);142 const MH GausEvents&GetAverageHiGainSector(UInt_t i) const;143 MH GausEvents&GetAverageLoGainSector(UInt_t i);144 const MH GausEvents&GetAverageLoGainSector(UInt_t i) const;139 MHCalibrationPix &GetAverageHiGainArea (UInt_t i); 140 const MHCalibrationPix &GetAverageHiGainArea (UInt_t i) const; 141 MHCalibrationPix &GetAverageLoGainArea (UInt_t i); 142 const MHCalibrationPix &GetAverageLoGainArea (UInt_t i) const; 143 MHCalibrationPix &GetAverageHiGainSector(UInt_t i); 144 const MHCalibrationPix &GetAverageHiGainSector(UInt_t i) const; 145 MHCalibrationPix &GetAverageLoGainSector(UInt_t i); 146 const MHCalibrationPix &GetAverageLoGainSector(UInt_t i) const; 145 147 const Int_t GetAverageSectors () const; 146 148 const MCalibrationCam::PulserColor_t GetColor () const { return fColor; } … … 152 154 const Bool_t IsDebug () const { return fDebug; } 153 155 154 MH GausEvents&operator[] (UInt_t i);155 const MH GausEvents&operator[] (UInt_t i) const;156 MH GausEvents&operator() (UInt_t i);157 const MH GausEvents&operator() (UInt_t i) const;156 MHCalibrationPix &operator[] (UInt_t i); 157 const MHCalibrationPix &operator[] (UInt_t i) const; 158 MHCalibrationPix &operator() (UInt_t i); 159 const MHCalibrationPix &operator() (UInt_t i) const; 158 160 159 161 void SetColor ( const MCalibrationCam::PulserColor_t color ) { fColor = color; } -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargePix.cc
r4884 r4901 136 136 void MHCalibrationChargePix::Reset() 137 137 { 138 } 139 140 // -------------------------------------------------------------------------- 141 // 142 // Calls MHGausEvents::ChangeHistId() 138 MHGausEvents::Reset(); 139 fHAbsTime.Reset(); 140 } 141 142 // -------------------------------------------------------------------------- 143 // 144 // Calls MHCalibrationPix::ChangeHistId() 143 145 // 144 146 // Add id to names and titles of: … … 148 150 { 149 151 150 MH GausEvents::ChangeHistId(id);152 MHCalibrationPix::ChangeHistId(id); 151 153 152 154 fHAbsTime.SetName (Form("%s%d", fHAbsTime.GetName(), id)); … … 199 201 // 200 202 // "": displays the fHGausHist and the fHAbsTime 201 // "all": executes additionally MH GausEvents::Draw(), with options203 // "all": executes additionally MHCalibrationPix::Draw(), with options 202 204 // 203 205 // The following picture shows a typical outcome of call to Draw("all"): … … 248 250 else if (option.Contains("datacheck")) 249 251 { 250 MH GausEvents::Draw("events");252 MHCalibrationPix::Draw("events"); 251 253 return; 252 254 } … … 303 305 304 306 oldpad->cd(2); 305 MH GausEvents::Draw("fourierevents");306 307 } 307 MHCalibrationPix::Draw("fourierevents"); 308 309 } -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargePix.h
r4882 r4901 2 2 #define MARS_MHCalibrationChargePix 3 3 4 #ifndef MARS_MH GausEvents5 #include "MH GausEvents.h"4 #ifndef MARS_MHCalibrationPix 5 #include "MHCalibrationPix.h" 6 6 #endif 7 7 8 class MHCalibrationChargePix : public MH GausEvents8 class MHCalibrationChargePix : public MHCalibrationPix 9 9 { 10 10 … … 31 31 ~MHCalibrationChargePix() {} 32 32 33 v irtual void Reset();34 v irtual void InitBins();33 void Reset(); 34 void InitBins(); 35 35 36 36 // Setters -
trunk/MagicSoft/Mars/mcalib/MHCalibrationRelTimePix.cc
r3923 r4901 79 79 } 80 80 81 82 // --------------------------------------------------------------------------83 //84 // Empty function to overload MHGausEvents::Reset()85 //86 void MHCalibrationRelTimePix::Reset()87 {88 }89 -
trunk/MagicSoft/Mars/mcalib/MHCalibrationRelTimePix.h
r3908 r4901 2 2 #define MARS_MHCalibrationRelTimePix 3 3 4 #ifndef MARS_MH GausEvents5 #include "MH GausEvents.h"4 #ifndef MARS_MHCalibrationPix 5 #include "MHCalibrationPix.h" 6 6 #endif 7 7 8 class MHCalibrationRelTimePix : public MH GausEvents8 class MHCalibrationRelTimePix : public MHCalibrationPix 9 9 { 10 10 … … 29 29 void SetFADCSliceWidth( const Float_t f=fgFADCSliceWidth ) { fFADCSliceWidth = f; } 30 30 31 void Reset();32 33 31 ClassDef(MHCalibrationRelTimePix, 1) // Histogram class for Relative Time Pixel Calibration 34 32 }; -
trunk/MagicSoft/Mars/mcalib/MHCalibrationTestPix.h
r4882 r4901 20 20 ~MHCalibrationTestPix() {} 21 21 22 virtual void Reset();23 24 22 const Float_t GetIntegral() const; 25 23
Note:
See TracChangeset
for help on using the changeset viewer.