source: trunk/MagicSoft/Mars/mhflux/MHDisp.h@ 9434

Last change on this file since 9434 was 9153, checked in by tbretz, 16 years ago
*** empty log message ***
File size: 2.8 KB
Line 
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
14class MParList;
15class MHillasExt;
16class MHillasSrc;
17class MParameterD;
18class MPointingDev;
19class MSrcPosCam;
20
21class MHDisp : public MHFalseSource
22{
23private:
24 MParameterD *fDisp; //!
25 MPointingDev *fDeviation; //!
26 //MSrcPosCam *fAxis; //!
27 MSrcPosCam *fSrcAnti; //!
28
29
30 TH2D fHistBg;
31 TH2D fHistBg1;
32 TH2D fHistBg2;
33
34 TVector2 fFormerSrc;
35 Bool_t fHalf;
36
37 Double_t fSmearing; // [deg] Width of Gaus to fold with the events
38 Bool_t fWobble; // This is for Wobble-Mode observations
39
40 Double_t fScaleMin; // [deg] Minimum circle for integration of off-data for scaling
41 Double_t fScaleMax; // [deg] Maximum circle for integration of off-data for scaling
42
43 // MHDisp
44 Double_t GetOffSignal(TH1 &h) const;
45
46 void Update();
47
48 void Profile1D(const char *name, const TH2 &h) const;
49 void Profile(TH1 &h2, const TH2 &h1, Axis_t x0=0, Axis_t y0=0) const;
50 void MakeSignificance(TH2 &s, const TH2 &h1, const TH2 &h2, const Double_t scale=1) const;
51 void MakeDot(TH2 &h2) const;
52
53 Double_t Sq(Double_t x, Double_t y) const { return x*x+y*y; }
54
55public:
56 MHDisp(const char *name=NULL, const char *title=NULL);
57
58 // MHDisp
59 void SetSmearing(Double_t s=-1) { fSmearing=s; }
60 void SetWobble(Bool_t w=kTRUE) { fWobble=w; }
61
62 void SetScaleMin(Double_t scale) { fScaleMin = scale; Update(); } //*MENU* *ARGS={scale=>fScaleMin}
63 void SetScaleMax(Double_t scale) { fScaleMax = scale; Update(); } //*MENU* *ARGS={scale=>fScaleMax}
64 void SetScale(Double_t min, Double_t max) { fScaleMin = min; fScaleMax = max; Update(); } //*MENU* *ARGS={min=>fScaleMin,max=>fScaleMax}
65
66 Double_t GetScaleMin() { return fScaleMin; }
67 Double_t GetScaleMax() { return fScaleMax; }
68
69 // MHFalseSource (to be moved!)
70 void SetOffData(const MHFalseSource &fs)
71 {
72 MHFalseSource::SetOffData(fs);
73 if (dynamic_cast<const MHDisp*>(&fs))
74 {
75 const MHDisp &h = dynamic_cast<const MHDisp&>(fs);
76 fWobble = h.fWobble;
77 fSmearing = h.fSmearing;
78
79 h.fHistBg1.Copy(fHistBg1);
80 h.fHistBg2.Copy(fHistBg2);
81
82 fHistBg1.SetDirectory(0);
83 fHistBg2.SetDirectory(0);
84 }
85 }
86
87 // MH
88 Bool_t SetupFill(const MParList *pList);
89 Int_t Fill(const MParContainer *par, const Stat_t w=1);
90 Bool_t Finalize();
91
92 // TObject
93 void Paint(Option_t *o="");
94 void Draw(Option_t *o="");
95
96 // MParContainer
97 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print=kFALSE);
98
99 ClassDef(MHDisp, 3) //Class to provide a Disp map
100};
101
102#endif
Note: See TracBrowser for help on using the repository browser.