]>
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 | ||
e4de0408 | 62 | void FillAODTracks(); |
ea00d1fa | 63 | |
64 | void FillAODv0s(); | |
e3990982 | 65 | |
e4de0408 | 66 | void FillAODVertices(); |
67 | ||
ea00d1fa | 68 | void FillAODVZERO(); |
69 | ||
e4de0408 | 70 | void PrintInfo(); |
e3990982 | 71 | |
e4de0408 | 72 | // * Task settings * |
7a4cf423 | 73 | |
e4de0408 | 74 | // Geometry methods |
e3990982 | 75 | |
e4de0408 | 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 | ||
ea00d1fa | 87 | void SwitchOnFillAODFile() { fFillAODFile = kTRUE ; } |
88 | void SwitchOffFillAODFile() { fFillAODFile = kFALSE ; } | |
e4de0408 | 89 | |
ea00d1fa | 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 ; } | |
e3990982 | 105 | |
5994e71f | 106 | enum caloFilter {kBoth = 0, kEMCAL = 1, kPHOS=2}; |
44cf05d7 | 107 | |
ea00d1fa | 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 ; } | |
247abff4 | 120 | |
ea00d1fa | 121 | void SwitchOnClusterCorrection() { fCorrect = kTRUE ; } |
122 | void SwitchOffClusterCorrection() { fCorrect = kFALSE ; } | |
123 | ||
124 | void SetConfigFileName(TString name) { fConfigName = name ; } | |
44cf05d7 | 125 | |
ea00d1fa | 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 ; } | |
5994e71f | 130 | |
ea00d1fa | 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 ; } | |
7a4cf423 | 141 | |
e3990982 | 142 | |
e4de0408 | 143 | private: |
144 | ||
5994e71f | 145 | Int_t fCaloFilter; // Calorimeter to filter |
ea00d1fa | 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 | |
5994e71f | 148 | Int_t fCorrect; // Recalibrate or recalculate different cluster parameters |
e3990982 | 149 | |
247abff4 | 150 | //EMCAL specific |
5994e71f | 151 | AliEMCALGeometry * fEMCALGeo; //! EMCAL geometry |
152 | TString fEMCALGeoName; // Name of geometry to use. | |
153 | AliEMCALRecoUtils * fEMCALRecoUtils; // Pointer to EMCAL utilities for clusterization | |
3a58eee6 | 154 | |
44cf05d7 | 155 | //Geometry |
156 | Bool_t fLoadEMCALMatrices; // Matrices set from configuration, not get from geometry.root or from ESDs/AODs | |
e3990982 | 157 | TGeoHMatrix * fEMCALMatrix[12]; // Geometry matrices with alignments |
44cf05d7 | 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. | |
5994e71f | 161 | |
162 | TString fConfigName; // Name of analysis configuration file | |
ea00d1fa | 163 | |
5994e71f | 164 | Bool_t fFillAODFile; // Fill the output AOD file with clusters |
e4de0408 | 165 | Bool_t fFillTracks; // Fill tracks |
ea00d1fa | 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 | |
e4de0408 | 179 | |
e4de0408 | 180 | Float_t fVzCut; // At least events with vertex within cut |
3a58eee6 | 181 | |
ea00d1fa | 182 | AliVEvent* fEvent; //! event pointer |
183 | AliESDEvent* fESDEvent; //! ESD event pointer | |
184 | AliAODEvent* fAODEvent; //! AOD event pointer | |
185 | ||
186 | ||
e3990982 | 187 | AliAnalysisTaskCaloFilter( const AliAnalysisTaskCaloFilter&); |
188 | AliAnalysisTaskCaloFilter& operator=(const AliAnalysisTaskCaloFilter&); | |
189 | ||
ea00d1fa | 190 | ClassDef(AliAnalysisTaskCaloFilter, 9); // Analysis task for standard ESD filtering |
e3990982 | 191 | |
7a4cf423 | 192 | }; |
193 | ||
194 | #endif |