source: branches/AddingGoogleTestEnvironment/mtemp/mmpi/MSkyPlot.h@ 19779

Last change on this file since 19779 was 6190, checked in by mazin, 20 years ago
*** empty log message ***
File size: 6.2 KB
Line 
1#ifndef MARS_MSkyPlot
2#define MARS_MSkyPlot
3
4#ifndef MARS_MTask
5#include "MTask.h"
6#endif
7
8#ifndef ROOT_TH2
9#include <TH2.h>
10#endif
11
12#ifndef ROOT_TH1
13#include <TH1.h>
14#endif
15
16#ifndef ROOT_TOrdCollection
17#include <TOrdCollection.h>
18#endif
19
20class TH2D;
21class TH1D;
22
23class MParList;
24class MTime;
25class MPointingPos;
26class MSrcPosCam;
27class MReportDrive;
28class MObservatory;
29class MHillas;
30class MHillasExt;
31class MHillasSrc;
32class MNewImagePar;
33class MHadronness;
34class MGeomCam;
35class TOrdCollection;
36class MSkyPlot : public MTask
37{
38private:
39
40 MGeomCam *fGeomCam; //! container to take the event time from
41 MTime *fTime; //! container to take the event time from
42 MPointingPos *fPointPos; //! container to take pointing position from
43 MReportDrive *fRepDrive; //!
44 MSrcPosCam *fSrcPosCam; //! container with x and y of the source
45 MSrcPosCam *fPntPosCam; //! container with x and y of the position MReportDrive.GetRa, MReportDrive.GetDec
46 MObservatory *fObservatory; //! container to take observatory location from
47 MHillas *fHillas; //!
48 MHillasExt *fHillasExt; //!
49 MHillasSrc *fHillasSrc; //!
50 MNewImagePar *fNewImagePar; //!
51 MHadronness *fHadron; //!
52
53 TOrdCollection *fHistAlpha; // vector of histograms for alpha
54
55 Float_t fMm2Deg; // conversion factor for display in degrees
56 Double_t fGridBinning; // degrees
57 Double_t fGridFineBin; // degrees
58
59// Float_t fAlphaCut; // Alpha cut
60// Float_t fBgMean; // Background mean
61
62// Float_t fMinDist; // Min dist
63// Float_t fMaxDist; // Max dist
64
65// Float_t fMinLD; // Minimum distance in percent of dist
66// Float_t fMaxLD; // Maximum distance in percent of dist
67
68 Int_t fNumalphahist; // number of histograms for alpha
69 Int_t fNumBinsAlpha;
70 Float_t fHistAlphaBinWidth;
71 Float_t fAlphaLeftEdge;
72 Float_t fAlphaRightEdge;
73 Float_t fAlphaONMax; // [deg] , upper cut for alpha ON region in the alpha plot, [deg], ON region in the alpha plot, maybe 5 deg is better, NOTE: up to now only values of 5, 10, 15, 20 degrees are possible
74 Float_t fAlphaBgLow; // lower limit for bg region in the ON alpha plot
75 Float_t fAlphaBgUp; // upper limit for bg region in the ON alpha plot
76
77 TH2D fHistSignif; // sky plot of significance vs. x and y
78 TH2D fHistNexcess; // sky plot of number of excess events vs. x and y
79 TH2D fHistOn; // sky plot of events below fAlphaONMax vs. x and y
80 TH1D fHistSignifGaus; // distribution of significance
81 Bool_t fSetCenter; // used to set the center of these histograms once
82 Bool_t fUseRF; // use RF hadronness cut instead of supercuts
83 Double_t fRa0; //
84 Double_t fDec0; //
85 Bool_t fSaveAlphaPlots; //
86 Bool_t fSaveSkyPlots; //
87 Bool_t fSaveNexPlot; //
88
89 Float_t fMinXGrid; // [deg] , left edge of the skyplot
90 Float_t fMaxXGrid; // [deg] , right edge of the skyplot
91 Float_t fMinYGrid; // [deg] , upper edge of the skyplot
92 Float_t fMaxYGrid; // [deg] , lower edge of the skyplot
93 Float_t fBinStepGrid; // [deg] , grid size
94 Int_t fNumStepsX; // number of bins in x
95 Int_t fNumStepsY; // number of bins in y
96
97
98 // some filter cuts:
99 Float_t fSizeMin; // min size in photons
100 Float_t fSizeMax; // max size in photons
101 Float_t fLeakMax; // leakmax in per cent
102 Float_t fMaxDist; // dist max cut (ever possible)
103 Float_t fMinDist; // dist min cut (ever possible)
104 Float_t fHadrCut; // hadronness cut
105
106 // coefficients for the cuts:
107 Double_t fLengthUp[8], fLengthLo[8], fWidthUp[8], fWidthLo[8], fDistUp[8], fDistLo[8];
108
109 Double_t fRa;
110 Double_t fDec;
111
112 TString fAlphaHName; // name for histogram with alpha plots
113 TString fSkyHName; // name for histogram with sky plots
114 TString fNexHName; // name for canvas with Nex plot
115 Float_t fElaTime; // elapsed time [min]
116
117 TObject *GetCatalog();
118
119 Int_t PreProcess(MParList *pList);
120 Int_t Process();
121 Int_t PostProcess();
122
123
124public:
125 MSkyPlot(const char *name=NULL, const char *title=NULL);
126 ~MSkyPlot();
127
128 Double_t CalcLimit(Double_t *a, Double_t ls, Double_t ls2, Double_t dd2);
129
130 TH2D *GetHistSignif () { return &fHistSignif; }
131 TH2D *GetHistNexcess () { return &fHistNexcess; }
132 TH2D *GetHistOn () { return &fHistOn; }
133 TH1D *GetHistSignifGaus() { return &fHistSignifGaus; }
134
135 Int_t GetSize() const { return fHistAlpha->GetSize(); }
136
137 TH1D *GetAlphaPlot( const Int_t i=-1);
138 const TH1D *GetAlphaPlot( const Int_t=-1) const;
139
140 void ReadCuts(const TString parSCinit);
141
142 void SaveAlphaPlots(const TString stri2);
143 void SaveNexPlot(const TString stri3);
144 void SaveSkyPlots(TString stri);
145
146 void SetAlphaCut(Float_t alpha);
147 void SetAlphaBGLimits(Float_t alphalow, Float_t alphalup);
148
149 void SetMinDist(Float_t dist) { fMinDist = dist; } // Absolute minimum distance
150 void SetMaxDist(Float_t dist) { fMaxDist = dist; } // Absolute maximum distance
151 void SetSizeMin(Float_t size) { fSizeMin = size; } // Absolute minimum Size
152 void SetSizeMax(Float_t size) { fSizeMax = size; } // Absolute maximum Size
153 void SetSkyPlot(Float_t xmin, Float_t xmax, Float_t ymin, Float_t ymax, Float_t step);
154 void SetHadrCut(Float_t b) { fHadrCut = b; } // hadronness cut
155
156 void SetOutputSkyName(TString outname2) { fSkyHName = outname2; }
157 void SetNotSaveSkyPlots() { fSaveSkyPlots = kFALSE; }
158
159 void SetOutputAlphaName(TString outname1) { fAlphaHName = outname1; }
160 void SetNotSaveAlphaPlots() { fSaveAlphaPlots = kFALSE; }
161
162 void SetOutputNexName(TString outname3) { fNexHName = outname3; }
163 void SetElapsedTime(Float_t g) { fElaTime = g; }
164 void SetNotSaveNexPlot() { fSaveNexPlot = kFALSE; }
165
166 void SetUseRF() { fUseRF = kTRUE; }
167
168 ClassDef(MSkyPlot, 1) //2D-histogram in alpha, x and y
169};
170
171#endif
Note: See TracBrowser for help on using the repository browser.