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

Last change on this file since 6724 was 5059, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 4.6 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 MCerPhotEvt;
21class MHillas;
22class MHillasExt;
23class MHillasSrc;
24class MImagePar;
25class MNewImagePar;
26class MConcentration;
27class MSrcPosCam;
28
29class MHillasCalc : public MTask
30{
31 static const TString gsDefName; // default name
32 static const TString gsDefTitle; // default title
33
34 static const TString gsNameHillas; // default name of the 'MHillas' container
35 static const TString gsNameHillasExt; // default name of the 'MHillasExt' container
36 static const TString gsNameNewImagePar; // default name of the 'MNewImagePar' container
37 static const TString gsNameConc; // default name of the 'MConcentration' container
38 static const TString gsNameImagePar; // default name of the 'MImagePar' container
39 static const TString gsNameHillasSrc; // default name of the 'MHillasSrc' container
40 static const TString gsNameSrcPosCam; // default name of the 'MSrcPosCam' container
41
42 const MGeomCam *fGeomCam; //! Camera Geometry used to calculate Hillas
43 const MCerPhotEvt *fCerPhotEvt; //! Cerenkov Photon Event used for calculation
44
45 MHillas *fHillas; //! output container to store result
46 MHillasExt *fHillasExt; //! output container to store result
47 MHillasSrc *fHillasSrc; //! output container to store result
48 MImagePar *fImagePar; //! output container to store result
49 MNewImagePar *fNewImgPar; //! output container to store result
50 MConcentration *fConc; //! output container to store result
51
52 TString fNameHillas; // name of the 'MHillas' container
53 TString fNameHillasExt; // name of the 'MHillasExt' container
54 TString fNameHillasSrc; // name of the 'MHillasSrc' container
55 TString fNameSrcPosCam; // name of the 'MSrcPosCam' container
56 TString fNameConc; // name of the 'MConcentration' container
57 TString fNameImagePar; // name of the 'MImagePar' container
58 TString fNameNewImagePar; // name of the 'MNewImagePar' container
59
60 TArrayL fErrors; //! Error counter. Do we have to change to Double?
61
62 Int_t fFlags; // Flags defining the behaviour of MHillasCalc
63 Short_t fIdxIsland; // Number of island to use for calculation
64
65 // MParContainer
66 void StreamPrimitive(ofstream &out) const;
67
68 // MTask
69 Int_t PreProcess(MParList *pList);
70 Int_t Process();
71 Int_t PostProcess();
72
73public:
74 // Constructor
75 MHillasCalc(const char *name=NULL, const char *title=NULL);
76
77 // Flags
78 enum CalcCont_t {
79 kCalcHillas = BIT(0),
80 kCalcHillasExt = BIT(1),
81 kCalcHillasSrc = BIT(2),
82 kCalcNewImagePar = BIT(3),
83 kCalcConc = BIT(4),
84 kCalcImagePar = BIT(5)
85 };
86
87 // Setup flags
88 void SetFlags(Int_t f) { fFlags = f; }
89 void Enable(Int_t f) { fFlags |= f; }
90 void Disable(Int_t f) { fFlags &= ~f; }
91
92 Bool_t TestFlag(CalcCont_t i) const { return fFlags&i; }
93 Bool_t TestFlags(Int_t i) const { return fFlags&i; }
94
95 // Setup container names
96 void SetNameHillas(const char *name) { fNameHillas = name; }
97 void SetNameHillasExt(const char *name) { fNameHillasExt = name; }
98 void SetNameHillasSrc(const char *name) { fNameHillasSrc = name; }
99 void SetNameNewImagePar(const char *name) { fNameNewImagePar = name; }
100 void SetNameConc(const char *name) { fNameConc = name; }
101 void SetNameImagePar(const char *name) { fNameImagePar = name; }
102 void SetNameSrcPosCam(const char *name) { fNameSrcPosCam = name; }
103
104 // Setup island number
105 void SetIdxIsland(Short_t idx) { fIdxIsland = idx; }
106
107 // TObject
108 void Print(Option_t *o="") const;
109
110 ClassDef(MHillasCalc, 0) // Task to calculate Hillas and other image parameters
111};
112
113#endif
Note: See TracBrowser for help on using the repository browser.