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

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