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