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

Last change on this file since 2566 was 2538, checked in by gaug, 21 years ago
*** empty log message ***
File size: 2.9 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 fQfirst;
44 Axis_t fQlast;
45 Int_t fQnbins;
46
47 Bool_t fFitOK;
48
49 Double_t fQChisquare;
50 Double_t fQProb;
51 Int_t fQNdf;
52
53 Double_t fQMean;
54 Double_t fQMeanErr;
55 Double_t fQSigma;
56 Double_t fQSigmaErr;
57
58 Double_t fTChisquare;
59 Double_t fTProb;
60 Int_t fTNdf;
61
62 Double_t fTMean;
63 Double_t fTSigma;
64
65 virtual void DrawLegend();
66
67public:
68
69 MHCalibrationPixel(Int_t pix=-1, const char *name=NULL, const char *title=NULL);
70 ~MHCalibrationPixel();
71
72 Bool_t SetupFill(const MParList *pList);
73 Bool_t Fill(const MParContainer *, const Stat_t w=1) { return kTRUE; }
74
75 Bool_t FillQ(Int_t q) { return fHQ->Fill(q) > -1; }
76 Bool_t FillT(Int_t t) { return fHT->Fill(t) > -1; }
77 Bool_t FillQvsN(Float_t q, Int_t n) { return fHQvsN->Fill(n,q) > -1; }
78
79 const TH1I *GetHQ() { return fHQ; }
80 const TH1I *GetHQ() const { return fHQ; }
81
82 const Double_t GetQMean() const { return fQMean; }
83 const Double_t GetQMeanErr() const { return fQMeanErr; }
84 const Double_t GetQSigma() const { return fQSigma; }
85 const Double_t GetQSigmaErr() const { return fQSigmaErr; }
86 const Double_t GetArea() const { return fQGausFit->GetParameter(0); }
87 const Double_t GetAreaErr() const { return fQGausFit->GetParError(0); }
88
89 const Double_t GetQChiSquare() const { return fQChisquare; }
90 const Double_t GetQProb() const { return fQProb; }
91 const Int_t GetQNdf() const { return fQNdf; }
92
93 const Double_t GetTMean() const { return fTMean; }
94 const Double_t GetTSigma() const { return fTSigma; }
95
96 const Double_t GetTChiSquare() const { return fTChisquare; }
97 const Double_t GetTProb() const { return fTProb; }
98 const Int_t GetTNdf() const { return fTNdf; }
99
100 const TH1I *GetHT() { return fHT; }
101 const TH1I *GetHT() const { return fHT; }
102
103 const TH1I *GetHQvsN() { return fHQvsN; }
104 const TH1I *GetHQvsN() const { return fHQvsN; }
105
106 Bool_t FitQ(Axis_t rmin=0, Axis_t rmax=0, Option_t *option="RQ0+");
107 Bool_t FitT(Axis_t rmin=0, Axis_t rmax=0, Option_t *option="RQ0+");
108
109 virtual void Draw(Option_t *option="");
110 virtual void CutAllEdges();
111 virtual void Reset();
112
113 void PrintQFitResult();
114 void PrintTFitResult();
115
116 Bool_t IsFitted() { return fFitOK; }
117
118 ClassDef(MHCalibrationPixel, 1)
119};
120
121#endif
Note: See TracBrowser for help on using the repository browser.