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

Last change on this file since 7008 was 6978, 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{
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 void FitSignificance(Float_t sigint=10, Float_t sigmax=75, Float_t bgmin=45, Float_t bgmax=85, Byte_t polynom=2); //*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 SetMinDW(Float_t ratio) { fMinDW = ratio; } // Minimum ratio between length/dist
67 void SetMaxDW(Float_t ratio) { fMaxDW = 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 SetOffData(const MHFalseSource &fs) {
78 fHistOff = &fs.fHist;
79 fMinDist = fs.fMinDist;
80 fMaxDist = fs.fMaxDist;
81 fMaxDW = fs.fMaxDW;
82 fMinDW = fs.fMinDW;
83 fAlphaCut = fs.fAlphaCut;
84 fBgMean = fs.fBgMean;
85 }
86
87 // MParContainer
88 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print=kFALSE);
89
90 // MH
91 Bool_t SetupFill(const MParList *pList);
92 Bool_t Fill(const MParContainer *par, const Stat_t w=1);
93
94 // TObject
95 void Paint(Option_t *opt="");
96 void Draw(Option_t *option="");
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.