source: trunk/MagicSoft/Mars/mcalib/MHGausEvent.h@ 3125

Last change on this file since 3125 was 3108, checked in by gaug, 21 years ago
*** empty log message ***
File size: 2.5 KB
Line 
1#ifndef MARS_MHGausEvent
2#define MARS_MHGausEvent
3
4#ifndef MARS_MH
5#include "MH.h"
6#endif
7
8class TArrayF;
9class TH1F;
10class TH1I;
11class TF1;
12class MHGausEvent : public MH
13{
14private:
15
16 Bool_t fGausFitOK;
17 Bool_t fExpFitOK;
18 Bool_t fOscillating;
19
20 Double_t fMean;
21 Double_t fSigma;
22 Double_t fMeanErr;
23 Double_t fSigmaErr;
24
25 Double_t fProb;
26
27protected:
28
29 TH1F* fHGausHist;
30 TH1I* fHPowerProbability;
31
32 TF1* fFGausFit;
33 TF1* fFExpFit;
34
35 TArrayF *fEvents;
36 TArrayF *fPowerSpectrum;
37
38 Int_t fGausHistBins;
39 Axis_t fGausHistAxisFirst;
40 Axis_t fGausHistAxisLast;
41
42 Int_t fPowerProbabilityBins;
43 Float_t fProbLimit;
44
45 void CutArrayBorder(TArrayF *array);
46
47public:
48
49 MHGausEvent(const char *name=NULL, const char *title=NULL);
50 ~MHGausEvent();
51
52 void Clear(Option_t *o="");
53 void Reset();
54
55 const Double_t GetMean() const { return fMean; }
56 const Double_t GetMeanErr() const { return fMeanErr; }
57 const Double_t GetSigma() const { return fSigma; }
58 const Double_t GetSigmaErr() const { return fSigmaErr; }
59 const Double_t GetChiSquare() const;
60 const Double_t GetProb() const { return fProb; }
61 const Int_t GetNdf() const;
62
63 const Double_t GetSlope() const;
64 const Double_t GetOffset() const;
65 const Double_t GetExpChiSquare() const;
66 const Double_t GetExpProb() const;
67 const Int_t GetExpNdf() const;
68
69 const TH1F *GetHGausHist() { return fHGausHist; }
70 const TH1F *GetHGausHist() const { return fHGausHist; }
71
72 const TF1 *GetFGausFit() { return fFGausFit; }
73 const TF1 *GetFGausFit() const { return fFGausFit; }
74
75 const TH1I *GetHPowerProbability() { return fHPowerProbability; }
76 const TH1I *GetHPowerProbability() const { return fHPowerProbability; }
77
78 const TF1 *GetFExpFit() { return fFExpFit; }
79 const TF1 *GetFExpFit() const { return fFExpFit; }
80
81 Bool_t CheckOscillations();
82
83 virtual Bool_t IsGausFitOK() const { return fGausFitOK; }
84 virtual Bool_t IsExpFitOK() const { return fExpFitOK; }
85 virtual Bool_t IsEmpty() const;
86 virtual Bool_t IsOscillating();
87
88 // Fits
89 virtual Bool_t FitGaus(Option_t *option="RQ0");
90
91 // Prints
92 virtual void Print(const Option_t *o="") const;
93
94 ClassDef(MHGausEvent, 1) // Histograms for events with Gaussian distributed values
95};
96
97#endif
Note: See TracBrowser for help on using the repository browser.