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

Last change on this file since 5939 was 5776, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 3.1 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{
22private:
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
30 Float_t fAlphaCut; // Alpha cut
31 Float_t fBgMean; // Background mean
32
33 Float_t fMinDist; // Min dist
34 Float_t fMaxDist; // Max dist
35
36 Float_t fMinDW; // Minimum distance in percent of dist
37 Float_t fMaxDW; // Maximum distance in percent of dist
38
39 TH3D fHist; // Alpha vs. x and y
40
41 const TH3D *fHistOff;
42
43 Double_t fRa;
44 Double_t fDec;
45
46 Int_t DistancetoPrimitive(Int_t px, Int_t py);
47 void Modified();
48
49 void ProjectAll(TH2D *h);
50 void ProjectOff(const TH3D &src, TH2D *h, TH2D *all);
51 void ProjectOn(const TH3D &src, TH2D *h, TH2D *all);
52 void ProjectOnOff(TH2D *h, TH2D *all);
53
54 TObject *GetCatalog();
55
56 void MakeSymmetric(TH1 *h);
57
58public:
59 MHFalseSource(const char *name=NULL, const char *title=NULL);
60
61 Bool_t SetupFill(const MParList *pList);
62 Bool_t Fill(const MParContainer *par, const Stat_t w=1);
63
64 TH1 *GetHistByName(const TString name) { return &fHist; }
65
66 void FitSignificance(Float_t sigint=10, Float_t sigmax=75, Float_t bgmin=45, Float_t bgmax=85, Byte_t polynom=2); //*MENU*
67 void FitSignificanceStd() { FitSignificance(); } //*MENU*
68
69 void SetMinDist(Float_t dist) { fMinDist = dist; } // Absolute minimum distance
70 void SetMaxDist(Float_t dist) { fMaxDist = dist; } // Absolute maximum distance
71 void SetMinDW(Float_t ratio) { fMinDW = ratio; } // Minimum ratio between length/dist
72 void SetMaxDW(Float_t ratio) { fMaxDW = ratio; } // Maximum ratio between length/dist
73
74 void SetAlphaCut(Float_t alpha); //*MENU*
75 void SetAlphaPlus5() { SetAlphaCut(fAlphaCut+5); } //*MENU*
76 void SetAlphaMinus5() { SetAlphaCut(fAlphaCut-5); } //*MENU*
77
78 void SetBgMean(Float_t alpha); //*MENU*
79 void SetBgMeanPlus5() { SetBgMean(fBgMean+5); } //*MENU*
80 void SetBgMeanMinus5() { SetBgMean(fBgMean-5); } //*MENU*
81
82 void SetOffData(const MHFalseSource &fs) {
83 fHistOff = &fs.fHist;
84 fMinDist = fs.fMinDist;
85 fMaxDist = fs.fMaxDist;
86 fMaxDW = fs.fMaxDW;
87 fMinDW = fs.fMinDW;
88 fAlphaCut = fs.fAlphaCut;
89 fBgMean = fs.fBgMean;
90 }
91
92 void Paint(Option_t *opt="");
93 void Draw(Option_t *option="");
94
95 static Double_t Significance(Double_t s, Double_t b);
96 static Double_t SignificanceLiMa(Double_t s, Double_t b, Double_t alpha=1);
97
98 ClassDef(MHFalseSource, 1) //3D-histogram in alpha, x and y
99};
100
101#endif
Note: See TracBrowser for help on using the repository browser.