source: trunk/MagicSoft/Mars/mhist/MHCalibrationPixel.h@ 2591

Last change on this file since 2591 was 2581, checked in by gaug, 21 years ago
*** empty log message ***
File size: 3.0 KB
Line 
1#ifndef MARS_MHCalibrationPixel
2#define MARS_MHCalibrationPixel
3
4#ifndef ROOT_TH1
5#include "TH1.h"
6#endif
7
8#ifndef ROOT_TH1
9#include "TH1F.h"
10#endif
11
12#ifndef MARS_MH
13#include "MH.h"
14#endif
15
16#ifndef ROOT_TF1
17#include "TF1.h"
18#endif
19
20class TPaveText;
21class TMath;
22class MParList;
23
24class MHCalibrationPixel : public MH
25{
26
27private:
28
29 Int_t fPixId; //-> Pixel Nr
30
31protected:
32
33 TH1I* fHQ; //-> Summed FADC slices
34 TH1I* fHT; //-> Mean arrival time in number of FADC sice
35
36 TH1I* fHQvsN; //-> Summed Charge vs. Event Nr.
37
38 TF1* fQGausFit;
39 TF1* fTGausFit;
40
41 TPaveText *fFitLegend;
42
43 Axis_t fLowerFitRange;
44 Axis_t fQfirst;
45 Axis_t fQlast;
46 Int_t fQnbins;
47
48 Bool_t fFitOK;
49
50 Double_t fQChisquare;
51 Double_t fQProb;
52 Int_t fQNdf;
53
54 Double_t fQMean;
55 Double_t fQMeanErr;
56 Double_t fQSigma;
57 Double_t fQSigmaErr;
58
59 Double_t fTChisquare;
60 Double_t fTProb;
61 Int_t fTNdf;
62
63 Double_t fTMean;
64 Double_t fTSigma;
65
66 virtual void DrawLegend();
67
68public:
69
70 MHCalibrationPixel(Int_t pix=-1, const char *name=NULL, const char *title=NULL);
71 ~MHCalibrationPixel();
72
73 Bool_t SetupFill(const MParList *pList);
74 Bool_t Fill(const MParContainer *, const Stat_t w=1) { return kTRUE; }
75
76 Bool_t FillQ(Int_t q) { return fHQ->Fill(q) > -1; }
77 Bool_t FillT(Int_t t) { return fHT->Fill(t) > -1; }
78 Bool_t FillQvsN(Float_t q, Int_t n) { return fHQvsN->Fill(n,q) > -1; }
79
80 const TH1I *GetHQ() { return fHQ; }
81 const TH1I *GetHQ() const { return fHQ; }
82
83 const Double_t GetQMean() const { return fQMean; }
84 const Double_t GetQMeanErr() const { return fQMeanErr; }
85 const Double_t GetQSigma() const { return fQSigma; }
86 const Double_t GetQSigmaErr() const { return fQSigmaErr; }
87 const Double_t GetArea() const { return fQGausFit->GetParameter(0); }
88 const Double_t GetAreaErr() const { return fQGausFit->GetParError(0); }
89
90 const Double_t GetQChiSquare() const { return fQChisquare; }
91 const Double_t GetQProb() const { return fQProb; }
92 const Int_t GetQNdf() const { return fQNdf; }
93
94 const Double_t GetTMean() const { return fTMean; }
95 const Double_t GetTSigma() const { return fTSigma; }
96
97 const Double_t GetTChiSquare() const { return fTChisquare; }
98 const Double_t GetTProb() const { return fTProb; }
99 const Int_t GetTNdf() const { return fTNdf; }
100
101 const TH1I *GetHT() { return fHT; }
102 const TH1I *GetHT() const { return fHT; }
103
104 const TH1I *GetHQvsN() { return fHQvsN; }
105 const TH1I *GetHQvsN() const { return fHQvsN; }
106
107 Bool_t FitQ(Option_t *option="RQ0+");
108 Bool_t FitT(Axis_t rmin=0, Axis_t rmax=0, Option_t *option="RQ0+");
109
110 virtual void Draw(Option_t *option="");
111 virtual void CutAllEdges();
112 virtual void Reset();
113
114 void SetLowerFitRange(Axis_t min) { fLowerFitRange = min; }
115
116 void PrintQFitResult();
117 void PrintTFitResult();
118
119 Bool_t IsFitted() { return fFitOK; }
120
121 ClassDef(MHCalibrationPixel, 1)
122};
123
124#endif
Note: See TracBrowser for help on using the repository browser.