source: trunk/MagicSoft/Mars/mhflux/MHFalseSource.h@ 7178

Last change on this file since 7178 was 7178, checked in by tbretz, 19 years ago
*** empty log message ***
File size: 3.0 KB
Line 
1#ifndef MARS_MHFalseSource
2#define MARS_MHFalseSource
3
4#ifndef MARS_MH
5#include "MH.h"
6#endif
7
8#ifndef ROOT_TH3
9#include <TH3.h>
10#endif
11
12class TH2D;
13
14class MParList;
15class MTime;
16class MSrcPosCam;
17class MPointingPos;
18class MObservatory;
19
20class MHFalseSource : public MH
21{
22protected:
23 MTime *fTime; //! container to take the event time from
24 MPointingPos *fPointPos; //! container to take pointing position from
25 MSrcPosCam *fSrcPos; //! container for sopurce position in camera
26 MObservatory *fObservatory; //! conteiner to take observatory location from
27
28 Float_t fMm2Deg; // conversion factor for display in degrees
29
30private:
31 Float_t fAlphaCut; // Alpha cut
32 Float_t fBgMean; // Background mean
33
34 Float_t fMinDist; // Min dist
35 Float_t fMaxDist; // Max dist
36
37 Float_t fMinDW; // Minimum distance in percent of dist
38 Float_t fMaxDW; // Maximum distance in percent of dist
39
40protected:
41 TH3D fHist; // Alpha vs. x and y
42
43 const TH3D *fHistOff;
44
45 Double_t fRa;
46 Double_t fDec;
47
48 TObject *GetCatalog();
49
50private:
51 Int_t DistancetoPrimitive(Int_t px, Int_t py);
52 void Modified();
53
54 void ProjectAll(TH2D *h);
55 void ProjectOff(const TH3D &src, TH2D *h, TH2D *all);
56 void ProjectOn(const TH3D &src, TH2D *h, TH2D *all);
57 void ProjectOnOff(TH2D *h, TH2D *all);
58
59 void MakeSymmetric(TH1 *h);
60
61public:
62 MHFalseSource(const char *name=NULL, const char *title=NULL);
63
64 void FitSignificance(Float_t sigint=10, Float_t sigmax=75, Float_t bgmin=45, Float_t bgmax=85, Byte_t polynom=2); //*MENU*
65 void FitSignificanceStd() { FitSignificance(); } //*MENU*
66
67 void SetMinDist(Float_t dist) { fMinDist = dist; } // Absolute minimum distance
68 void SetMaxDist(Float_t dist) { fMaxDist = dist; } // Absolute maximum distance
69 void SetMinDW(Float_t ratio) { fMinDW = ratio; } // Minimum ratio between length/dist
70 void SetMaxDW(Float_t ratio) { fMaxDW = ratio; } // Maximum ratio between length/dist
71
72 void SetAlphaCut(Float_t alpha); //*MENU*
73 void SetAlphaPlus5() { SetAlphaCut(fAlphaCut+5); } //*MENU*
74 void SetAlphaMinus5() { SetAlphaCut(fAlphaCut-5); } //*MENU*
75
76 void SetBgMean(Float_t alpha); //*MENU*
77 void SetBgMeanPlus5() { SetBgMean(fBgMean+5); } //*MENU*
78 void SetBgMeanMinus5() { SetBgMean(fBgMean-5); } //*MENU*
79
80 virtual void SetOffData(const MHFalseSource &fs) {
81 fHistOff = &fs.fHist;
82 fMinDist = fs.fMinDist;
83 fMaxDist = fs.fMaxDist;
84 fMaxDW = fs.fMaxDW;
85 fMinDW = fs.fMinDW;
86 fAlphaCut = fs.fAlphaCut;
87 fBgMean = fs.fBgMean;
88 }
89
90 // MParContainer
91 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print=kFALSE);
92
93 // MH
94 Bool_t SetupFill(const MParList *pList);
95 Bool_t Fill(const MParContainer *par, const Stat_t w=1);
96
97 // TObject
98 void Paint(Option_t *opt="");
99 void Draw(Option_t *option="");
100
101 ClassDef(MHFalseSource, 1) //3D-histogram in alpha, x and y
102};
103
104#endif
Note: See TracBrowser for help on using the repository browser.