1 | #ifndef MARS_MHAlpha
|
---|
2 | #define MARS_MHAlpha
|
---|
3 |
|
---|
4 | #ifndef MARS_MH
|
---|
5 | #include "MH.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | #ifndef MARS_MTime
|
---|
9 | #include "MTime.h"
|
---|
10 | #endif
|
---|
11 |
|
---|
12 | #ifndef MARS_MAlphaFitter
|
---|
13 | #include "MAlphaFitter.h"
|
---|
14 | #endif
|
---|
15 |
|
---|
16 | #ifndef ROOT_TH3
|
---|
17 | #include <TH3.h>
|
---|
18 | #endif
|
---|
19 |
|
---|
20 | class MParList;
|
---|
21 | class MParameterD;
|
---|
22 | class MEnergyEst;
|
---|
23 | class MHMatrix;
|
---|
24 | class MPointingPos;
|
---|
25 |
|
---|
26 | /*
|
---|
27 | class MAlphaFitter : public MParContainer
|
---|
28 | {
|
---|
29 | private:
|
---|
30 | Float_t fSigInt;
|
---|
31 | Float_t fSigMax;
|
---|
32 | Float_t fBgMin;
|
---|
33 | Float_t fBgMax;
|
---|
34 | Int_t fPolynom;
|
---|
35 |
|
---|
36 | Double_t fSignificance;
|
---|
37 | Double_t fExcessEvents;
|
---|
38 | Double_t fChiSqSignal;
|
---|
39 | Double_t fChiSqBg;
|
---|
40 | Double_t fSigmaGaus;
|
---|
41 | Double_t fIntegralMax;
|
---|
42 |
|
---|
43 | public:
|
---|
44 | MAlphaFitter() : fSigInt(10), fSigMax(75), fBgMin(45), fBgMax(85), fPolynom(2)
|
---|
45 | {
|
---|
46 | }
|
---|
47 |
|
---|
48 | MAlphaFitter(const MAlphaFitter &f)
|
---|
49 | {
|
---|
50 | f.Copy(*this);
|
---|
51 | }
|
---|
52 |
|
---|
53 | void Copy(TObject &o) const
|
---|
54 | {
|
---|
55 | MAlphaFitter &f = static_cast<MAlphaFitter&>(o);
|
---|
56 |
|
---|
57 | f.fSigInt = fSigInt;
|
---|
58 | f.fSigMax = fSigMax;
|
---|
59 | f.fBgMin = fBgMin;
|
---|
60 | f.fBgMax = fBgMax;
|
---|
61 | f.fPolynom = fPolynom;
|
---|
62 | }
|
---|
63 |
|
---|
64 | void SetSignalIntegralMax(Float_t s) { fSigInt = s; }
|
---|
65 | void SetSignalFitMax(Float_t s) { fSigMax = s; }
|
---|
66 | void SetBackgroundFitMin(Float_t s) { fBgMin = s; }
|
---|
67 | void SetBackgroundFitMax(Float_t s) { fBgMax = s; }
|
---|
68 | void SetNumPolynom(Int_t s) { fPolynom = s; }
|
---|
69 |
|
---|
70 | Double_t GetExcessEvents() const { return fExcessEvents; }
|
---|
71 | Double_t GetSignificance() const { return fSignificance; }
|
---|
72 | Double_t GetChiSqSignal() const { return fChiSqSignal; }
|
---|
73 | Double_t GetChiSqBg() const { return fChiSqBg; }
|
---|
74 | Double_t GetSigmaGaus() const { return fSigmaGaus; }
|
---|
75 |
|
---|
76 | void PaintResult(Float_t x=0.04, Float_t y=0.94, Float_t size=0.035) const;
|
---|
77 |
|
---|
78 | Bool_t Fit(TH1D &h, Bool_t paint=kFALSE);
|
---|
79 | ClassDef(MAlphaFitter, 1)
|
---|
80 | };
|
---|
81 | */
|
---|
82 |
|
---|
83 | class MHAlpha : public MH
|
---|
84 | {
|
---|
85 | private:
|
---|
86 | MAlphaFitter fFit; //! SEEMS THAT STREAMER HAS SOME PROBLEMS... MAYBE IF FUNC IS USED AT THE SAME TIME FOR FITS (PAINT)
|
---|
87 |
|
---|
88 | TH3D fHAlpha; // Alpha vs. theta and energy
|
---|
89 | TH1D fHEnergy; // excess events vs energy
|
---|
90 | TH1D fHTheta; // excess events vs theta
|
---|
91 | TH1D fHTime; // excess events vs time;
|
---|
92 | TH1D fHAlphaTime; //! temporary histogram to get alpha vs. time
|
---|
93 |
|
---|
94 | MParameterD *fResult; //!
|
---|
95 | MEnergyEst *fEnergy; //!
|
---|
96 | MPointingPos *fPointPos; //!
|
---|
97 |
|
---|
98 | MTime *fTimeEffOn; //! Time to steer filling of fHTime
|
---|
99 | MTime *fTime; //! Event-Time to finalize fHTime
|
---|
100 | MTime fLastTime; //! Last fTimeEffOn
|
---|
101 |
|
---|
102 | const TString fNameProjAlpha; //! This should make sure, that gROOT doen't confuse the projection with something else
|
---|
103 |
|
---|
104 | MHMatrix *fMatrix; //!
|
---|
105 | Int_t fMap[2]; //!
|
---|
106 |
|
---|
107 | void FitEnergySpec(Bool_t paint=kFALSE);
|
---|
108 | void FitEnergyBins(Bool_t paint=kFALSE);
|
---|
109 | void FitThetaBins(Bool_t paint=kFALSE);
|
---|
110 |
|
---|
111 | void UpdateAlphaTime(Bool_t final=kFALSE);
|
---|
112 | void InitAlphaTime(const MTime &t);
|
---|
113 | void FinalAlphaTime(MBinning &bins);
|
---|
114 |
|
---|
115 | void PaintText(Double_t val, Double_t error) const;
|
---|
116 |
|
---|
117 | public:
|
---|
118 | MHAlpha(const char *name=NULL, const char *title=NULL);
|
---|
119 |
|
---|
120 | Bool_t SetupFill(const MParList *pl);
|
---|
121 | Bool_t Fill(const MParContainer *par, const Stat_t w=1);
|
---|
122 | Bool_t Finalize();
|
---|
123 |
|
---|
124 | const TH3D &GetHist() const { return fHAlpha; }
|
---|
125 | const MAlphaFitter &GetAlphaFitter() const { return fFit; }
|
---|
126 |
|
---|
127 | void Paint(Option_t *opt="");
|
---|
128 | void Draw(Option_t *option="");
|
---|
129 |
|
---|
130 | void InitMapping(MHMatrix *mat);
|
---|
131 | void StopMapping();
|
---|
132 |
|
---|
133 | ClassDef(MHAlpha, 1) // Alpha-Plot which is fitted online
|
---|
134 | };
|
---|
135 |
|
---|
136 | #endif
|
---|