Changeset 4128
- Timestamp:
- 05/22/04 16:08:07 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r4126 r4128 20 20 21 21 2004/05/22: Markus Gaug 22 23 * mcalib/MHCalibrationChargePix.h 24 * mcalib/MHGausEvents.h 25 - put fSaturated from MHCalibrationChargePix into MHGausEvents 26 27 * mcalib/MHCalibrationChargeCam.[h,cc] 28 * mcalib/MHCalibrationCam.h 29 - put fNumHiGainSaturated and fNumLoGainSaturated from 30 MHCalibrationChargeCam into MHCalibrationCam 31 32 * mcalib/MHCalibrationRelTimeCam.[h,cc] 33 - set flags fSaturated in order to distinguish if the hi-gain or 34 the low-gain time has been extracted. 22 35 23 36 * mcalib/MHCalibrationCam.cc -
trunk/MagicSoft/Mars/mcalib/MHCalibrationCam.cc
r4121 r4128 284 284 { 285 285 286 const Int_t nhi = fHiGainArray->GetEntries();287 const Int_t nlo = fLoGainArray->GetEntries();286 // const Int_t nhi = fHiGainArray->GetEntries(); 287 // const Int_t nlo = fLoGainArray->GetEntries(); 288 288 const Int_t navhi = fAverageHiGainAreas->GetEntries(); 289 289 const Int_t navlo = fAverageLoGainAreas->GetEntries(); -
trunk/MagicSoft/Mars/mcalib/MHCalibrationCam.h
r3902 r4128 44 44 45 45 protected: 46 47 Float_t fNumHiGainSaturationLimit; // Rel. amount sat. higain FADC slices until pixel is called saturated 48 Float_t fNumLoGainSaturationLimit; // Rel. amount sat. logain FADC slices until pixel is called saturated 46 49 47 50 TArrayI fAverageAreaNum; // Number of pixels in average pixels per area … … 132 135 const MHGausEvents &GetAverageLoGainSector(UInt_t i) const; 133 136 const Int_t GetAverageSectors () const; 137 const Float_t GetNumHiGainSaturationLimit() const { return fNumHiGainSaturationLimit; } 138 const Float_t GetNumLoGainSaturationLimit() const { return fNumLoGainSaturationLimit; } 134 139 const TArrayI &GetRunNumbers () const; 135 140 MHGausEvents &operator[] (UInt_t i); … … 138 143 const MHGausEvents &operator() (UInt_t i) const; 139 144 140 void SetAverageNbins( const Int_t bins=fgAverageNbins ) { fAverageNbins = bins; } 141 void SetPulserFrequency(const Int_t f=fgPulserFrequency) { fPulserFrequency = f; } 145 void SetAverageNbins ( const Int_t bins=fgAverageNbins ) { fAverageNbins = bins; } 146 void SetNumLoGainSaturationLimit( const Float_t lim) { fNumLoGainSaturationLimit = lim; } 147 void SetNumHiGainSaturationLimit( const Float_t lim) { fNumHiGainSaturationLimit = lim; } 148 void SetPulserFrequency ( const Int_t f=fgPulserFrequency) { fPulserFrequency = f; } 142 149 143 150 ClassDef(MHCalibrationCam, 1) // Base Histogram class for Calibration Camera -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc
r3939 r4128 165 165 fTitle = title ? title : "Class to fill the calibration histograms "; 166 166 167 SetNumHiGainSaturationLimit( );168 SetNumLoGainSaturationLimit( );167 SetNumHiGainSaturationLimit(fgNumHiGainSaturationLimit); 168 SetNumLoGainSaturationLimit(fgNumLoGainSaturationLimit); 169 169 SetTimeLowerLimit(); 170 170 SetTimeUpperLimit(); -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.h
r3721 r4128 19 19 static const Float_t fgTimeUpperLimit; //! Default for fTimeUpperLimit (now set to: 2.) 20 20 21 Float_t fNumHiGainSaturationLimit; // Rel. amount sat. higain FADC slices until pixel is called saturated22 Float_t fNumLoGainSaturationLimit; // Rel. amount sat. logain FADC slices until pixel is called saturated23 21 Float_t fTimeLowerLimit; // Limit dist. to first signal slice (in units of FADC slices) 24 22 Float_t fTimeUpperLimit; // Limit dist. to last signal slice (in units of FADC slices) … … 45 43 ~MHCalibrationChargeCam() {} 46 44 47 void SetNumLoGainSaturationLimit( const Float_t lim=fgNumLoGainSaturationLimit) { fNumLoGainSaturationLimit = lim; }48 void SetNumHiGainSaturationLimit( const Float_t lim=fgNumHiGainSaturationLimit) { fNumHiGainSaturationLimit = lim; }49 45 void SetTimeLowerLimit ( const Float_t f=fgTimeLowerLimit ) { fTimeLowerLimit = f; } 50 46 void SetTimeUpperLimit ( const Float_t f=fgTimeUpperLimit ) { fTimeUpperLimit = f; } 51 47 52 Float_t GetNumHiGainSaturationLimit() const { return fNumHiGainSaturationLimit; }53 Float_t GetNumLoGainSaturationLimit() const { return fNumLoGainSaturationLimit; }54 55 48 Bool_t GetPixelContent ( Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const; 56 49 void DrawPixelContent( Int_t num ) const; -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargePix.h
r3639 r4128 27 27 Axis_t fAbsTimeLast; // Upper bound bin used for the fHAbsTime 28 28 29 Float_t fSaturated; // Number of events classified as saturated30 31 29 public: 32 30 … … 43 41 virtual void SetAbsTimeLast( const Axis_t last =fgAbsTimeLast) { fAbsTimeLast = last; } 44 42 45 void SetSaturated ( const Float_t f ) { fSaturated += f; }46 47 43 // Getters 48 44 TH1F *GetHAbsTime() { return &fHAbsTime; } … … 52 48 const Float_t GetAbsTimeRms() const; 53 49 const Float_t GetIntegral() const; 54 const Float_t GetSaturated() const { return fSaturated; }55 50 56 51 // Fill histos -
trunk/MagicSoft/Mars/mcalib/MHCalibrationRelTimeCam.cc
r3913 r4128 105 105 #include "MBadPixelsPix.h" 106 106 107 #include "MHGausEvents.h" 108 107 109 ClassImp(MHCalibrationRelTimeCam); 108 110 109 111 using namespace std; 110 112 111 const UInt_t MHCalibrationRelTimeCam::fgReferencePixel = 1; 113 const Float_t MHCalibrationRelTimeCam::fgNumHiGainSaturationLimit = 0.25; 114 const UInt_t MHCalibrationRelTimeCam::fgReferencePixel = 1; 112 115 // -------------------------------------------------------------------------- 113 116 // … … 123 126 fTitle = title ? title : "Histogram class for the relative time calibration of the camera"; 124 127 128 SetNumHiGainSaturationLimit(fgNumHiGainSaturationLimit); 125 129 SetReferencePixel(); 126 130 } … … 343 347 { 344 348 const Float_t reltime = pix.GetArrivalTimeLoGain() - reftime; 349 histhi.SetSaturated(1); 345 350 histlo.FillHistAndArray(reltime); 346 351 sumarealo [aidx] += reltime; … … 392 397 { 393 398 399 for (Int_t i=0; i<fHiGainArray->GetSize(); i++) 400 { 401 402 MHCalibrationRelTimePix &histhi = (MHCalibrationRelTimePix&)(*this)[i]; 403 404 if (histhi.IsExcluded()) 405 continue; 406 407 if (histhi.GetSaturated() > fNumHiGainSaturationLimit*histhi.GetHGausHist()->GetEntries()) 408 { 409 (*fCam)[i].SetHiGainSaturation(); 410 histhi.SetExcluded(); 411 } 412 else 413 (*this)(i).SetExcluded(); 414 415 } 416 417 418 for (Int_t j=0; j<fAverageHiGainAreas->GetSize(); j++) 419 { 420 421 MHCalibrationRelTimePix &histhi = (MHCalibrationRelTimePix&)GetAverageHiGainArea(j); 422 423 if (histhi.GetSaturated() > fNumHiGainSaturationLimit*histhi.GetHGausHist()->GetEntries()) 424 { 425 fCam->GetAverageArea(j).SetHiGainSaturation(); 426 histhi.SetExcluded(); 427 } 428 else 429 GetAverageLoGainArea(j).SetExcluded(); 430 431 } 432 433 434 for (Int_t j=0; j<fAverageHiGainSectors->GetSize(); j++) 435 { 436 437 MHCalibrationRelTimePix &histhi = (MHCalibrationRelTimePix&)GetAverageHiGainSector(j); 438 439 if (histhi.GetSaturated() > fNumHiGainSaturationLimit*histhi.GetHGausHist()->GetEntries()) 440 { 441 fCam->GetAverageSector(j).SetHiGainSaturation(); 442 histhi.SetExcluded(); 443 } 444 else 445 GetAverageHiGainSector(j).SetExcluded(); 446 } 447 448 394 449 FitHiGainArrays((*fCam),*fBadPixels, 395 450 MBadPixelsPix::kRelTimeNotFitted, -
trunk/MagicSoft/Mars/mcalib/MHCalibrationRelTimeCam.h
r3903 r4128 12 12 private: 13 13 14 static const UInt_t fgReferencePixel; // Default for fReferencePixel (now set to: 1) 15 UInt_t fReferencePixel; // The reference pixel for rel. times 14 static const Float_t fgNumHiGainSaturationLimit; //! The default for fNumHiGainSaturationLimit (now at: 0.25) 15 static const UInt_t fgReferencePixel; //! Default for fReferencePixel (now set to: 1) 16 UInt_t fReferencePixel; // The reference pixel for rel. times 16 17 17 18 Bool_t ReInitHists(MParList *pList); -
trunk/MagicSoft/Mars/mcalib/MHGausEvents.h
r3675 r4128 53 53 Int_t fNbins; // Number histogram bins for fHGausHist (used by InitBins()) 54 54 Int_t fNDFLimit; // NDF limit for judgement if fit is OK 55 Float_t fSaturated; // Number of events classified as saturated 55 56 Double_t fSigma; // Sigma of the Gauss fit 56 57 Double_t fSigmaErr; // Error of the sigma of the Gauss fit … … 67 68 68 69 // Setters 70 void SetBinsAfterStripping ( const Int_t nbins=fgBinsAfterStripping ) { fBinsAfterStripping =nbins; } 69 71 void SetPowerProbabilityBins ( const Int_t nbins=fgPowerProbabilityBins ) { fPowerProbabilityBins=nbins; } 70 void SetBinsAfterStripping ( const Int_t nbins=fgBinsAfterStripping ) { fBinsAfterStripping =nbins; }71 72 72 73 public: … … 79 80 virtual void InitBins(); 80 81 81 // Setters 82 void SetBlackoutLimit ( const Float_t lim=fgBlackoutLimit ) { fBlackoutLimit = lim; } 83 void SetEventFrequency ( const Float_t f ) { fEventFrequency = f; } 84 void SetExcluded ( const Bool_t b=kTRUE ); 85 void SetExpFitOK ( const Bool_t b=kTRUE ); 86 void SetFourierSpectrumOK( const Bool_t b=kTRUE ); 87 void SetGausFitOK ( const Bool_t b=kTRUE ); 88 void SetLast ( const Double_t d ) { fLast = d; } 89 void SetFirst ( const Double_t d ) { fFirst = d; } 90 void SetMean ( const Double_t d ) { fMean = d; } 91 void SetMeanErr ( const Double_t d ) { fMeanErr = d; } 92 void SetNbins ( const Int_t i ) { fNbins = i; } 93 void SetNDFLimit ( const Int_t lim=fgNDFLimit ) { fNDFLimit = lim; } 94 void SetPickupLimit ( const Float_t lim=fgPickupLimit ) { fPickupLimit = lim; } 95 void SetPixId ( const Int_t i ) { fPixId = i; } 96 void SetProb ( const Double_t d ) { fProb = d; } 97 void SetProbLimit ( const Float_t lim=fgProbLimit ) { fProbLimit = lim; } 98 void SetSigma ( const Double_t d ) { fSigma = d; } 99 void SetSigmaErr ( const Double_t d ) { fSigmaErr = d; } 100 82 // Draws 83 virtual void Draw(Option_t *option=""); // Default Draw 84 101 85 // Getters 102 86 const Double_t GetBlackout() const; … … 128 112 const TArrayF *GetPowerSpectrum() const { return fPowerSpectrum; } 129 113 const Double_t GetProb() const { return fProb; } 114 const Float_t GetSaturated() const { return fSaturated; } 130 115 const Double_t GetSigma() const { return fSigma; } 131 116 const Double_t GetSigmaErr() const { return fSigmaErr; } … … 150 135 void BypassFit(); // Take mean and RMS from the histogram 151 136 152 // Draws153 virtual void Draw(Option_t *option=""); // Default Draw154 155 137 // Prints 156 138 virtual void Print(const Option_t *o="") const; // Default Print 157 139 140 // Setters 141 void SetBlackoutLimit ( const Float_t lim=fgBlackoutLimit ) { fBlackoutLimit = lim; } 142 void SetEventFrequency ( const Float_t f ) { fEventFrequency = f; } 143 void SetExcluded ( const Bool_t b=kTRUE ); 144 void SetExpFitOK ( const Bool_t b=kTRUE ); 145 void SetFourierSpectrumOK( const Bool_t b=kTRUE ); 146 void SetGausFitOK ( const Bool_t b=kTRUE ); 147 void SetLast ( const Double_t d ) { fLast = d; } 148 void SetFirst ( const Double_t d ) { fFirst = d; } 149 void SetMean ( const Double_t d ) { fMean = d; } 150 void SetMeanErr ( const Double_t d ) { fMeanErr = d; } 151 void SetNbins ( const Int_t i ) { fNbins = i; } 152 void SetNDFLimit ( const Int_t lim=fgNDFLimit ) { fNDFLimit = lim; } 153 void SetPickupLimit ( const Float_t lim=fgPickupLimit ) { fPickupLimit = lim; } 154 void SetPixId ( const Int_t i ) { fPixId = i; } 155 void SetProb ( const Double_t d ) { fProb = d; } 156 void SetProbLimit ( const Float_t lim=fgProbLimit ) { fProbLimit = lim; } 157 void SetSaturated ( const Float_t f ) { fSaturated += f; } 158 void SetSigma ( const Double_t d ) { fSigma = d; } 159 void SetSigmaErr ( const Double_t d ) { fSigmaErr = d; } 160 158 161 // Miscelleaneous 159 162 virtual void ChangeHistId(const Int_t id); // Changes names and titles of the histogram
Note:
See TracChangeset
for help on using the changeset viewer.