]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALIANALYSISTASKCALOFILTER_H | |
2 | #define ALIANALYSISTASKCALOFILTER_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | ////////////////////////////////////////////////////////// | |
8 | // Filter the ESDCaloClusters and ESDCaloCells of EMCAL, | |
9 | // PHOS or both, creating the corresponing AODCaloClusters | |
10 | // and AODCaloCells. | |
11 | // Fill also the AODHeader information and the vertex. | |
12 | // Fill tracks if requested | |
13 | // Copy of AliAnalysisTaskESDfilter. | |
14 | // Author: Gustavo Conesa Balbastre (INFN - Frascati) | |
15 | ////////////////////////////////////////////////////////// | |
16 | ||
17 | #include "AliAnalysisTaskSE.h" | |
18 | class AliEMCALRecoUtils; | |
19 | class AliEMCALGeometry; | |
20 | class AliESDEvent; | |
21 | class AliAODEvent; | |
22 | ||
23 | class AliAnalysisTaskCaloFilter : public AliAnalysisTaskSE | |
24 | { | |
25 | public: | |
26 | ||
27 | AliAnalysisTaskCaloFilter(); | |
28 | AliAnalysisTaskCaloFilter(const char* name); | |
29 | virtual ~AliAnalysisTaskCaloFilter() ; | |
30 | ||
31 | //General analysis frame methods | |
32 | ||
33 | virtual void UserCreateOutputObjects(); | |
34 | virtual void Init(); | |
35 | virtual void LocalInit() { Init() ; } | |
36 | virtual void UserExec(Option_t *option); | |
37 | ||
38 | // Task own methods | |
39 | ||
40 | Bool_t AcceptEvent() ; | |
41 | ||
42 | Bool_t AcceptEventEMCAL(); | |
43 | ||
44 | Bool_t AcceptEventPHOS(); | |
45 | ||
46 | Bool_t AcceptEventTrack(); | |
47 | ||
48 | Bool_t AcceptEventVertex(); | |
49 | ||
50 | Bool_t CheckForPrimaryVertex(); | |
51 | ||
52 | void CorrectionsInEMCAL(); | |
53 | ||
54 | void FillAODHeader(); | |
55 | ||
56 | void FillAODCaloCells(); | |
57 | ||
58 | void FillAODCaloClusters(); | |
59 | ||
60 | void FillAODCaloTrigger(); | |
61 | ||
62 | void FillAODTracks(); | |
63 | ||
64 | void FillAODv0s(); | |
65 | ||
66 | void FillAODVertices(); | |
67 | ||
68 | void FillAODVZERO(); | |
69 | ||
70 | void PrintInfo(); | |
71 | ||
72 | // * Task settings * | |
73 | ||
74 | // Geometry methods | |
75 | ||
76 | void SetEMCALGeometryName(TString name) { fEMCALGeoName = name ; } | |
77 | TString EMCALGeometryName() const { return fEMCALGeoName ; } | |
78 | ||
79 | void SwitchOnLoadOwnEMCALGeometryMatrices() { fLoadEMCALMatrices = kTRUE ; } | |
80 | void SwitchOffLoadOwnEMCALGeometryMatrices() { fLoadEMCALMatrices = kFALSE ; } | |
81 | void SetEMCALGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fEMCALMatrix[i] = m ; } | |
82 | ||
83 | //void SwitchOnLoadOwnPHOSGeometryMatrices() { fLoadPHOSMatrices = kTRUE ; } | |
84 | //void SwitchOffLoadOwnPHOSGeometryMatrices() { fLoadPHOSMatrices = kFALSE ; } | |
85 | //void SetPHOSGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fPHOSMatrix[i] = m ; } | |
86 | ||
87 | void SwitchOnFillAODFile() { fFillAODFile = kTRUE ; } | |
88 | void SwitchOffFillAODFile() { fFillAODFile = kFALSE ; } | |
89 | ||
90 | void SwitchOnFillTracks() { fFillTracks = kTRUE ; } | |
91 | void SwitchOffFillTracks() { fFillTracks = kFALSE ; } | |
92 | ||
93 | void SwitchOnFillHybridTracks() { fFillTracks = kTRUE ; | |
94 | fFillHybridTracks = kTRUE ; } | |
95 | void SwitchOffFillHybridTracks() { fFillHybridTracks = kFALSE ; } | |
96 | ||
97 | void SwitchOnFillv0s() { fFillv0s = kTRUE ; } | |
98 | void SwitchOffFillv0s() { fFillv0s = kFALSE ; } | |
99 | ||
100 | void SwitchOnFillVZERO() { fFillVZERO = kTRUE ; } | |
101 | void SwitchOffFillVZERO() { fFillVZERO = kFALSE ; } | |
102 | ||
103 | void SwitchOnFillAllVertices() { fFillAllVertices = kTRUE ; } | |
104 | void SwitchOffFillAllVertices() { fFillAllVertices = kFALSE ; } | |
105 | ||
106 | enum caloFilter {kBoth = 0, kEMCAL = 1, kPHOS=2}; | |
107 | ||
108 | void SetCaloFilter(Int_t calo) { fCaloFilter = calo ; } | |
109 | TString GetCaloFilter() const { return fCaloFilter ; } | |
110 | ||
111 | void SetEventSelection(Bool_t emcal, Bool_t phos, Bool_t track) { | |
112 | // Detector involved in event selection | |
113 | fEventSelection[0] = emcal ; fEventSelection[1] = phos ; fEventSelection[2] = track ; } | |
114 | ||
115 | void SwitchOnAcceptAllMBEvent() { fAcceptAllMBEvent = kTRUE ; } | |
116 | void SwitchOffAcceptAllMBEvent() { fAcceptAllMBEvent = kFALSE ; } | |
117 | ||
118 | void SetEMCALRecoUtils(AliEMCALRecoUtils* ru){ fEMCALRecoUtils = ru ; } | |
119 | AliEMCALRecoUtils* GetEMCALRecoUtils() const { return fEMCALRecoUtils ; } | |
120 | ||
121 | void SwitchOnClusterCorrection() { fCorrect = kTRUE ; } | |
122 | void SwitchOffClusterCorrection() { fCorrect = kFALSE ; } | |
123 | ||
124 | void SetConfigFileName(TString name) { fConfigName = name ; } | |
125 | ||
126 | void SetEMCALEnergyCut(Float_t cut) { fEMCALEnergyCut = cut ; } | |
127 | Float_t GetEMCALEnergyCut() const { return fEMCALEnergyCut ; } | |
128 | void SetEMCALNcellsCut(Int_t cut) { fEMCALNcellsCut = cut ; } | |
129 | Int_t GetEMCALNcellsCut() const { return fEMCALNcellsCut ; } | |
130 | ||
131 | void SetPHOSEnergyCut(Float_t cut) { fPHOSEnergyCut = cut ; } | |
132 | Float_t GetPHOSEnergyCut() const { return fPHOSEnergyCut ; } | |
133 | void SetPHOSNcellsCut(Int_t cut) { fPHOSNcellsCut = cut ; } | |
134 | Int_t GetPHOSNcellsCut() const { return fPHOSNcellsCut ; } | |
135 | ||
136 | void SetTrackPtCut(Float_t cut) { fTrackPtCut = cut ; } | |
137 | Float_t GetTrackPtCut() const { return fTrackPtCut ; } | |
138 | ||
139 | void SetVzCut(Float_t cut) { fVzCut = cut ; } | |
140 | Float_t GetVzCut() const { return fVzCut ; } | |
141 | ||
142 | ||
143 | private: | |
144 | ||
145 | Int_t fCaloFilter; // Calorimeter to filter | |
146 | Bool_t fEventSelection[3]; // Define which detector is used to select the event | |
147 | Bool_t fAcceptAllMBEvent; // Do not select the MB events with same cuts as other triggers | |
148 | Int_t fCorrect; // Recalibrate or recalculate different cluster parameters | |
149 | ||
150 | //EMCAL specific | |
151 | AliEMCALGeometry * fEMCALGeo; //! EMCAL geometry | |
152 | TString fEMCALGeoName; // Name of geometry to use. | |
153 | AliEMCALRecoUtils * fEMCALRecoUtils; // Pointer to EMCAL utilities for clusterization | |
154 | ||
155 | //Geometry | |
156 | Bool_t fLoadEMCALMatrices; // Matrices set from configuration, not get from geometry.root or from ESDs/AODs | |
157 | TGeoHMatrix * fEMCALMatrix[12]; // Geometry matrices with alignments | |
158 | //Bool_t fLoadPHOSMatrices; // Matrices set from configuration, not get from geometry.root or from ESDs/AODs | |
159 | //TGeoHMatrix * fPHOSMatrix[5]; // Geometry matrices with alignments | |
160 | Bool_t fGeoMatrixSet; // Set geometry matrices only once, for the first event. | |
161 | ||
162 | TString fConfigName; // Name of analysis configuration file | |
163 | ||
164 | Bool_t fFillAODFile; // Fill the output AOD file with clusters | |
165 | Bool_t fFillTracks; // Fill tracks | |
166 | Bool_t fFillHybridTracks; // Fill hybrid tracks | |
167 | ||
168 | Bool_t fFillAllVertices; // Fill all vertices | |
169 | Bool_t fFillv0s; // Fill v0s | |
170 | Bool_t fFillVZERO; // Fill VZERO | |
171 | ||
172 | Float_t fEMCALEnergyCut; // At least an EMCAL cluster with this energy in the event | |
173 | Int_t fEMCALNcellsCut; // At least an EMCAL cluster with fNCellsCut cells over fEnergyCut | |
174 | ||
175 | Float_t fPHOSEnergyCut; // At least a PHOS cluster with this energy in the event | |
176 | Int_t fPHOSNcellsCut; // At least a PHOS cluster with fNCellsCut cells over fEnergyCut | |
177 | ||
178 | Float_t fTrackPtCut; // At least a track with this pT in the event | |
179 | ||
180 | Float_t fVzCut; // At least events with vertex within cut | |
181 | ||
182 | AliVEvent* fEvent; //! event pointer | |
183 | AliESDEvent* fESDEvent; //! ESD event pointer | |
184 | AliAODEvent* fAODEvent; //! AOD event pointer | |
185 | ||
186 | ||
187 | AliAnalysisTaskCaloFilter( const AliAnalysisTaskCaloFilter&); | |
188 | AliAnalysisTaskCaloFilter& operator=(const AliAnalysisTaskCaloFilter&); | |
189 | ||
190 | ClassDef(AliAnalysisTaskCaloFilter, 9); // Analysis task for standard ESD filtering | |
191 | ||
192 | }; | |
193 | ||
194 | #endif |