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

Last change on this file since 5972 was 5957, 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 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 SetMinDW(Float_t ratio) { fMinDW = ratio; } // Minimum ratio between length/dist
69 void SetMaxDW(Float_t ratio) { fMaxDW = 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 SetOffData(const MHFalseSource &fs) {
80 fHistOff = &fs.fHist;
81 fMinDist = fs.fMinDist;
82 fMaxDist = fs.fMaxDist;
83 fMaxDW = fs.fMaxDW;
84 fMinDW = fs.fMinDW;
85 fAlphaCut = fs.fAlphaCut;
86 fBgMean = fs.fBgMean;
87 }
88
89 // MParContainer
90 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print=kFALSE);
91
92 // MH
93 Bool_t SetupFill(const MParList *pList);
94 Bool_t Fill(const MParContainer *par, const Stat_t w=1);
95
96 // TObject
97 void Paint(Option_t *opt="");
98 void Draw(Option_t *option="");
99
100 ClassDef(MHFalseSource, 1) //3D-histogram in alpha, x and y
101};
102
103#endif
Note: See TracBrowser for help on using the repository browser.