source: branches/Mars_McMismatchStudy/mimage/MHillasCalc.h@ 18306

Last change on this file since 18306 was 14447, checked in by tbretz, 12 years ago
Added some missing std::
File size: 5.1 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
69 // MParContainer
70 void StreamPrimitive(std::ostream &out) const;
71
72 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
73
74 // MTask
75 Int_t PreProcess(MParList *pList);
76 Int_t Process();
77 Int_t PostProcess();
78
79public:
80 // Constructor
81 MHillasCalc(const char *name=NULL, const char *title=NULL);
82
83 // Flags
84 enum CalcCont_t {
85 kCalcHillas = BIT(0),
86 kCalcHillasExt = BIT(1),
87 kCalcHillasSrc = BIT(2),
88 kCalcNewImagePar = BIT(3),
89 kCalcNewImagePar2 = BIT(4),
90 kCalcConc = BIT(5),
91 kCalcImagePar = BIT(6)
92 };
93
94 // Setup flags
95 void SetFlags(Int_t f) { fFlags = f; }
96 void Enable(Int_t f) { fFlags |= f; }
97 void Disable(Int_t f) { fFlags &= ~f; }
98
99 Bool_t TestFlag(CalcCont_t i) const { return fFlags&i; }
100 Bool_t TestFlags(Int_t i) const { return fFlags&i; }
101
102 // Setup container names
103 void SetNameHillas(const char *name) { fNameHillas = name; }
104 void SetNameHillasExt(const char *name) { fNameHillasExt = name; }
105 void SetNameHillasSrc(const char *name) { fNameHillasSrc = name; }
106 void SetNameNewImagePar(const char *name) { fNameNewImagePar = name; }
107 void SetNameNewImagePar2(const char *name){ fNameNewImagePar2 = name; }
108 void SetNameConc(const char *name) { fNameConc = name; }
109 void SetNameImagePar(const char *name) { fNameImagePar = name; }
110 void SetNameSrcPosCam(const char *name) { fNameSrcPosCam = name; }
111
112 // Setup island number
113 void SetIdxIsland(Short_t idx) { fIdxIsland = idx; }
114
115 // TObject
116 void Print(Option_t *o="") const;
117
118 ClassDef(MHillasCalc, 0) // Task to calculate Hillas and other image parameters
119};
120
121#endif
Note: See TracBrowser for help on using the repository browser.