source: trunk/MagicSoft/Mars/mhist/MHFalseSource.h@ 3671

Last change on this file since 3671 was 3666, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 2.3 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 MPointingPos;
17class MObservatory;
18
19class MHFalseSource : public MH
20{
21private:
22 MTime *fTime; //! container to take the event time from
23 MPointingPos *fPointPos; //! container to take pointing position from
24 MObservatory *fObservatory; //! conteiner to take observatory location from
25
26 Float_t fMm2Deg; // conversion factor for display in degrees
27
28 Float_t fAlphaCut; // Alpha cut
29 Float_t fBgMean; // Background mean
30
31 Float_t fDistMin; // Min dist
32 Float_t fDistMax; // Maximum distance in percent of dist
33
34 TH3D fHist; // Alpha vs. x and y
35
36 Double_t fRa;
37 Double_t fDec;
38
39 Int_t DistancetoPrimitive(Int_t px, Int_t py);
40 void Modified();
41
42 void ProjectOff(TH2D *h);
43 void ProjectOn(TH2D *h);
44 void ProjectAll(TH2D *h);
45
46 TObject *GetCatalog();
47
48public:
49 MHFalseSource(const char *name=NULL, const char *title=NULL);
50
51 Bool_t SetupFill(const MParList *pList);
52 Bool_t Fill(const MParContainer *par, const Stat_t w=1);
53
54 TH1 *GetHistByName(const TString name) { return &fHist; }
55
56 void FitSignificance(Float_t sigint=15, Float_t sigmax=70, Float_t bgmin=40, Float_t bgmax=70, Byte_t polynom=1); //*MENU*
57 void FitSignificanceStd() { FitSignificance(); } //*MENU*
58
59 void SetDistMin(Float_t dist) { fDistMin = dist; } // Absolute minimum distance
60 void SetDistMax(Float_t ratio) { fDistMax = ratio; } // Maximum ratio between length/dist
61
62 void SetAlphaCut(Float_t alpha); //*MENU*
63 void SetAlphaPlus5() { SetAlphaCut(fAlphaCut+5); } //*MENU*
64 void SetAlphaMinus5() { SetAlphaCut(fAlphaCut-5); } //*MENU*
65
66 void SetBgMean(Float_t alpha); //*MENU*
67 void SetBgMeanPlus5() { SetBgMean(fBgMean+5); } //*MENU*
68 void SetBgMeanMinus5() { SetBgMean(fBgMean-5); } //*MENU*
69
70 void Paint(Option_t *opt="");
71 void Draw(Option_t *option="");
72
73 static Double_t Significance(Double_t s, Double_t b);
74 static Double_t SignificanceLiMa(Double_t s, Double_t b, Double_t alpha=1);
75
76 ClassDef(MHFalseSource, 1) //3D-histogram in alpha, x and y
77};
78
79#endif
Note: See TracBrowser for help on using the repository browser.