- Timestamp:
- 03/30/04 22:48:35 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindPix.h
r3289 r3614 27 27 private: 28 28 29 MCalibrationChargeBlindPix *fBlindPix; //! Storage container of the results 30 MExtractedSignalBlindPixel *fSignal; //! Storage container of the extracted signal 31 MRawEvtData *fRawEvt; //! Storage container of the raw data 32 33 static const Int_t fgChargeNbins; 34 static const Axis_t fgChargeFirst; 35 static const Axis_t fgChargeLast; 36 37 static const Float_t fgSinglePheCut; 38 39 static const Float_t fgNumSinglePheLimit; 40 41 static const Double_t gkElectronicAmp; 42 static const Double_t gkElectronicAmpErr; 43 44 TVector fASinglePheFADCSlices; // Array containing the averaged FADC slice entries for the supposed single-phe events 45 TVector fAPedestalFADCSlices; // Array containing the averaged FADC slice entries for the supposed pedestal events 46 47 TF1 *fSinglePheFit; //-> Single Phe Fit (Gaussians convoluted with Poisson) (needs to be a pointer, initialized later) 48 49 UInt_t fNumSinglePhes; 50 UInt_t fNumPedestals; 51 52 Float_t fSinglePheCut; 53 54 Float_t fNumSinglePheLimit; 55 56 Double_t fLambda; 57 Double_t fMu0; 58 Double_t fMu1; 59 Double_t fSigma0; 60 Double_t fSigma1; 61 62 Double_t fLambdaErr; 63 Double_t fMu0Err; 64 Double_t fMu1Err; 65 Double_t fSigma0Err; 66 Double_t fSigma1Err; 67 68 Double_t fLambdaCheck; 69 Double_t fLambdaCheckErr; 70 71 Double_t fChisquare; 72 Int_t fNDF; 73 Double_t fProb; 74 75 Double_t fMeanPedestal; 76 Double_t fMeanPedestalErr; 77 Double_t fSigmaPedestal; 78 Double_t fSigmaPedestalErr; 79 80 Float_t fExtractSlices; 81 82 Byte_t fFlags; 83 84 enum { kSinglePheFitOK, kPedestalFitOK }; 85 86 TPaveText *fFitLegend; //! 87 TH1F *fHSinglePheFADCSlices; //! 88 TH1F *fHPedestalFADCSlices; //! 89 29 static const Int_t fgChargeNbins; // Default for fChargeNBins (now set to: 5300 ) 30 static const Axis_t fgChargeFirst; // Default for fChargeFirst (now set to: -100.5 ) 31 static const Axis_t fgChargeLast; // Default for fChargeLast (now set to: 5199.5 ) 32 static const Float_t fgSinglePheCut; // Default for fSinglePheCut (now set to: 200 ) 33 static const Float_t fgNumSinglePheLimit; // Default for fNumSinglePheLimit (now set to: 50 ) 34 35 static const Double_t gkElectronicAmp; // Electronic Amplification after the PMT (in FADC counts/N_e) 36 static const Double_t gkElectronicAmpErr; // Error of the electronic amplification 37 38 Float_t fSinglePheCut; // Value of summed FADC slices upon which event considered as single-phe 39 Float_t fNumSinglePheLimit; // Minimum number of single-phe events 40 41 MCalibrationChargeBlindPix *fBlindPix; //! Storage container results 42 MExtractedSignalBlindPixel *fSignal; //! Storage container extracted signal 43 MRawEvtData *fRawEvt; //! Storage container raw data 44 45 TVector fASinglePheFADCSlices; // Averaged FADC slice entries supposed single-phe events 46 TVector fAPedestalFADCSlices; // Averaged FADC slice entries supposed pedestal events 47 48 TF1 *fSinglePheFit; //-> Single Phe Fit (Gaussians convoluted with Poisson) 49 50 UInt_t fNumSinglePhes; // Number of entries in fASinglePheFADCSlices 51 UInt_t fNumPedestals; // Number of entries in fAPedestalFADCSlices 52 53 Double_t fLambda; // Poisson mean from Single-phe fit 54 Double_t fLambdaCheck; // Poisson mean from Pedestal fit alone 55 Double_t fMu0; // Mean of the pedestal 56 Double_t fMu1; // Mean of single-phe peak 57 Double_t fSigma0; // Sigma of the pedestal 58 Double_t fSigma1; // Sigma of single-phe peak 59 60 Double_t fLambdaErr; // Error of Poisson mean from Single-phe fit 61 Double_t fLambdaCheckErr; // Error of Poisson mean from Pedestal fit alone 62 Double_t fMu0Err; // Error of Mean of the pedestal 63 Double_t fMu1Err; // Error of Mean of single-phe peak 64 Double_t fSigma0Err; // Error of Sigma of the pedestal 65 Double_t fSigma1Err; // Error of Sigma of single-phe peak 66 67 Double_t fChisquare; // Chisquare of single-phe fit 68 Int_t fNDF; // Ndof of single-phe fit 69 Double_t fProb; // Probability of singleo-phe fit 70 71 Double_t fMeanPedestal; // Mean pedestal from pedestal run 72 Double_t fSigmaPedestal; // Sigma pedestal from pedestal run 73 74 Double_t fMeanPedestalErr; // Error of Mean pedestal from pedestal run 75 Double_t fSigmaPedestalErr; // Error of Sigma pedestal from pedestal run 76 77 Byte_t fFlags; // Bit-field for the flags 78 enum { kSinglePheFitOK, kPedestalFitOK }; // Possible bits to be set 79 80 TPaveText *fFitLegend; //! Some legend to display the fit results 81 TH1F *fHSinglePheFADCSlices; //! A histogram created and deleted only in Draw() 82 TH1F *fHPedestalFADCSlices; //! A histogram created and deleted only in Draw() 90 83 91 84 // Fill histos … … 117 110 void SetNumSinglePheLimit ( const Float_t lim =fgNumSinglePheLimit ) { fNumSinglePheLimit = lim; } 118 111 119 void SetMeanPedestal ( const Float_t f ) { fMeanPedestal = f; }120 void SetMeanPedestalErr ( const Float_t f ) { fMeanPedestalErr = f; }121 void SetSigmaPedestal ( const Float_t f ) { fSigmaPedestal = f; }122 void SetSigmaPedestalErr ( const Float_t f ) { fSigmaPedestalErr = f; }123 124 void SetSinglePheFitOK ( const Bool_t b=kTRUE);125 void SetPedestalFitOK ( const Bool_t b=kTRUE);112 void SetMeanPedestal ( const Float_t f ) { fMeanPedestal = f; } 113 void SetMeanPedestalErr ( const Float_t f ) { fMeanPedestalErr = f; } 114 void SetSigmaPedestal ( const Float_t f ) { fSigmaPedestal = f; } 115 void SetSigmaPedestalErr ( const Float_t f ) { fSigmaPedestalErr = f; } 116 117 void SetSinglePheFitOK ( const Bool_t b=kTRUE); 118 void SetPedestalFitOK ( const Bool_t b=kTRUE); 126 119 127 120 // Getters … … 140 133 const Double_t GetSigma1Err() const { return fSigma1Err; } 141 134 142 TVector &GetASinglePheFADCSlices() 143 const TVector &GetASinglePheFADCSlices() 144 145 TVector &GetAPedestalFADCSlices() 146 const TVector &GetAPedestalFADCSlices() 147 148 const Bool_t IsSinglePheFitOK() const;149 const Bool_t IsPedestalFitOK() const;135 TVector &GetASinglePheFADCSlices() { return fASinglePheFADCSlices; } 136 const TVector &GetASinglePheFADCSlices() const { return fASinglePheFADCSlices; } 137 138 TVector &GetAPedestalFADCSlices() { return fAPedestalFADCSlices; } 139 const TVector &GetAPedestalFADCSlices() const { return fAPedestalFADCSlices; } 140 141 const Bool_t IsSinglePheFitOK() const; 142 const Bool_t IsPedestalFitOK() const; 150 143 151 144 // Draws … … 157 150 // Fits 158 151 public: 159 enum FitFunc_t { kEPoisson4, kEPoisson5, kEPoisson6, kEPoisson7, kEPolya, kEMichele }; 152 enum FitFunc_t { kEPoisson4, kEPoisson5, kEPoisson6, kEPoisson7, kEPolya, kEMichele }; // The possible fit functions 160 153 161 154 private: … … 166 159 void FitPedestal (Option_t *opt="RL0+Q"); 167 160 168 void ChangeFitFunc( FitFunc_t func){ fFitFunc = func; }161 void ChangeFitFunc(const FitFunc_t func) { fFitFunc = func; } 169 162 170 163 // Simulation 171 Bool_t SimulateSinglePhe( Double_t lambda,172 Double_t mu0,Double_t mu1,173 Double_t sigma0,Double_t sigma1);164 Bool_t SimulateSinglePhe(const Double_t lambda, 165 const Double_t mu0, const Double_t mu1, 166 const Double_t sigma0, const Double_t sigma1); 174 167 175 168 private: 176 177 const static Double_t fNoWay = 10000000000.0;178 169 179 170 inline static Double_t fFitFuncMichele(Double_t *x, Double_t *par) … … 194 185 195 186 if (mu1cat < mu0) 196 return fNoWay;187 return FLT_MAX; 197 188 198 189 if (sigma1cat < sigma0) 199 return fNoWay;190 return FLT_MAX; 200 191 201 192 // if (sigma1cat < sigma1dyn) … … 269 260 270 261 if (mu1 < mu0) 271 return fNoWay;262 return FLT_MAX; 272 263 273 264 Double_t sigma0 = par[3]; … … 275 266 276 267 if (sigma1 < sigma0) 277 return fNoWay;268 return FLT_MAX; 278 269 279 270 Double_t mu2 = (2.*mu1)-mu0; … … 326 317 327 318 if (mu1 < mu0) 328 return fNoWay;319 return FLT_MAX; 329 320 330 321 Double_t sigma0 = par[3]; … … 332 323 333 324 if (sigma1 < sigma0) 334 return fNoWay;325 return FLT_MAX; 335 326 336 327 … … 391 382 392 383 if (mu1 < mu0) 393 return fNoWay;384 return FLT_MAX; 394 385 395 386 Double_t sigma0 = par[3]; … … 397 388 398 389 if (sigma1 < sigma0) 399 return fNoWay;390 return FLT_MAX; 400 391 401 392 … … 515 506 516 507 517 ClassDef(MHCalibrationChargeBlindPix, 1) // Histogram s fromthe Calibration Blind Pixel508 ClassDef(MHCalibrationChargeBlindPix, 1) // Histogram class for the Calibration Blind Pixel 518 509 }; 519 510
Note:
See TracChangeset
for help on using the changeset viewer.