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

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