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