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

Last change on this file since 7248 was 7217, checked in by tbretz, 19 years ago
*** empty log message ***
File size: 2.0 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;
19
20class MHDisp : public MHFalseSource
21{
22private:
23 MParameterD *fDisp; //!
24 MPointingDev *fDeviation; //!
25
26 TH2D fHistBg;
27 TH2D fHistBg1;
28 TH2D fHistBg2;
29
30 TVector2 fFormerSrc;
31 Bool_t fHalf;
32
33 Double_t fSmearing;
34 Bool_t fWobble;
35
36 // MHDisp
37 Double_t GetOffSignal(TH1 &h) const;
38 Double_t DeltaPhiSrc(const TVector2 &v) const;
39
40 void Profile1D(const char *name, const TH2 &h) const;
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
47public:
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
Note: See TracBrowser for help on using the repository browser.