1 | #ifndef MARS_MHDisp
|
---|
2 | #define MARS_MHDisp
|
---|
3 |
|
---|
4 | #ifndef MARS_MHFalseSource
|
---|
5 | #include "MHFalseSource.h"
|
---|
6 | #endif
|
---|
7 | #ifndef ROOT_TH2
|
---|
8 | #include <TH2.h>
|
---|
9 | #endif
|
---|
10 | #ifndef ROOT_TVector2
|
---|
11 | #include <TVector2.h>
|
---|
12 | #endif
|
---|
13 |
|
---|
14 | class MParList;
|
---|
15 | class MHillasExt;
|
---|
16 | class MHillasSrc;
|
---|
17 | class MParameterD;
|
---|
18 |
|
---|
19 | class MHDisp : public MHFalseSource
|
---|
20 | {
|
---|
21 | private:
|
---|
22 | MHillasExt *fHilExt; //!
|
---|
23 | MHillasSrc *fHilSrc; //!
|
---|
24 | MParameterD *fDisp; //!
|
---|
25 |
|
---|
26 | TH2D fHistBg;
|
---|
27 |
|
---|
28 | TH2D fHistBg1;
|
---|
29 | TH2D fHistBg2;
|
---|
30 |
|
---|
31 | TVector2 fFormerSrc;
|
---|
32 | Bool_t fHalf;
|
---|
33 |
|
---|
34 | Double_t fSmearing;
|
---|
35 | Bool_t fWobble;
|
---|
36 |
|
---|
37 | // MHDisp
|
---|
38 | Double_t GetOffSignal(TH1 &h) const;
|
---|
39 | Double_t DeltaPhiSrc(const TVector2 &v) const;
|
---|
40 |
|
---|
41 | void Profile(TH1 &h2, const TH2 &h1, Axis_t x0=0, Axis_t y0=0) const;
|
---|
42 | void MakeSignificance(TH2 &s, const TH2 &h1, const TH2 &h2, const Double_t scale=1) const;
|
---|
43 | void MakeDot(TH2 &h2) const;
|
---|
44 |
|
---|
45 | Double_t Sq(Double_t x, Double_t y) const { return x*x+y*y; }
|
---|
46 |
|
---|
47 | public:
|
---|
48 | MHDisp(const char *name=NULL, const char *title=NULL);
|
---|
49 |
|
---|
50 | // MHDisp
|
---|
51 | void SetSmearing(Double_t s=-1) { fSmearing=s; }
|
---|
52 | void SetWobble(Bool_t w=kTRUE) { fWobble=w; }
|
---|
53 |
|
---|
54 | // MHFalseSource (to be moved!)
|
---|
55 | void SetOffData(const MHFalseSource &fs)
|
---|
56 | {
|
---|
57 | MHFalseSource::SetOffData(fs);
|
---|
58 | if (dynamic_cast<const MHDisp*>(&fs))
|
---|
59 | {
|
---|
60 | const MHDisp &h = dynamic_cast<const MHDisp&>(fs);
|
---|
61 | fWobble = h.fWobble;
|
---|
62 | fSmearing = h.fSmearing;
|
---|
63 |
|
---|
64 | h.fHistBg1.Copy(fHistBg1);
|
---|
65 | h.fHistBg2.Copy(fHistBg2);
|
---|
66 |
|
---|
67 | fHistBg1.SetDirectory(0);
|
---|
68 | fHistBg2.SetDirectory(0);
|
---|
69 | }
|
---|
70 | }
|
---|
71 |
|
---|
72 | // MH
|
---|
73 | Bool_t SetupFill(const MParList *pList);
|
---|
74 | Bool_t Fill(const MParContainer *par, const Stat_t w=1);
|
---|
75 | Bool_t Finalize();
|
---|
76 |
|
---|
77 | // TObject
|
---|
78 | void Paint(Option_t *o="");
|
---|
79 | void Draw(Option_t *o="");
|
---|
80 |
|
---|
81 | // MParContainer
|
---|
82 | Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print=kFALSE);
|
---|
83 |
|
---|
84 | ClassDef(MHDisp, 2) //Class to provide a Disp map
|
---|
85 | };
|
---|
86 |
|
---|
87 | #endif
|
---|