Changeset 4946 for trunk/MagicSoft
- Timestamp:
- 09/10/04 22:15:18 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mhcalib
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc
r4929 r4946 79 79 using namespace std; 80 80 81 const Int_t MHCalibrationCam::fgAverageNbins = 2000;82 81 const Int_t MHCalibrationCam::fgPulserFrequency = 500; 83 84 82 // -------------------------------------------------------------------------- 85 83 // … … 120 118 fAverageLoGainSectors->SetOwner(); 121 119 122 SetAverageNbins();123 120 SetPulserFrequency(); 124 121 … … 384 381 385 382 cam->fPulserFrequency = fPulserFrequency; 386 cam->fAverageNbins = fAverageNbins;387 383 388 384 return cam; -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.h
r4929 r4946 42 42 private: 43 43 44 static const Int_t fgAverageNbins; //! The default for fAverageNbins (now set to: 2000)45 44 static const Int_t fgPulserFrequency; //! The default for fPulserFrequency (now set to: 500) 46 45 47 46 protected: 47 48 Int_t fNbins; // Number of bins 49 Axis_t fFirst; // Lower histogram limit 50 Axis_t fLast; // Upper histogram limit 48 51 49 52 Float_t fNumHiGainSaturationLimit; // Rel. amount sat. higain FADC slices until pixel is called saturated … … 56 59 TArrayF fAverageAreaSigma; // Re-normalized sigmas in average pixels per area 57 60 TArrayF fAverageAreaSigmaVar; // Variance Re-normalized sigmas in average pixels per area 58 Int_t fAverageNbins; // Number of bins for the average histograms 61 59 62 TObjArray *fAverageHiGainAreas; //-> Array of calibration pixels, one per pixel area 60 63 TObjArray *fAverageHiGainSectors; //-> Array of calibration pixels, one per camera sector … … 142 145 void DrawPixelContent( Int_t num ) const; 143 146 144 const Int_t GetAverageAreas () const;147 const Int_t GetAverageAreas () const; 145 148 MHCalibrationPix &GetAverageHiGainArea (UInt_t i); 146 149 const MHCalibrationPix &GetAverageHiGainArea (UInt_t i) const; … … 151 154 MHCalibrationPix &GetAverageLoGainSector(UInt_t i); 152 155 const MHCalibrationPix &GetAverageLoGainSector(UInt_t i) const; 153 const Int_t GetAverageSectors () const;156 const Int_t GetAverageSectors () const; 154 157 const MCalibrationCam::PulserColor_t GetColor () const { return fColor; } 155 158 const Float_t GetNumHiGainSaturationLimit() const { return fNumHiGainSaturationLimit; } … … 173 176 ? SETBIT(fFlags,kOscillations) 174 177 : CLRBIT(fFlags,kOscillations); } 175 void SetAverageNbins ( const Int_t bins=fgAverageNbins) { fAverageNbins = bins; } 178 179 void SetNbins ( const Int_t i ) { fNbins = i; } 180 void SetFirst ( const Axis_t f ) { fFirst = f; } 181 void SetLast ( const Axis_t f ) { fLast = f; } 182 176 183 void SetNumLoGainSaturationLimit( const Float_t lim ) { fNumLoGainSaturationLimit = lim; } 177 184 void SetNumHiGainSaturationLimit( const Float_t lim ) { fNumHiGainSaturationLimit = lim; } -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationRelTimeCam.cc
r4943 r4946 137 137 SetReferencePixel(); 138 138 139 Set RelTimeNbins();140 Set RelTimeFirst();141 Set RelTimeLast ();139 SetNbins(fgRelTimeNbins); 140 SetFirst(fgRelTimeFirst); 141 SetLast (fgRelTimeLast ); 142 142 } 143 143 … … 209 209 210 210 MHCalibrationPix &pix = (*this)[i]; 211 pix.SetNbins(f RelTimeNbins);212 pix.SetFirst(f RelTimeFirst);213 pix.SetLast (f RelTimeLast);211 pix.SetNbins(fNbins); 212 pix.SetFirst(fFirst); 213 pix.SetLast (fLast); 214 214 215 215 TH1F *h = pix.GetHGausHist(); … … 233 233 MHCalibrationPix &pix = (*this)(i); 234 234 235 pix.SetNbins(f RelTimeNbins);236 pix.SetFirst(f RelTimeFirst);237 pix.SetLast (f RelTimeLast);235 pix.SetNbins(fNbins); 236 pix.SetFirst(fFirst); 237 pix.SetLast (fLast); 238 238 239 239 TH1F *h = pix.GetHGausHist(); … … 261 261 MHCalibrationPix &pix = GetAverageHiGainArea(j); 262 262 263 pix.SetNbins(f RelTimeNbins*(Int_t)TMath::Sqrt((Float_t)npixels/nareas));264 pix.SetFirst(f RelTimeFirst);265 pix.SetLast (f RelTimeLast);263 pix.SetNbins(fNbins*(Int_t)TMath::Sqrt((Float_t)npixels/nareas)); 264 pix.SetFirst(fFirst); 265 pix.SetLast (fLast); 266 266 267 267 TH1F *h = pix.GetHGausHist(); … … 298 298 MHCalibrationPix &pix = GetAverageLoGainArea(j); 299 299 300 pix.SetNbins(f RelTimeNbins*(Int_t)TMath::Sqrt((Float_t)npixels/nareas));301 pix.SetFirst(f RelTimeFirst);302 pix.SetLast (f RelTimeLast);300 pix.SetNbins(fNbins*(Int_t)TMath::Sqrt((Float_t)npixels/nareas)); 301 pix.SetFirst(fFirst); 302 pix.SetLast (fLast); 303 303 304 304 TH1F *h = pix.GetHGausHist(); … … 335 335 MHCalibrationPix &pix = GetAverageHiGainSector(j); 336 336 337 pix.SetNbins(f RelTimeNbins*(Int_t)TMath::Sqrt((Float_t)npixels/nsectors));338 pix.SetFirst(f RelTimeFirst);339 pix.SetLast (f RelTimeLast);337 pix.SetNbins(fNbins*(Int_t)TMath::Sqrt((Float_t)npixels/nsectors)); 338 pix.SetFirst(fFirst); 339 pix.SetLast (fLast); 340 340 341 341 TH1F *h = pix.GetHGausHist(); … … 362 362 MHCalibrationPix &pix = GetAverageLoGainSector(j); 363 363 364 pix.SetNbins(f RelTimeNbins*(Int_t)TMath::Sqrt((Float_t)npixels/nsectors));365 pix.SetFirst(f RelTimeFirst);366 pix.SetLast (f RelTimeLast);364 pix.SetNbins(fNbins*(Int_t)TMath::Sqrt((Float_t)npixels/nsectors)); 365 pix.SetFirst(fFirst); 366 pix.SetLast (fLast); 367 367 368 368 TH1F *h = pix.GetHGausHist(); -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationRelTimeCam.h
r4938 r4946 36 36 37 37 UInt_t fReferencePixel; // The reference pixel for rel. times 38 Int_t fRelTimeNbins; // Number of bins (now set to: 900 )39 Axis_t fRelTimeFirst; // Lower histogram limit (now set to: -13.5 )40 Axis_t fRelTimeLast; // Upper histogram limit (now set to: 13.5 )41 38 42 39 Bool_t ReInitHists(MParList *pList); … … 54 51 // Setters 55 52 void SetReferencePixel( const UInt_t i=fgReferencePixel) { fReferencePixel = i; } 56 void SetRelTimeNbins ( const Int_t i=fgRelTimeNbins ) { fRelTimeNbins = i; }57 void SetRelTimeFirst ( const Axis_t f=fgRelTimeFirst ) { fRelTimeFirst = f; }58 void SetRelTimeLast ( const Axis_t f=fgRelTimeLast ) { fRelTimeLast = f; }59 53 60 54 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const; -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationTestCam.cc
r4941 r4946 91 91 #include "MParList.h" 92 92 93 #include "MCalibrationTestCam.h"94 95 93 #include "MCalibrationCam.h" 96 94 #include "MCalibrationPix.h" … … 117 115 // 118 116 // Sets: 119 // - f TestNbins to fgTestNbins120 // - f TestFirst to fgTestFirst121 // - f TestLast to fgTestLast117 // - fNbins to fgTestNbins 118 // - fFirst to fgTestFirst 119 // - fLast to fgTestLast 122 120 // 123 121 MHCalibrationTestCam::MHCalibrationTestCam(const char *name, const char *title) … … 127 125 fTitle = title ? title : "Histogram class for testing the calibration"; 128 126 129 Set TestNbins();130 Set TestFirst();131 Set TestLast ();127 SetNbins(fgTestNbins); 128 SetFirst(fgTestFirst); 129 SetLast (fgTestLast ); 132 130 } 133 131 134 132 // -------------------------------------------------------------------------- 135 //136 // Gets or creates the pointers to:137 // - MCalibrationTestCam138 133 // 139 134 // Searches pointer to: … … 180 175 MHCalibrationPix &pix = (*this)[i]; 181 176 182 pix.SetNbins(f TestNbins);183 pix.SetFirst(f TestFirst);184 pix.SetLast (f TestLast);177 pix.SetNbins(fNbins); 178 pix.SetFirst(fFirst); 179 pix.SetLast (fLast); 185 180 186 181 TH1F *h = pix.GetHGausHist(); … … 208 203 MHCalibrationPix &pix = GetAverageHiGainArea(j); 209 204 210 pix.SetNbins(f TestNbins*3);211 pix.SetFirst(f TestFirst);212 pix.SetLast (f TestLast);205 pix.SetNbins(fNbins*(Int_t)TMath::Sqrt((Float_t)npixels/nareas)); 206 pix.SetFirst(fFirst); 207 pix.SetLast (fLast); 213 208 214 209 pix.InitBins(); … … 245 240 MHCalibrationPix &pix = GetAverageHiGainSector(j); 246 241 247 pix.SetNbins(f TestNbins*3);248 pix.SetFirst(f TestFirst);249 pix.SetLast (f TestLast);242 pix.SetNbins(fNbins*(Int_t)TMath::Sqrt((Float_t)npixels/nsectors)); 243 pix.SetFirst(fFirst); 244 pix.SetLast (fLast); 250 245 251 246 TH1F *h = pix.GetHGausHist(); -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationTestCam.h
r4939 r4946 22 22 static const Axis_t fgTestLast; // Default for fLast (now set to: 1999.5) 23 23 24 Int_t fTestNbins; // Number of bins (now set to: 2000 )25 Axis_t fTestFirst; // Lower histogram limit (now set to: -0.5 )26 Axis_t fTestLast; // Upper histogram limit (now set to: 1999.5)27 28 24 TArrayF fMeanMeanPhotPerArea; 29 25 TArrayF fRmsMeanPhotPerArea ; … … 50 46 void CalcAverageSigma(); 51 47 52 void SetTestNbins ( const Int_t i=fgTestNbins ) { fTestNbins = i; }53 void SetTestFirst ( const Axis_t f=fgTestFirst ) { fTestFirst = f; }54 void SetTestLast ( const Axis_t f=fgTestLast ) { fTestLast = f; }55 56 48 ClassDef(MHCalibrationTestCam, 1) // Histogram class for Relative Time Camera Calibration 57 49 }; -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationTestTimeCam.cc
r4941 r4946 114 114 // 115 115 // Sets: 116 // - f TestNbins to fgTestNbins117 // - f TestFirst to fgTestFirst118 // - f TestLast to fgTestLast116 // - fNbins to fgTestNbins 117 // - fFirst to fgTestFirst 118 // - fLast to fgTestLast 119 119 // 120 120 MHCalibrationTestTimeCam::MHCalibrationTestTimeCam(const char *name, const char *title) … … 124 124 fTitle = title ? title : "Histogram class for testing the calibration of arrival times"; 125 125 126 Set TestNbins();127 Set TestFirst();128 Set TestLast ();126 SetNbins(fgTestNbins); 127 SetFirst(fgTestFirst); 128 SetLast (fgTestLast ); 129 129 130 130 } … … 179 179 MHCalibrationPix &pix = (*this)[i]; 180 180 181 pix.SetNbins(f TestNbins);182 pix.SetFirst(f TestFirst);183 pix.SetLast (f TestLast);181 pix.SetNbins(fNbins); 182 pix.SetFirst(fFirst); 183 pix.SetLast (fLast); 184 184 185 185 TH1F *h = pix.GetHGausHist(); … … 206 206 MHCalibrationPix &pix = GetAverageHiGainArea(j); 207 207 208 pix.SetNbins(f TestNbins*3);209 pix.SetFirst(f TestFirst);210 pix.SetLast (f TestLast);208 pix.SetNbins(fNbins*(Int_t)TMath::Sqrt((Float_t)npixels/nareas)); 209 pix.SetFirst(fFirst); 210 pix.SetLast (fLast); 211 211 212 212 pix.InitBins(); … … 244 244 MHCalibrationPix &pix = GetAverageHiGainSector(j); 245 245 246 pix.SetNbins(f TestNbins*3);247 pix.SetFirst(f TestFirst);248 pix.SetLast (f TestLast);246 pix.SetNbins(fNbins*(Int_t)TMath::Sqrt((Float_t)npixels/nsectors)); 247 pix.SetFirst(fFirst); 248 pix.SetLast (fLast); 249 249 250 250 TH1F *h = pix.GetHGausHist(); -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationTestTimeCam.h
r4940 r4946 15 15 static const Axis_t fgTestLast; // Default for fTestLast (now set to: 29.5) 16 16 17 Int_t fTestNbins; // Number of bins18 Axis_t fTestFirst; // Lower histogram limit19 Axis_t fTestLast; // Upper histogram limit20 21 17 Bool_t ReInitHists(MParList *pList); 22 18 Bool_t FillHists(const MParContainer *par, const Stat_t w=1); … … 34 30 void CalcAverageSigma(); 35 31 36 void SetTestNbins ( const Int_t i=fgTestNbins ) { fTestNbins = i; }37 void SetTestFirst ( const Axis_t f=fgTestFirst ) { fTestFirst = f; }38 void SetTestLast ( const Axis_t f=fgTestLast ) { fTestLast = f; }39 40 32 ClassDef(MHCalibrationTestTimeCam, 0) // Histogram class for Relative Time Camera Calibration 41 33 };
Note:
See TracChangeset
for help on using the changeset viewer.