Changeset 7043 for trunk/MagicSoft/Mars/mhcalib
- Timestamp:
- 05/17/05 12:08:31 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mhcalib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeCam.h
r6385 r7043 24 24 private: 25 25 26 static const Int_t fgChargeHiGainNbins; //! Nr. bins of HiGain Histograms (now set to: 550 )27 static const Axis_t fgChargeHiGainFirst; //! First Bin of HiGain Histograms (now set to: -100.5)28 static const Axis_t fgChargeHiGainLast; //! Last Bin of HiGain Histograms (now set to: 999.5)29 static const Int_t fgChargeLoGainNbins; //! First Bin of LoGain Histograms (now set to: 325 )30 static const Axis_t fgChargeLoGainFirst; //! First Bin of LoGain Histograms (now set to: -150.5)31 static const Axis_t fgChargeLoGainLast; //! Last Bin of LoGain Histograms (now set to: 499.5)32 static const Float_t fgProbLimit; //! The default for fProbLimit (now set to: 0.00001)26 static const Int_t fgChargeHiGainNbins; //! Nr. bins of HiGain Histograms 27 static const Axis_t fgChargeHiGainFirst; //! First Bin of HiGain Histograms 28 static const Axis_t fgChargeHiGainLast; //! Last Bin of HiGain Histograms 29 static const Int_t fgChargeLoGainNbins; //! First Bin of LoGain Histograms 30 static const Axis_t fgChargeLoGainFirst; //! First Bin of LoGain Histograms 31 static const Axis_t fgChargeLoGainLast; //! Last Bin of LoGain Histograms 32 static const Float_t fgProbLimit; //! The default for fProbLimit 33 33 34 static const TString fgReferenceFile; //! default for fReferenceFile ("mjobs/calibrationref.rc")34 static const TString fgReferenceFile; //! default for fReferenceFile 35 35 36 36 static const TString gsHistName; //! Default Histogram names … … 44 44 static const TString gsAbsHistYTitle; //! Default Histogram y-axis titles abs.times 45 45 46 static const Float_t fgNumHiGainSaturationLimit; //! The default for fNumHiGainSaturationLimit (now at: 0.01)47 static const Float_t fgNumLoGainSaturationLimit; //! The default for fNumLoGainSaturationLimit (now at: 0.005)46 static const Float_t fgNumHiGainSaturationLimit; //! The default for fNumHiGainSaturationLimit 47 static const Float_t fgNumLoGainSaturationLimit; //! The default for fNumLoGainSaturationLimit 48 48 49 static const Float_t fgTimeLowerLimit; //! Default for fTimeLowerLimit (now set to: 1.)50 static const Float_t fgTimeUpperLimit; //! Default for fTimeUpperLimit (now set to: 2.)49 static const Float_t fgTimeLowerLimit; //! Default for fTimeLowerLimit 50 static const Float_t fgTimeUpperLimit; //! Default for fTimeUpperLimit 51 51 52 Int_t fLoGainNbins; // Number of LoGain bins 52 Int_t fLoGainNbins; // Number of LoGain bins 53 53 Axis_t fLoGainFirst; // Lower histogram limit low gain 54 Axis_t fLoGainLast; // Upper histogram limit low gain 54 Axis_t fLoGainLast; // Upper histogram limit low gain 55 55 56 56 TString fAbsHistName; // Histogram names abs.times -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargePINDiode.cc
r6528 r7043 191 191 fHRmsCharge.SetBins(fRmsChargeNbins,fRmsChargeFirst,fRmsChargeLast); 192 192 193 fExclusionMean = 0; 194 fExclusionSigma = 0; 195 fExclusionChi2 = 0; 196 193 197 return kTRUE; 194 198 … … 250 254 const Float_t signal = (float)extractor->GetExtractedSignal(); 251 255 const Float_t time = extractor->GetExtractedTime(); 252 const Float_t rms = extractor->GetExtractedRms(); 253 256 const Float_t sigma = extractor->GetExtractedSigma(); 257 const Float_t chi2 = extractor->GetExtractedChi2(); 258 259 if (time < 3. || time > 24.) 260 { 261 fExclusionMean++; 262 return kTRUE; 263 } 264 265 if (sigma < 5. || sigma > 18.) 266 { 267 fExclusionSigma++; 268 return kTRUE; 269 } 270 271 if (chi2 > 0.35) 272 { 273 fExclusionChi2++; 274 return kTRUE; 275 } 276 254 277 FillHistAndArray(signal); 255 278 FillAbsTime(time); 256 FillRmsCharge( rms);279 FillRmsCharge(sigma); 257 280 258 281 return kTRUE; … … 293 316 FitRmsCharge(); 294 317 295 CreateFourierSpectrum();296 fPINDiode->SetOscillating ( !IsFourierSpectrumOK() );297 298 318 fPINDiode->SetMean ( fMean ); 299 319 fPINDiode->SetMeanVar ( fMeanErr * fMeanErr ); … … 311 331 312 332 fPINDiode->SetValid(kTRUE); 313 314 const Byte_t loweredge = fSigPIN->GetFirstUsedSlice();315 const Byte_t upperedge = fSigPIN->GetLastUsedSlice();316 const Float_t lowerlimit = (Float_t)loweredge + fTimeLowerLimit;317 const Float_t upperlimit = (Float_t)upperedge + fTimeUpperLimit;318 319 if (GetAbsTimeMean() < lowerlimit)320 {321 *fLog << warn << GetDescriptor()322 << Form("%s%3.1f%s%2.1f%s",": Mean ArrivalTime: ",GetAbsTimeMean()," smaller than ",323 lowerlimit," FADC slices from lower edge in PIN Diode") << endl;324 *fLog << warn << GetDescriptor() << ": No PIN Diode calibration!! " << endl;325 fPINDiode->SetValid(kFALSE);326 }327 328 if ( GetAbsTimeMean() > upperlimit )329 {330 *fLog << warn << GetDescriptor()331 << Form("%s%3.1f%s%2.1f%s",": Mean ArrivalTime: ",GetAbsTimeMean()," bigger than ",332 upperlimit," FADC slices from upper edge in PIN Diode") << endl;333 *fLog << warn << GetDescriptor() << ": No PIN Diode calibration!! " << endl;334 fPINDiode->SetValid(kFALSE);335 }336 333 337 334 return kTRUE; -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargePINDiode.h
r5098 r7043 60 60 Float_t fTimeLowerLimit; // Limit dist. to first signal slice (units: FADC slices) 61 61 Float_t fTimeUpperLimit; // Limit dist. to last signal slice (units: FADC slices) 62 63 Int_t fExclusionMean; // Number of events excluded by deviating mean 64 Int_t fExclusionSigma; // Number of events excluded by deviating sigma 65 Int_t fExclusionChi2; // Number of events excluded by deviating chi2 62 66 63 67 public: … … 77 81 TH1F *GetHRmsCharge() { return &fHRmsCharge; } 78 82 const TH1F *GetHRmsCharge() const { return &fHRmsCharge; } 79 Float_t GetRmsChargeMean() 80 Float_t GetRmsChargeMeanErr() 81 Float_t GetRmsChargeSigma() 82 Float_t GetRmsChargeSigmaErr() 83 Float_t GetRmsChargeMean() const { return fRmsChargeMean; } 84 Float_t GetRmsChargeMeanErr() const { return fRmsChargeMeanErr; } 85 Float_t GetRmsChargeSigma() const { return fRmsChargeSigma; } 86 Float_t GetRmsChargeSigmaErr() const { return fRmsChargeSigmaErr; } 83 87 88 Int_t GetExclusionMean() const { return fExclusionMean; } 89 Int_t GetExclusionSigma() const { return fExclusionSigma; } 90 Int_t GetExclusionChi2() const { return fExclusionChi2; } 91 92 84 93 // Fill histos 85 94 Bool_t FillRmsCharge(const Float_t q); … … 108 117 void SetHistYTitle( const char *name ) { fHistYTitle = name; } 109 118 110 ClassDef(MHCalibrationChargePINDiode, 1) // Histogram class for Charge PIN Diode Calibration119 ClassDef(MHCalibrationChargePINDiode, 2) // Histogram class for Charge PIN Diode Calibration 111 120 }; 112 121
Note:
See TracChangeset
for help on using the changeset viewer.