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

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