source: trunk/Mars/mimage/MHillasCalc.h@ 19329

Last change on this file since 19329 was 18751, checked in by tbretz, 8 years ago
Implemented the possibility to correct for the reflector's abberation - here the outward shift of the CoG of the reflected light of a point source.
File size: 5.3 KB
Line 
1#ifndef MARS_MHillasCalc
2#define MARS_MHillasCalc
3
4/////////////////////////////////////////////////////////////////////////////
5// //
6// MHillasCalkc //
7// //
8// Task to calculate Hillas Parameters //
9// //
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef MARS_MTask
13#include "MTask.h"
14#endif
15#ifndef ROOT_TArrayL
16#include <TArrayL.h>
17#endif
18
19class MGeomCam;
20class MSignalCam;
21class MHillas;
22class MHillasExt;
23class MHillasSrc;
24class MImagePar;
25class MNewImagePar;
26class MNewImagePar2;
27class MConcentration;
28class MSrcPosCam;
29
30class MHillasCalc : public MTask
31{
32 static const TString gsDefName; // default name
33 static const TString gsDefTitle; // default title
34
35 static const TString gsNameHillas; // default name of the 'MHillas' container
36 static const TString gsNameHillasExt; // default name of the 'MHillasExt' container
37 static const TString gsNameNewImagePar; // default name of the 'MNewImagePar' container
38 static const TString gsNameNewImagePar2; // default name of the 'MNewImagePar' container
39 static const TString gsNameConc; // default name of the 'MConcentration' container
40 static const TString gsNameImagePar; // default name of the 'MImagePar' container
41 static const TString gsNameHillasSrc; // default name of the 'MHillasSrc' container
42 static const TString gsNameSrcPosCam; // default name of the 'MSrcPosCam' container
43
44 const MGeomCam *fGeomCam; //! Camera Geometry used to calculate Hillas
45 const MSignalCam *fCerPhotEvt; //! Cerenkov Photon Event used for calculation
46
47 MHillas *fHillas; //! output container to store result
48 MHillasExt *fHillasExt; //! output container to store result
49 MHillasSrc *fHillasSrc; //! output container to store result
50 MImagePar *fImagePar; //! output container to store result
51 MNewImagePar *fNewImgPar; //! output container to store result
52 MNewImagePar2 *fNewImgPar2; //! output container to store result
53 MConcentration *fConc; //! output container to store result
54
55 TString fNameHillas; // name of the 'MHillas' container
56 TString fNameHillasExt; // name of the 'MHillasExt' container
57 TString fNameHillasSrc; // name of the 'MHillasSrc' container
58 TString fNameSrcPosCam; // name of the 'MSrcPosCam' container
59 TString fNameConc; // name of the 'MConcentration' container
60 TString fNameImagePar; // name of the 'MImagePar' container
61 TString fNameNewImagePar; // name of the 'MNewImagePar' container
62 TString fNameNewImagePar2; // name of the 'MNewImagePar' container
63
64 TArrayL fErrors; //! Error counter. Do we have to change to Double?
65
66 Int_t fFlags; // Flags defining the behaviour of MHillasCalc
67 Short_t fIdxIsland; // Number of island to use for calculation
68 Double_t fAbberation; // Correction factor to correct for abberation effects
69
70 // MParContainer
71 void StreamPrimitive(std::ostream &out) const;
72
73 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
74
75 // MTask
76 Int_t PreProcess(MParList *pList);
77 Int_t Process();
78 Int_t PostProcess();
79
80public:
81 // Constructor
82 MHillasCalc(const char *name=NULL, const char *title=NULL);
83
84 // Flags
85 enum CalcCont_t {
86 kCalcHillas = BIT(0),
87 kCalcHillasExt = BIT(1),
88 kCalcHillasSrc = BIT(2),
89 kCalcNewImagePar = BIT(3),
90 kCalcNewImagePar2 = BIT(4),
91 kCalcConc = BIT(5),
92 kCalcImagePar = BIT(6)
93 };
94
95 // Setup flags
96 void SetFlags(Int_t f) { fFlags = f; }
97 void Enable(Int_t f) { fFlags |= f; }
98 void Disable(Int_t f) { fFlags &= ~f; }
99
100 Bool_t TestFlag(CalcCont_t i) const { return fFlags&i; }
101 Bool_t TestFlags(Int_t i) const { return fFlags&i; }
102
103 // Setup container names
104 void SetNameHillas(const char *name) { fNameHillas = name; }
105 void SetNameHillasExt(const char *name) { fNameHillasExt = name; }
106 void SetNameHillasSrc(const char *name) { fNameHillasSrc = name; }
107 void SetNameNewImagePar(const char *name) { fNameNewImagePar = name; }
108 void SetNameNewImagePar2(const char *name){ fNameNewImagePar2 = name; }
109 void SetNameConc(const char *name) { fNameConc = name; }
110 void SetNameImagePar(const char *name) { fNameImagePar = name; }
111 void SetNameSrcPosCam(const char *name) { fNameSrcPosCam = name; }
112
113 // Setup island number
114 void SetIdxIsland(Short_t idx) { fIdxIsland = idx; }
115
116 // Set Abberation (see MHillasSrc for details)
117 void SetAbberation(Double_t a=1) { fAbberation = a; }
118
119 // TObject
120 void Print(Option_t *o="") const;
121
122 ClassDef(MHillasCalc, 0) // Task to calculate Hillas and other image parameters
123};
124
125#endif
Note: See TracBrowser for help on using the repository browser.