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 |
|
---|
19 | class MGeomCam;
|
---|
20 | class MSignalCam;
|
---|
21 | class MHillas;
|
---|
22 | class MHillasExt;
|
---|
23 | class MHillasSrc;
|
---|
24 | class MImagePar;
|
---|
25 | class MNewImagePar;
|
---|
26 | class MNewImagePar2;
|
---|
27 | class MConcentration;
|
---|
28 | class MSrcPosCam;
|
---|
29 |
|
---|
30 | class 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 |
|
---|
69 | // MParContainer
|
---|
70 | void StreamPrimitive(ofstream &out) const;
|
---|
71 |
|
---|
72 | // MTask
|
---|
73 | Int_t PreProcess(MParList *pList);
|
---|
74 | Int_t Process();
|
---|
75 | Int_t PostProcess();
|
---|
76 |
|
---|
77 | public:
|
---|
78 | // Constructor
|
---|
79 | MHillasCalc(const char *name=NULL, const char *title=NULL);
|
---|
80 |
|
---|
81 | // Flags
|
---|
82 | enum CalcCont_t {
|
---|
83 | kCalcHillas = BIT(0),
|
---|
84 | kCalcHillasExt = BIT(1),
|
---|
85 | kCalcHillasSrc = BIT(2),
|
---|
86 | kCalcNewImagePar = BIT(3),
|
---|
87 | kCalcNewImagePar2 = BIT(4),
|
---|
88 | kCalcConc = BIT(5),
|
---|
89 | kCalcImagePar = BIT(6)
|
---|
90 | };
|
---|
91 |
|
---|
92 | // Setup flags
|
---|
93 | void SetFlags(Int_t f) { fFlags = f; }
|
---|
94 | void Enable(Int_t f) { fFlags |= f; }
|
---|
95 | void Disable(Int_t f) { fFlags &= ~f; }
|
---|
96 |
|
---|
97 | Bool_t TestFlag(CalcCont_t i) const { return fFlags&i; }
|
---|
98 | Bool_t TestFlags(Int_t i) const { return fFlags&i; }
|
---|
99 |
|
---|
100 | // Setup container names
|
---|
101 | void SetNameHillas(const char *name) { fNameHillas = name; }
|
---|
102 | void SetNameHillasExt(const char *name) { fNameHillasExt = name; }
|
---|
103 | void SetNameHillasSrc(const char *name) { fNameHillasSrc = name; }
|
---|
104 | void SetNameNewImagePar(const char *name) { fNameNewImagePar = name; }
|
---|
105 | void SetNameNewImagePar2(const char *name){ fNameNewImagePar2 = name; }
|
---|
106 | void SetNameConc(const char *name) { fNameConc = name; }
|
---|
107 | void SetNameImagePar(const char *name) { fNameImagePar = name; }
|
---|
108 | void SetNameSrcPosCam(const char *name) { fNameSrcPosCam = name; }
|
---|
109 |
|
---|
110 | // Setup island number
|
---|
111 | void SetIdxIsland(Short_t idx) { fIdxIsland = idx; }
|
---|
112 |
|
---|
113 | // TObject
|
---|
114 | void Print(Option_t *o="") const;
|
---|
115 |
|
---|
116 | ClassDef(MHillasCalc, 0) // Task to calculate Hillas and other image parameters
|
---|
117 | };
|
---|
118 |
|
---|
119 | #endif
|
---|