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

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