source: trunk/MagicSoft/Mars/mimage/MHillasCalc.h@ 7314

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