source: releases/Mars.2014.05.26/mhflux/MHFalseSource.h@ 19602

Last change on this file since 19602 was 9153, checked in by tbretz, 16 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{
22protected:
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
30private:
31 Float_t fAlphaCut; // Alpha cut
32 Float_t fBgMean; // Background mean
33
34 Float_t fMinDist; // Min dist
35 Float_t fMaxDist; // Max dist
36
37 Float_t fMinDW; // Minimum distance in percent of dist
38 Float_t fMaxDW; // Maximum distance in percent of dist
39
40protected:
41 TH3D fHist; // Alpha vs. x and y
42
43 const TH3D *fHistOff;
44
45 Double_t fRa;
46 Double_t fDec;
47
48 TObject *GetCatalog() const;
49 void MakeSymmetric(TH1 *h);
50
51private:
52 Int_t DistancetoPrimitive(Int_t px, Int_t py);
53 void Modified();
54
55 void ProjectAll(TH2D *h);
56 void ProjectOff(const TH3D &src, TH2D *h, TH2D *all);
57 void ProjectOn(const TH3D &src, TH2D *h, TH2D *all);
58 void ProjectOnOff(TH2D *h, TH2D *all);
59
60public:
61 MHFalseSource(const char *name=NULL, const char *title=NULL);
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 virtual 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 void DrawNicePlot() const; //*MENU*
90
91 // MParContainer
92 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print=kFALSE);
93
94 // MH
95 Bool_t SetupFill(const MParList *pList);
96 Int_t Fill(const MParContainer *par, const Stat_t w=1);
97
98 // TObject
99 void Paint(Option_t *opt="");
100 void Draw(Option_t *option="");
101
102 ClassDef(MHFalseSource, 1) //3D-histogram in alpha, x and y
103};
104
105#endif
Note: See TracBrowser for help on using the repository browser.