]>
Commit | Line | Data |
---|---|---|
af885e0f | 1 | // -*- mode: C++ -*- |
2 | #ifndef ALIESDEVENT_H | |
3 | #define ALIESDEVENT_H | |
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | ||
8 | /* $Id$ */ | |
9 | ||
10 | //------------------------------------------------------------------------- | |
f56a9fa7 | 11 | // Class AliESDEvent |
6989bff3 | 12 | // This is the class to deal with during the physics analysis of data. |
f56a9fa7 | 13 | // It also ensures the backward compatibility with the old ESD format. |
af885e0f | 14 | // |
f56a9fa7 | 15 | // Origin: Christian Klein-Boesing, CERN, Christian.Klein-Boesing@cern.ch |
af885e0f | 16 | //------------------------------------------------------------------------- |
17 | ||
18 | #include <TClonesArray.h> | |
19 | #include <TObject.h> | |
20 | #include <TTree.h> | |
21 | #include <TArrayF.h> | |
22 | ||
af885e0f | 23 | |
024c7734 | 24 | #include "AliVEvent.h" |
694aad0c | 25 | // some includes for delegated methods |
f0106218 | 26 | #include "AliESDCaloTrigger.h" |
af885e0f | 27 | #include "AliESDRun.h" |
28 | #include "AliESDHeader.h" | |
3f47e572 | 29 | #include "AliESDTZERO.h" |
f0106218 | 30 | #include "AliESDZDC.h" |
bd95bae7 | 31 | #include "AliESDACORDE.h" |
af885e0f | 32 | |
024c7734 | 33 | // AliESDtrack has to be included so that the compiler |
34 | // knows its inheritance tree (= that it is a AliVParticle). | |
35 | #include "AliESDtrack.h" | |
5303c167 | 36 | // same for AliESDVertex (which is a AliVVertex) |
37 | #include "AliESDVertex.h" | |
c8fe2783 | 38 | // same for CaloCells and CaloClusters (which is a AliVCaloCells, AliVCluster) |
39 | #include "AliESDCaloCluster.h" | |
40 | #include "AliESDCaloCells.h" | |
41 | ||
ae2bccf1 | 42 | #include "AliESDVZERO.h" |
820b4d9e | 43 | #ifdef MFT_UPGRADE |
44 | //#include "AliESDMFT.h" | |
45 | #endif | |
ae2bccf1 | 46 | |
af885e0f | 47 | class AliESDfriend; |
af885e0f | 48 | class AliESDHLTtrack; |
f0106218 | 49 | class AliESDVertex; |
50 | class AliESDPmdTrack; | |
51 | class AliESDFMD; | |
52 | class AliESDkink; | |
f0106218 | 53 | class AliESDv0; |
f0106218 | 54 | class AliMultiplicity; |
55 | class AliRawDataErrorLog; | |
56 | class AliESDRun; | |
6c8e0967 | 57 | class AliESDTrdTrigger; |
f0106218 | 58 | class AliESDTrdTrack; |
52cd0cc0 | 59 | class AliESDTrdTracklet; |
f0106218 | 60 | class AliESDMuonTrack; |
fe0324de | 61 | class AliESDMuonCluster; |
62 | class AliESDMuonPad; | |
af885e0f | 63 | class AliESD; |
f0106218 | 64 | class AliESDcascade; |
fba4b2e2 | 65 | class AliCentrality; |
ce7adfe9 | 66 | class AliEventplane; |
cd1d4ee0 | 67 | class TRefArray; |
bd95bae7 | 68 | class AliESDACORDE; |
8b12d288 | 69 | class AliESDHLTDecision; |
8e1324ab | 70 | class AliESDCosmicTrack; |
af885e0f | 71 | |
80791508 | 72 | class TList; |
73 | class TString; | |
74 | ||
75 | ||
024c7734 | 76 | class AliESDEvent : public AliVEvent { |
af885e0f | 77 | public: |
78 | ||
79 | ||
6989bff3 | 80 | enum ESDListIndex {kESDRun, |
af885e0f | 81 | kHeader, |
82 | kESDZDC, | |
83 | kESDFMD, | |
84 | kESDVZERO, | |
85 | kESDTZERO, | |
06cc9d95 | 86 | kTPCVertex, |
af885e0f | 87 | kSPDVertex, |
88 | kPrimaryVertex, | |
89 | kSPDMult, | |
90 | kPHOSTrigger, | |
91 | kEMCALTrigger, | |
04d01397 | 92 | kSPDPileupVertices, |
93 | kTrkPileupVertices, | |
af885e0f | 94 | kTracks, |
95 | kMuonTracks, | |
fe0324de | 96 | kMuonClusters, |
97 | kMuonPads, | |
af885e0f | 98 | kPmdTracks, |
6c8e0967 | 99 | kTrdTrigger, |
af885e0f | 100 | kTrdTracks, |
52cd0cc0 | 101 | kTrdTracklets, |
af885e0f | 102 | kV0s, |
103 | kCascades, | |
104 | kKinks, | |
105 | kCaloClusters, | |
e649177a | 106 | kEMCALCells, |
107 | kPHOSCells, | |
af885e0f | 108 | kErrorLogs, |
bd95bae7 | 109 | kESDACORDE, |
f858b00e | 110 | kTOFHeader, |
8e1324ab | 111 | kCosmicTracks, |
af885e0f | 112 | kESDListN |
820b4d9e | 113 | #ifdef MFT_UPGRADE |
114 | // , kESDMFT | |
115 | #endif | |
af885e0f | 116 | }; |
117 | ||
118 | AliESDEvent(); | |
732a24fe | 119 | virtual ~AliESDEvent(); |
120 | AliESDEvent &operator=(const AliESDEvent& source); // or make private and use only copy? | |
121 | virtual void Copy(TObject& obj) const; | |
af885e0f | 122 | |
123 | // RUN | |
124 | // move this to the UserData!!! | |
125 | const AliESDRun* GetESDRun() const {return fESDRun;} | |
126 | ||
127 | // Delegated methods for fESDRun | |
c017f53f | 128 | void SetRunNumber(Int_t n) {if(fESDRun) fESDRun->SetRunNumber(n);} |
129 | Int_t GetRunNumber() const {return fESDRun?fESDRun->GetRunNumber():-1;} | |
00d00f58 | 130 | void SetPeriodNumber(UInt_t n){ |
131 | if(fESDRun) fESDRun->SetPeriodNumber(n); | |
132 | if(fHeader) fHeader->SetPeriodNumber(n); | |
133 | } | |
c017f53f | 134 | UInt_t GetPeriodNumber() const {return fESDRun?fESDRun->GetPeriodNumber():0;} |
135 | void SetMagneticField(Double_t mf){if(fESDRun) fESDRun->SetMagneticField(mf);} | |
136 | Double_t GetMagneticField() const {return fESDRun?fESDRun->GetMagneticField():0;} | |
137 | void SetDiamond(const AliESDVertex *vertex) { if(fESDRun) fESDRun->SetDiamond(vertex);} | |
138 | Double_t GetDiamondX() const {return fESDRun?fESDRun->GetDiamondX():0;} | |
139 | Double_t GetDiamondY() const {return fESDRun?fESDRun->GetDiamondY():0;} | |
1c7554f9 | 140 | Double_t GetDiamondZ() const {return fESDRun?fESDRun->GetDiamondZ():0;} |
c017f53f | 141 | Double_t GetSigma2DiamondX() const {return fESDRun?fESDRun->GetSigma2DiamondX():0;} |
142 | Double_t GetSigma2DiamondY() const {return fESDRun?fESDRun->GetSigma2DiamondY():0;} | |
1c7554f9 | 143 | Double_t GetSigma2DiamondZ() const {return fESDRun?fESDRun->GetSigma2DiamondZ():0;} |
c017f53f | 144 | void GetDiamondCovXY(Float_t cov[3]) const {if(fESDRun) fESDRun->GetDiamondCovXY(cov);} |
145 | void SetTriggerClass(const char*name, Int_t index) {if(fESDRun) fESDRun->SetTriggerClass(name,index);} | |
146 | void SetPHOSMatrix(TGeoHMatrix*matrix, Int_t i) {if(fESDRun) fESDRun->SetPHOSMatrix(matrix,i);} | |
147 | const TGeoHMatrix* GetPHOSMatrix(Int_t i) const {return fESDRun?fESDRun->GetPHOSMatrix(i):0x0;} | |
148 | void SetEMCALMatrix(TGeoHMatrix*matrix, Int_t i) {if(fESDRun) fESDRun->SetEMCALMatrix(matrix,i);} | |
149 | const TGeoHMatrix* GetEMCALMatrix(Int_t i) const {return fESDRun?fESDRun->GetEMCALMatrix(i):0x0;} | |
da6062af | 150 | void SetCaloTriggerType(const Int_t* type) {if (fESDRun) fESDRun->SetCaloTriggerType(type);} |
1dc767cf | 151 | Int_t* GetCaloTriggerType() const {return fESDRun?fESDRun->GetCaloTriggerType():0x0;} |
5e14e698 | 152 | virtual const Float_t* GetVZEROEqFactors() const {return fESDRun?fESDRun->GetVZEROEqFactors():0x0;} |
153 | virtual Float_t GetVZEROEqMultiplicity(Int_t i) const; | |
da6062af | 154 | |
33fe5eb1 | 155 | // |
c017f53f | 156 | void SetCurrentL3(Float_t cur) const {if(fESDRun) fESDRun->SetCurrentL3(cur);} |
157 | void SetCurrentDip(Float_t cur) const {if(fESDRun) fESDRun->SetCurrentDip(cur);} | |
158 | void SetBeamEnergy(Float_t be) const {if(fESDRun) fESDRun->SetBeamEnergy(be);} | |
159 | void SetBeamType(const char* bt) const {if(fESDRun) fESDRun->SetBeamType(bt);} | |
91460b26 | 160 | void SetBeamParticle(Int_t az, Int_t ibeam) {if(fESDRun) fESDRun->SetBeamParticle(az,ibeam);} |
c017f53f | 161 | void SetUniformBMap(Bool_t val=kTRUE) const {if(fESDRun) fESDRun->SetBit(AliESDRun::kUniformBMap,val);} |
162 | void SetBInfoStored(Bool_t val=kTRUE) const {if(fESDRun) fESDRun->SetBit(AliESDRun::kBInfoStored,val);} | |
33fe5eb1 | 163 | // |
c017f53f | 164 | Float_t GetCurrentL3() const {return fESDRun?fESDRun->GetCurrentL3():0;} |
165 | Float_t GetCurrentDip() const {return fESDRun?fESDRun->GetCurrentDip():0;} | |
166 | Float_t GetBeamEnergy() const {return fESDRun?fESDRun->GetBeamEnergy():0;} | |
167 | const char* GetBeamType() const {return fESDRun?fESDRun->GetBeamType():0;} | |
91460b26 | 168 | Int_t GetBeamParticle(Int_t ibeam) const {return fESDRun?fESDRun->GetBeamParticle(ibeam):0;} |
169 | Int_t GetBeamParticleA(Int_t ibeam) const {return fESDRun?fESDRun->GetBeamParticleA(ibeam):0;} | |
170 | Int_t GetBeamParticleZ(Int_t ibeam) const {return fESDRun?fESDRun->GetBeamParticleZ(ibeam):0;} | |
c017f53f | 171 | Bool_t IsUniformBMap() const {return fESDRun?fESDRun->TestBit(AliESDRun::kUniformBMap):kFALSE;} |
33fe5eb1 | 172 | // |
c017f53f | 173 | Bool_t InitMagneticField() const {return fESDRun?fESDRun->InitMagneticField():kFALSE;} |
78cbd205 | 174 | void SetT0spread(Float_t *t) const {if(fESDRun) fESDRun->SetT0spread(t);} |
175 | Float_t GetT0spread(Int_t i) const {return fESDRun?fESDRun->GetT0spread(i):0;} | |
cc4d0e9c | 176 | virtual void SetVZEROEqFactors(Float_t factors[64]) const {if(fESDRun) fESDRun->SetVZEROEqFactors(factors);} |
af885e0f | 177 | // HEADER |
024c7734 | 178 | AliESDHeader* GetHeader() const {return fHeader;} |
af885e0f | 179 | |
180 | // Delegated methods for fHeader | |
c017f53f | 181 | void SetTriggerMask(ULong64_t n) {if(fHeader) fHeader->SetTriggerMask(n);} |
182 | void SetOrbitNumber(UInt_t n) {if(fHeader) fHeader->SetOrbitNumber(n);} | |
183 | void SetTimeStamp(UInt_t timeStamp){if(fHeader) fHeader->SetTimeStamp(timeStamp);} | |
184 | void SetEventType(UInt_t eventType){if(fHeader) fHeader->SetEventType(eventType);} | |
185 | void SetEventSpecie(UInt_t eventSpecie){if(fHeader) fHeader->SetEventSpecie(eventSpecie);} | |
186 | void SetEventNumberInFile(Int_t n) {if(fHeader) fHeader->SetEventNumberInFile(n);} | |
187 | // void SetRunNumber(Int_t n) {if(fHeader) fHeader->SetRunNumber(n);} | |
188 | void SetBunchCrossNumber(UShort_t n) {if(fHeader) fHeader->SetBunchCrossNumber(n);} | |
189 | void SetTriggerCluster(UChar_t n) {if(fHeader) fHeader->SetTriggerCluster(n);} | |
694aad0c | 190 | |
c017f53f | 191 | ULong64_t GetTriggerMask() const {return fHeader?fHeader->GetTriggerMask():0;} |
192 | TString GetFiredTriggerClasses() const {return (fESDRun&&fHeader)?fESDRun->GetFiredTriggerClasses(fHeader->GetTriggerMask()):"";} | |
193 | Bool_t IsTriggerClassFired(const char *name) const {return (fESDRun&&fHeader)?fESDRun->IsTriggerClassFired(fHeader->GetTriggerMask(),name):kFALSE;} | |
2a3dfb14 | 194 | Bool_t IsEventSelected(const char *trigExpr) const; |
3b286f80 | 195 | TObject* GetHLTTriggerDecision() const; |
196 | TString GetHLTTriggerDescription() const; | |
197 | Bool_t IsHLTTriggerFired(const char* name=NULL) const; | |
158a76dd | 198 | UInt_t GetOrbitNumber() const {return fHeader?fHeader->GetOrbitNumber():0;} |
c017f53f | 199 | UInt_t GetTimeStamp() const { return fHeader?fHeader->GetTimeStamp():0;} |
200 | UInt_t GetEventType() const { return fHeader?fHeader->GetEventType():0;} | |
201 | UInt_t GetEventSpecie() const { return fHeader?fHeader->GetEventSpecie():0;} | |
202 | Int_t GetEventNumberInFile() const {return fHeader?fHeader->GetEventNumberInFile():-1;} | |
203 | UShort_t GetBunchCrossNumber() const {return fHeader?fHeader->GetBunchCrossNumber():0;} | |
204 | UChar_t GetTriggerCluster() const {return fHeader?fHeader->GetTriggerCluster():0;} | |
766037f0 | 205 | Bool_t IsDetectorInTriggerCluster(TString detector, AliTriggerConfiguration* trigConf) const; |
af885e0f | 206 | // ZDC CKB: put this in the header? |
16d867eb | 207 | AliESDZDC* GetESDZDC() const {return fESDZDC;} |
208 | AliESDZDC* GetZDCData() const {return fESDZDC;} | |
209 | ||
5d8eaff6 | 210 | void SetZDCData(const AliESDZDC * obj); |
af885e0f | 211 | |
212 | // Delegated methods for fESDZDC | |
c017f53f | 213 | Double_t GetZDCN1Energy() const {return fESDZDC?fESDZDC->GetZDCN1Energy():0;} |
214 | Double_t GetZDCP1Energy() const {return fESDZDC?fESDZDC->GetZDCP1Energy():0;} | |
215 | Double_t GetZDCN2Energy() const {return fESDZDC?fESDZDC->GetZDCN2Energy():0;} | |
216 | Double_t GetZDCP2Energy() const {return fESDZDC?fESDZDC->GetZDCP2Energy():0;} | |
217 | Double_t GetZDCEMEnergy(Int_t i=0) const {return fESDZDC?fESDZDC->GetZDCEMEnergy(i):0;} | |
218 | Int_t GetZDCParticipants() const {return fESDZDC?fESDZDC->GetZDCParticipants():0;} | |
fba4b2e2 | 219 | AliCentrality* GetCentrality(); |
ce7adfe9 | 220 | AliEventplane* GetEventplane(); |
cb62947d | 221 | |
2eec2a33 | 222 | |
b19cc8d0 | 223 | void SetZDC(Float_t n1Energy, Float_t p1Energy, Float_t em1Energy, Float_t em2Energy, |
224 | Float_t n2Energy, Float_t p2Energy, Int_t participants, Int_t nPartA, | |
225 | Int_t nPartC, Double_t b, Double_t bA, Double_t bC, UInt_t recoflag) | |
c017f53f | 226 | {if(fESDZDC) fESDZDC->SetZDC(n1Energy, p1Energy, em1Energy, em2Energy, n2Energy, p2Energy, |
b19cc8d0 | 227 | participants, nPartA, nPartC, b, bA, bC, recoflag);} |
cb62947d | 228 | // FMD |
af885e0f | 229 | void SetFMDData(AliESDFMD * obj); |
5b96d6f1 | 230 | AliESDFMD *GetFMDData() const { return fESDFMD; } |
af885e0f | 231 | |
232 | ||
233 | // TZERO CKB: put this in the header? | |
234 | const AliESDTZERO* GetESDTZERO() const {return fESDTZERO;} | |
5d8eaff6 | 235 | void SetTZEROData(const AliESDTZERO * obj); |
b0e13b29 | 236 | // delegetated methods for fESDTZERO |
af885e0f | 237 | |
adf36b9d | 238 | Double32_t GetT0zVertex() const {return fESDTZERO?fESDTZERO->GetT0zVertex():0;} |
239 | void SetT0zVertex(Double32_t z) {if(fESDTZERO) fESDTZERO->SetT0zVertex(z);} | |
240 | Double32_t GetT0() const {return fESDTZERO?fESDTZERO->GetT0():0;} | |
241 | void SetT0(Double32_t timeStart) {if(fESDTZERO) fESDTZERO->SetT0(timeStart);} | |
242 | Double32_t GetT0clock() const {return fESDTZERO?fESDTZERO->GetT0clock():0;} | |
243 | void SetT0clock(Double32_t timeStart) {if(fESDTZERO) fESDTZERO->SetT0clock(timeStart);} | |
244 | Double32_t GetT0TOF(Int_t icase) const {return fESDTZERO?fESDTZERO->GetT0TOF(icase):0;} | |
245 | const Double32_t * GetT0TOF() const {return fESDTZERO?fESDTZERO->GetT0TOF():0x0;} | |
246 | void SetT0TOF(Int_t icase,Double32_t timeStart) {if(fESDTZERO) fESDTZERO->SetT0TOF(icase,timeStart);} | |
247 | const Double32_t * GetT0time() const {return fESDTZERO?fESDTZERO->GetT0time():0x0;} | |
248 | void SetT0time(Double32_t time[24]) {if(fESDTZERO) fESDTZERO->SetT0time(time);} | |
249 | const Double32_t * GetT0amplitude() const {return fESDTZERO?fESDTZERO->GetT0amplitude():0x0;} | |
250 | void SetT0amplitude(Double32_t amp[24]){if(fESDTZERO) fESDTZERO->SetT0amplitude(amp);} | |
251 | Int_t GetT0Trig() const { return fESDTZERO?fESDTZERO->GetT0Trig():0;} | |
252 | void SetT0Trig(Int_t tvdc) {if(fESDTZERO) fESDTZERO->SetT0Trig(tvdc);} | |
af885e0f | 253 | |
254 | // VZERO | |
255 | AliESDVZERO *GetVZEROData() const { return fESDVZERO; } | |
5d8eaff6 | 256 | void SetVZEROData(const AliESDVZERO * obj); |
820b4d9e | 257 | |
258 | #ifdef MFT_UPGRADE | |
259 | // MFT | |
260 | // AliESDMFT *GetMFTData() const { return fESDMFT; } | |
261 | // void SetMFTData(AliESDMFT * obj); | |
262 | #endif | |
263 | ||
bd95bae7 | 264 | // ACORDE |
265 | AliESDACORDE *GetACORDEData() const { return fESDACORDE;} | |
266 | void SetACORDEData(AliESDACORDE * obj); | |
af885e0f | 267 | |
7d44c466 | 268 | void SetESDfriend(const AliESDfriend *f) const; |
af885e0f | 269 | void GetESDfriend(AliESDfriend *f) const; |
ddfbc51a | 270 | |
af885e0f | 271 | |
272 | ||
06cc9d95 | 273 | void SetPrimaryVertexTPC(const AliESDVertex *vertex); |
274 | const AliESDVertex *GetPrimaryVertexTPC() const {return fTPCVertex;} | |
275 | ||
276 | void SetPrimaryVertexSPD(const AliESDVertex *vertex); | |
277 | const AliESDVertex *GetPrimaryVertexSPD() const {return fSPDVertex;} | |
278 | const AliESDVertex *GetVertex() const { | |
279 | //For the backward compatibily only | |
280 | return GetPrimaryVertexSPD(); | |
281 | } | |
af885e0f | 282 | |
c264b61b | 283 | void SetPrimaryVertexTracks(const AliESDVertex *vertex); |
284 | const AliESDVertex *GetPrimaryVertexTracks() const {return fPrimaryVertex;} | |
518573d7 | 285 | AliESDVertex *PrimaryVertexTracksUnconstrained() const; |
c264b61b | 286 | |
287 | const AliESDVertex *GetPrimaryVertex() const; | |
af885e0f | 288 | |
f858b00e | 289 | |
290 | ||
291 | void SetTOFHeader(const AliTOFHeader * tofEventTime); | |
49a1368d | 292 | AliTOFHeader *GetTOFHeader() const {return fTOFHeader;} |
d9fc7e74 | 293 | Float_t GetEventTimeSpread() const {if (fTOFHeader) return fTOFHeader->GetT0spread(); else return 0.;} |
294 | Float_t GetTOFTimeResolution() const {if (fTOFHeader) return fTOFHeader->GetTOFResolution(); else return 0.;} | |
f858b00e | 295 | |
296 | ||
f0106218 | 297 | void SetMultiplicity(const AliMultiplicity *mul); |
298 | ||
af885e0f | 299 | const AliMultiplicity *GetMultiplicity() const {return fSPDMult;} |
4ace6760 | 300 | void EstimateMultiplicity(Int_t &tracklets,Int_t &trITSTPC,Int_t &trITSSApure, |
301 | Double_t eta=1.,Bool_t useDCAFlag=kTRUE,Bool_t useV0Flag=kTRUE) const; | |
f0106218 | 302 | |
7f68891d | 303 | Bool_t Clean(Float_t *cleanPars); |
7d44c466 | 304 | Bool_t RemoveKink(Int_t i) const; |
305 | Bool_t RemoveV0(Int_t i) const; | |
306 | Bool_t RemoveTrack(Int_t i) const; | |
d64bd07d | 307 | |
04d01397 | 308 | const AliESDVertex *GetPileupVertexSPD(Int_t i) const { |
c8975fcf | 309 | return (const AliESDVertex *)(fSPDPileupVertices?fSPDPileupVertices->At(i):0x0); |
04d01397 | 310 | } |
6dc21f57 | 311 | Char_t AddPileupVertexSPD(const AliESDVertex *vtx); |
04d01397 | 312 | const AliESDVertex *GetPileupVertexTracks(Int_t i) const { |
c8975fcf | 313 | return (const AliESDVertex *)(fTrkPileupVertices?fTrkPileupVertices->At(i):0x0); |
04d01397 | 314 | } |
6dc21f57 | 315 | Char_t AddPileupVertexTracks(const AliESDVertex *vtx); |
3f2db92f | 316 | TClonesArray* GetPileupVerticesTracks() const {return (TClonesArray*)fTrkPileupVertices;} |
317 | TClonesArray* GetPileupVerticesSPD() const {return (TClonesArray*)fSPDPileupVertices;} | |
04d01397 | 318 | |
a98c78e5 | 319 | virtual Bool_t IsPileupFromSPD(Int_t minContributors=3, |
320 | Double_t minZdist=0.8, | |
321 | Double_t nSigmaZdist=3., | |
322 | Double_t nSigmaDiamXY=2., | |
323 | Double_t nSigmaDiamZ=5.) const; | |
324 | ||
b46ff4b0 | 325 | virtual Bool_t IsPileupFromSPDInMultBins() const; |
326 | ||
af885e0f | 327 | AliESDtrack *GetTrack(Int_t i) const { |
0ecbfc1b | 328 | if (!fTracks) return 0; |
c8975fcf | 329 | AliESDtrack* track = (AliESDtrack*) fTracks->At(i); |
330 | if (track) track->SetESDEvent(this); | |
0ecbfc1b | 331 | return track; |
af885e0f | 332 | } |
333 | Int_t AddTrack(const AliESDtrack *t); | |
334 | ||
65a0cf79 | 335 | /// add new track at the end of tracks array and return instance |
336 | AliESDtrack* NewTrack(); | |
af885e0f | 337 | |
338 | AliESDHLTtrack *GetHLTConfMapTrack(Int_t /*i*/) const { | |
c8975fcf | 339 | // return (AliESDHLTtrack *)fHLTConfMapTracks->At(i); |
af885e0f | 340 | return 0; |
341 | } | |
342 | void AddHLTConfMapTrack(const AliESDHLTtrack */*t*/) { | |
343 | printf("ESD:: AddHLTConfMapTrack do nothing \n"); | |
344 | // TClonesArray &fhlt = *fHLTConfMapTracks; | |
345 | // new(fhlt[fHLTConfMapTracks->GetEntriesFast()]) AliESDHLTtrack(*t); | |
346 | } | |
347 | ||
348 | ||
349 | AliESDHLTtrack *GetHLTHoughTrack(Int_t /*i*/) const { | |
c8975fcf | 350 | // return (AliESDHLTtrack *)fHLTHoughTracks->At(i); |
af885e0f | 351 | return 0; |
352 | } | |
353 | void AddHLTHoughTrack(const AliESDHLTtrack */*t*/) { | |
354 | printf("ESD:: AddHLTHoughTrack do nothing \n"); | |
355 | // TClonesArray &fhlt = *fHLTHoughTracks; | |
356 | // new(fhlt[fHLTHoughTracks->GetEntriesFast()]) AliESDHLTtrack(*t); | |
357 | } | |
358 | ||
fe0324de | 359 | Bool_t MoveMuonObjects(); |
360 | ||
361 | AliESDMuonTrack* GetMuonTrack(Int_t i); | |
362 | AliESDMuonTrack* NewMuonTrack(); | |
363 | ||
364 | AliESDMuonCluster* GetMuonCluster(Int_t i); | |
365 | AliESDMuonCluster* FindMuonCluster(UInt_t clusterId); | |
366 | AliESDMuonCluster* NewMuonCluster(); | |
367 | ||
368 | AliESDMuonPad* GetMuonPad(Int_t i); | |
369 | AliESDMuonPad* FindMuonPad(UInt_t padId); | |
370 | AliESDMuonPad* NewMuonPad(); | |
371 | ||
af885e0f | 372 | AliESDPmdTrack *GetPmdTrack(Int_t i) const { |
c8975fcf | 373 | return (AliESDPmdTrack *)(fPmdTracks?fPmdTracks->At(i):0x0); |
af885e0f | 374 | } |
f0106218 | 375 | |
376 | void AddPmdTrack(const AliESDPmdTrack *t); | |
377 | ||
af885e0f | 378 | |
379 | AliESDTrdTrack *GetTrdTrack(Int_t i) const { | |
c8975fcf | 380 | return (AliESDTrdTrack *)(fTrdTracks?fTrdTracks->At(i):0x0); |
af885e0f | 381 | } |
f0106218 | 382 | |
383 | ||
6c8e0967 | 384 | void SetTrdTrigger(const AliESDTrdTrigger *t); |
385 | ||
386 | AliESDTrdTrigger* GetTrdTrigger() const { | |
387 | return (AliESDTrdTrigger*)(fTrdTrigger); | |
388 | } | |
389 | ||
f0106218 | 390 | void AddTrdTrack(const AliESDTrdTrack *t); |
af885e0f | 391 | |
52cd0cc0 | 392 | AliESDTrdTracklet* GetTrdTracklet(Int_t idx) const { |
c8975fcf | 393 | return (AliESDTrdTracklet*)(fTrdTracklets?fTrdTracklets->At(idx):0x0); |
52cd0cc0 | 394 | } |
395 | ||
396 | void AddTrdTracklet(const AliESDTrdTracklet *trkl); | |
397 | ||
af885e0f | 398 | AliESDv0 *GetV0(Int_t i) const { |
c8975fcf | 399 | return (AliESDv0*)(fV0s?fV0s->At(i):0x0); |
af885e0f | 400 | } |
401 | Int_t AddV0(const AliESDv0 *v); | |
402 | ||
403 | AliESDcascade *GetCascade(Int_t i) const { | |
c8975fcf | 404 | return (AliESDcascade *)(fCascades?fCascades->At(i):0x0); |
af885e0f | 405 | } |
f0106218 | 406 | |
407 | void AddCascade(const AliESDcascade *c); | |
af885e0f | 408 | |
409 | AliESDkink *GetKink(Int_t i) const { | |
c8975fcf | 410 | return (AliESDkink *)(fKinks?fKinks->At(i):0x0); |
af885e0f | 411 | } |
412 | Int_t AddKink(const AliESDkink *c); | |
413 | ||
414 | AliESDCaloCluster *GetCaloCluster(Int_t i) const { | |
c8975fcf | 415 | return (AliESDCaloCluster *)(fCaloClusters?fCaloClusters->At(i):0x0); |
af885e0f | 416 | } |
e649177a | 417 | |
af885e0f | 418 | Int_t AddCaloCluster(const AliESDCaloCluster *c); |
419 | ||
e649177a | 420 | AliESDCaloCells *GetEMCALCells() const {return fEMCALCells; } |
421 | AliESDCaloCells *GetPHOSCells() const {return fPHOSCells; } | |
422 | ||
042d5330 | 423 | AliESDCaloTrigger* GetCaloTrigger(TString calo) const |
424 | { | |
425 | if (calo.Contains("EMCAL")) return fEMCALTrigger; | |
426 | else | |
427 | return fPHOSTrigger; | |
428 | } | |
8e1324ab | 429 | |
430 | AliESDCosmicTrack *GetCosmicTrack(Int_t i) const { | |
c8975fcf | 431 | return fCosmicTracks ? (AliESDCosmicTrack*) fCosmicTracks->At(i) : 0; |
8e1324ab | 432 | } |
433 | const TClonesArray * GetCosmicTracks() const{ return fCosmicTracks;} | |
434 | ||
435 | void AddCosmicTrack(const AliESDCosmicTrack *t); | |
042d5330 | 436 | |
af885e0f | 437 | AliRawDataErrorLog *GetErrorLog(Int_t i) const { |
c8975fcf | 438 | return (AliRawDataErrorLog *)(fErrorLogs?fErrorLogs->At(i):0x0); |
af885e0f | 439 | } |
7d44c466 | 440 | void AddRawDataErrorLog(const AliRawDataErrorLog *log) const; |
f0106218 | 441 | |
c017f53f | 442 | Int_t GetNumberOfErrorLogs() const {return fErrorLogs?fErrorLogs->GetEntriesFast():0;} |
af885e0f | 443 | |
04d01397 | 444 | Int_t GetNumberOfPileupVerticesSPD() const { |
642f673b | 445 | return (fSPDPileupVertices?fSPDPileupVertices->GetEntriesFast():0); |
04d01397 | 446 | } |
447 | Int_t GetNumberOfPileupVerticesTracks() const { | |
642f673b | 448 | return (fTrkPileupVertices?fTrkPileupVertices->GetEntriesFast():0); |
04d01397 | 449 | } |
c017f53f | 450 | Int_t GetNumberOfTracks() const {return fTracks?fTracks->GetEntriesFast():0;} |
af885e0f | 451 | Int_t GetNumberOfHLTConfMapTracks() const {return 0;} |
452 | // fHLTConfMapTracks->GetEntriesFast();} | |
453 | Int_t GetNumberOfHLTHoughTracks() const {return 0; } | |
454 | // fHLTHoughTracks->GetEntriesFast(); } | |
455 | ||
c017f53f | 456 | Int_t GetNumberOfMuonTracks() const {return fMuonTracks?fMuonTracks->GetEntriesFast():0;} |
fe0324de | 457 | Int_t GetNumberOfMuonClusters(); |
458 | Int_t GetNumberOfMuonPads(); | |
c017f53f | 459 | Int_t GetNumberOfPmdTracks() const {return fPmdTracks?fPmdTracks->GetEntriesFast():0;} |
460 | Int_t GetNumberOfTrdTracks() const {return fTrdTracks?fTrdTracks->GetEntriesFast():0;} | |
52cd0cc0 | 461 | Int_t GetNumberOfTrdTracklets() const {return fTrdTracklets?fTrdTracklets->GetEntriesFast():0;} |
c017f53f | 462 | Int_t GetNumberOfV0s() const {return fV0s?fV0s->GetEntriesFast():0;} |
463 | Int_t GetNumberOfCascades() const {return fCascades?fCascades->GetEntriesFast():0;} | |
464 | Int_t GetNumberOfKinks() const {return fKinks?fKinks->GetEntriesFast():0;} | |
8e1324ab | 465 | |
466 | Int_t GetNumberOfCosmicTracks() const {return fCosmicTracks ? fCosmicTracks->GetEntriesFast():0;} | |
cd1d4ee0 | 467 | Int_t GetEMCALClusters(TRefArray *clusters) const; |
468 | Int_t GetPHOSClusters(TRefArray *clusters) const; | |
c017f53f | 469 | Int_t GetNumberOfCaloClusters() const {return fCaloClusters?fCaloClusters->GetEntriesFast():0;} |
af885e0f | 470 | |
a2fbb067 | 471 | void SetUseOwnList(Bool_t b){fUseOwnList = b;} |
b19cc8d0 | 472 | Bool_t GetUseOwnList() const {return fUseOwnList;} |
e649177a | 473 | |
c017f53f | 474 | void ResetV0s() { if(fV0s) fV0s->Clear(); } |
475 | void ResetCascades() { if(fCascades) fCascades->Clear(); } | |
af885e0f | 476 | void Reset(); |
477 | ||
478 | void Print(Option_t *option="") const; | |
479 | ||
480 | void AddObject(TObject* obj); | |
1d0dd492 | 481 | void ReadFromTree(TTree *tree, Option_t* opt = ""); |
2811495d | 482 | TObject* FindListObject(const char *name) const; |
af885e0f | 483 | AliESD *GetAliESDOld(){return fESDOld;} |
f12d42ce | 484 | void WriteToTree(TTree* tree) const; |
af885e0f | 485 | void GetStdContent(); |
486 | void ResetStdContent(); | |
487 | void CreateStdContent(); | |
a2fbb067 | 488 | void CreateStdContent(Bool_t bUseThisList); |
fe0324de | 489 | void CompleteStdContent(); |
af885e0f | 490 | void SetStdNames(); |
491 | void CopyFromOldESD(); | |
024c7734 | 492 | TList* GetList() const {return fESDObjects;} |
c8fe2783 | 493 | |
494 | //Following needed only for mixed event | |
495 | virtual Int_t EventIndex(Int_t) const {return 0;} | |
496 | virtual Int_t EventIndexForCaloCluster(Int_t) const {return 0;} | |
497 | virtual Int_t EventIndexForPHOSCell(Int_t) const {return 0;} | |
498 | virtual Int_t EventIndexForEMCALCell(Int_t) const {return 0;} | |
499 | ||
a8f382ab | 500 | void SetDetectorStatus(ULong_t detMask) {fDetectorStatus|=detMask;} |
501 | void ResetDetectorStatus(ULong_t detMask) {fDetectorStatus&=~detMask;} | |
502 | ULong_t GetDetectorStatus() const {return fDetectorStatus;} | |
503 | Bool_t IsDetectorOn(ULong_t detMask) const {return (fDetectorStatus&detMask)>0;} | |
af885e0f | 504 | |
766037f0 | 505 | |
af885e0f | 506 | protected: |
507 | AliESDEvent(const AliESDEvent&); | |
102c56c8 | 508 | static Bool_t ResetWithPlacementNew(TObject *pObject); |
af885e0f | 509 | |
fe0324de | 510 | void AddMuonTrack(const AliESDMuonTrack *t); |
511 | ||
af885e0f | 512 | TList *fESDObjects; // List of esd Objects |
513 | ||
514 | AliESDRun *fESDRun; //! Run information tmp put in the Userdata | |
515 | AliESDHeader *fHeader; //! ESD Event Header | |
516 | AliESDZDC *fESDZDC; //! ZDC information | |
517 | AliESDFMD *fESDFMD; //! FMD object containing rough multiplicity | |
518 | AliESDVZERO *fESDVZERO; //! VZERO object containing rough multiplicity | |
519 | AliESDTZERO *fESDTZERO; //! TZEROObject | |
06cc9d95 | 520 | AliESDVertex *fTPCVertex; //! Primary vertex estimated by the TPC |
af885e0f | 521 | AliESDVertex *fSPDVertex; //! Primary vertex estimated by the SPD |
522 | AliESDVertex *fPrimaryVertex; //! Primary vertex estimated using ESD tracks | |
523 | AliMultiplicity *fSPDMult; //! SPD tracklet multiplicity | |
524 | AliESDCaloTrigger* fPHOSTrigger; //! PHOS Trigger information | |
525 | AliESDCaloTrigger* fEMCALTrigger; //! PHOS Trigger information | |
bd95bae7 | 526 | AliESDACORDE *fESDACORDE; //! ACORDE ESD object caontaining bit pattern |
6c8e0967 | 527 | AliESDTrdTrigger *fTrdTrigger; //! TRD trigger information |
af885e0f | 528 | |
04d01397 | 529 | TClonesArray *fSPDPileupVertices;//! Pileup primary vertices reconstructed by SPD |
530 | TClonesArray *fTrkPileupVertices;//! Pileup primary vertices reconstructed using the tracks | |
af885e0f | 531 | TClonesArray *fTracks; //! ESD tracks |
532 | TClonesArray *fMuonTracks; //! MUON ESD tracks | |
fe0324de | 533 | TClonesArray *fMuonClusters; //! MUON ESD clusters |
534 | TClonesArray *fMuonPads; //! MUON ESD pads | |
af885e0f | 535 | TClonesArray *fPmdTracks; //! PMD ESD tracks |
536 | TClonesArray *fTrdTracks; //! TRD ESD tracks (triggered) | |
52cd0cc0 | 537 | TClonesArray *fTrdTracklets; //! TRD tracklets (for trigger) |
af885e0f | 538 | TClonesArray *fV0s; //! V0 vertices |
539 | TClonesArray *fCascades; //! Cascade vertices | |
540 | TClonesArray *fKinks; //! Kinks | |
541 | TClonesArray *fCaloClusters; //! Calorimeter clusters for PHOS/EMCAL | |
e649177a | 542 | AliESDCaloCells *fEMCALCells; //! EMCAL cell info |
543 | AliESDCaloCells *fPHOSCells; //! PHOS cell info | |
8e1324ab | 544 | TClonesArray *fCosmicTracks; //! Tracks created by cosmics finder |
af885e0f | 545 | TClonesArray *fErrorLogs; //! Raw-data reading error messages |
546 | ||
fe0324de | 547 | Bool_t fOldMuonStructure; //! Flag if reading ESD with old MUON structure |
af885e0f | 548 | |
1bd10080 | 549 | AliESD *fESDOld; //! Old esd Structure |
550 | AliESDfriend *fESDFriendOld; //! Old friend esd Structure | |
60e8f114 | 551 | Bool_t fConnected; //! flag if leaves are alreday connected |
a2fbb067 | 552 | Bool_t fUseOwnList; //! Do not use the list from the esdTree but use the one created by this class |
60e8f114 | 553 | |
6989bff3 | 554 | static const char* fgkESDListName[kESDListN]; //! |
af885e0f | 555 | |
f858b00e | 556 | AliTOFHeader *fTOFHeader; //! event times (and sigmas) as estimated by TOF |
557 | // combinatorial algorithm. | |
558 | // It contains also TOF time resolution | |
559 | // and T0spread as written in OCDB | |
fba4b2e2 | 560 | AliCentrality *fCentrality; //! Centrality for AA collision |
ce7adfe9 | 561 | AliEventplane *fEventplane; //! Event plane for AA collision |
a8f382ab | 562 | |
563 | ULong_t fDetectorStatus; // set detector event status bit for good event selection | |
564 | ||
565 | ClassDef(AliESDEvent,17) //ESDEvent class | |
af885e0f | 566 | }; |
567 | #endif | |
568 |