]>
Commit | Line | Data |
---|---|---|
9da38871 | 1 | // -*- mode: C++ -*- |
af7ba10c | 2 | #ifndef ALIESD_H |
3 | #define ALIESD_H | |
8a8d023f | 4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
88cb7938 | 7 | |
8 | /* $Id$ */ | |
9 | ||
ae982df3 | 10 | //------------------------------------------------------------------------- |
11 | // Class AliESD | |
12 | // This is the class to deal with during the physical analysis of data | |
13 | // | |
14 | // Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch | |
15 | //------------------------------------------------------------------------- | |
8a8d023f | 16 | |
af7ba10c | 17 | #include <TClonesArray.h> |
18 | #include <TObject.h> | |
64df000d | 19 | #include <TArrayF.h> |
b545009a | 20 | |
af7ba10c | 21 | #include "AliESDMuonTrack.h" |
22 | #include "AliESDPmdTrack.h" | |
0ee00e25 | 23 | #include "AliESDTrdTrack.h" |
af7ba10c | 24 | #include "AliESDVertex.h" |
25 | #include "AliESDcascade.h" | |
51ad6848 | 26 | #include "AliESDkink.h" |
af7ba10c | 27 | #include "AliESDtrack.h" |
af885e0f | 28 | #include "AliESDHLTtrack.h" |
85c60a8e | 29 | #include "AliESDCaloCluster.h" |
af7ba10c | 30 | #include "AliESDv0.h" |
9da38871 | 31 | #include "AliESDFMD.h" |
dd735cf0 | 32 | #include "AliESDVZERO.h" |
32e449be | 33 | #include "AliMultiplicity.h" |
899ca440 | 34 | #include "AliRawDataErrorLog.h" |
bd95bae7 | 35 | #include "AliESDACORDE.h" |
820b4d9e | 36 | #ifdef MFT_UPGRADE |
37 | //#include "AliESDMFT.h" | |
38 | #endif | |
8a8d023f | 39 | |
d75007f6 | 40 | class AliESDfriend; |
53203d32 | 41 | |
ae982df3 | 42 | class AliESD : public TObject { |
8a8d023f | 43 | public: |
ae982df3 | 44 | AliESD(); |
e149da78 | 45 | AliESD(const AliESD&); |
af7ba10c | 46 | virtual ~AliESD(); |
8a8d023f | 47 | |
d75007f6 | 48 | void SetESDfriend(const AliESDfriend *f); |
49 | void GetESDfriend(AliESDfriend *f) const; | |
50 | ||
af885e0f | 51 | void SetEventNumberInFile(Int_t n) {fEventNumberInFile=n;} |
52 | void SetBunchCrossNumber(UShort_t n) {fBunchCrossNumber=n;} | |
53 | void SetOrbitNumber(UInt_t n) {fOrbitNumber=n;} | |
54 | void SetPeriodNumber(UInt_t n) {fPeriodNumber=n;} | |
55 | void SetRunNumber(Int_t n) {fRunNumber=n;} | |
56 | void SetTimeStamp(UInt_t timeStamp){fTimeStamp = timeStamp;} | |
57 | void SetEventType(UInt_t eventType){fEventType = eventType;} | |
58 | void SetTriggerMask(ULong64_t n) {fTriggerMask=n;} | |
59 | void SetTriggerCluster(UChar_t n) {fTriggerCluster = n;} | |
60 | void SetMagneticField(Float_t mf){fMagneticField = mf;} | |
61 | Float_t GetMagneticField() const {return fMagneticField;} | |
62 | ||
63 | AliESDtrack *GetTrack(Int_t i) const { | |
64 | return (AliESDtrack *)fTracks.UncheckedAt(i); | |
482070f2 | 65 | } |
af885e0f | 66 | AliESDHLTtrack *GetHLTConfMapTrack(Int_t i) const { |
67 | return (AliESDHLTtrack *)fHLTConfMapTracks.UncheckedAt(i); | |
482070f2 | 68 | } |
af885e0f | 69 | AliESDHLTtrack *GetHLTHoughTrack(Int_t i) const { |
70 | return (AliESDHLTtrack *)fHLTHoughTracks.UncheckedAt(i); | |
672b5f43 | 71 | } |
af885e0f | 72 | AliESDMuonTrack *GetMuonTrack(Int_t i) const { |
73 | return (AliESDMuonTrack *)fMuonTracks.UncheckedAt(i); | |
561b7b31 | 74 | } |
af885e0f | 75 | AliESDPmdTrack *GetPmdTrack(Int_t i) const { |
76 | return (AliESDPmdTrack *)fPmdTracks.UncheckedAt(i); | |
ae982df3 | 77 | } |
af885e0f | 78 | AliESDTrdTrack *GetTrdTrack(Int_t i) const { |
79 | return (AliESDTrdTrack *)fTrdTracks.UncheckedAt(i); | |
53203d32 | 80 | } |
53203d32 | 81 | |
7f68891d | 82 | Bool_t Clean(Float_t *cleanPars); |
a023d8d8 | 83 | Bool_t RemoveKink(Int_t i); |
84 | Bool_t RemoveV0(Int_t i); | |
7f68891d | 85 | Bool_t RemoveTrack(Int_t i); |
d64bd07d | 86 | |
af885e0f | 87 | Int_t AddTrack(const AliESDtrack *t) { |
6989bff3 | 88 | AliESDtrack * track = new(fTracks[fTracks.GetEntriesFast()]) AliESDtrack(*t);track->SetID(fTracks.GetEntriesFast()-1);return track->GetID(); |
482070f2 | 89 | } |
af885e0f | 90 | void AddHLTConfMapTrack(const AliESDHLTtrack *t) { |
91 | new(fHLTConfMapTracks[fHLTConfMapTracks.GetEntriesFast()]) AliESDHLTtrack(*t); | |
53203d32 | 92 | } |
af885e0f | 93 | void AddHLTHoughTrack(const AliESDHLTtrack *t) { |
94 | new(fHLTHoughTracks[fHLTHoughTracks.GetEntriesFast()]) AliESDHLTtrack(*t); | |
482070f2 | 95 | } |
672b5f43 | 96 | void AddMuonTrack(const AliESDMuonTrack *t) { |
af885e0f | 97 | new(fMuonTracks[fMuonTracks.GetEntriesFast()]) AliESDMuonTrack(*t); |
672b5f43 | 98 | } |
561b7b31 | 99 | void AddPmdTrack(const AliESDPmdTrack *t) { |
af885e0f | 100 | new(fPmdTracks[fPmdTracks.GetEntriesFast()]) AliESDPmdTrack(*t); |
561b7b31 | 101 | } |
0ee00e25 | 102 | void AddTrdTrack(const AliESDTrdTrack *t) { |
af885e0f | 103 | new(fTrdTracks[fTrdTracks.GetEntriesFast()]) AliESDTrdTrack(*t); |
0ee00e25 | 104 | } |
8a8d023f | 105 | |
873f1f73 | 106 | AliESDv0 *GetV0(Int_t i) const { |
af885e0f | 107 | return (AliESDv0 *)fV0s.UncheckedAt(i); |
e23730c7 | 108 | } |
d6a49f20 | 109 | Int_t AddV0(const AliESDv0 *v); |
e23730c7 | 110 | |
873f1f73 | 111 | AliESDcascade *GetCascade(Int_t i) const { |
af885e0f | 112 | return (AliESDcascade *)fCascades.UncheckedAt(i); |
e23730c7 | 113 | } |
114 | void AddCascade(const AliESDcascade *c) { | |
af885e0f | 115 | new(fCascades[fCascades.GetEntriesFast()]) AliESDcascade(*c); |
e23730c7 | 116 | } |
117 | ||
51ad6848 | 118 | AliESDkink *GetKink(Int_t i) const { |
af885e0f | 119 | return (AliESDkink *)fKinks.UncheckedAt(i); |
120 | } | |
121 | Int_t AddKink(const AliESDkink *c) { | |
122 | AliESDkink * kink = new(fKinks[fKinks.GetEntriesFast()]) AliESDkink(*c); | |
123 | kink->SetID(fKinks.GetEntriesFast()); | |
124 | return fKinks.GetEntriesFast()-1; | |
51ad6848 | 125 | } |
51ad6848 | 126 | |
85c60a8e | 127 | AliESDCaloCluster *GetCaloCluster(Int_t i) const { |
af885e0f | 128 | return (AliESDCaloCluster *)fCaloClusters.UncheckedAt(i); |
129 | } | |
130 | Int_t AddCaloCluster(const AliESDCaloCluster *c) { | |
131 | AliESDCaloCluster *clus = new(fCaloClusters[fCaloClusters.GetEntriesFast()]) AliESDCaloCluster(*c); | |
132 | clus->SetID(fCaloClusters.GetEntriesFast()-1); | |
133 | return fCaloClusters.GetEntriesFast()-1; | |
85c60a8e | 134 | } |
af885e0f | 135 | |
136 | void AddPHOSTriggerPosition(TArrayF array) { fPHOSTriggerPosition = new TArrayF(array) ; } | |
137 | void AddPHOSTriggerAmplitudes(TArrayF array) { fPHOSTriggerAmplitudes = new TArrayF(array) ; } | |
138 | void AddEMCALTriggerPosition(TArrayF array) { fEMCALTriggerPosition = new TArrayF(array) ; } | |
139 | void AddEMCALTriggerAmplitudes(TArrayF array){ fEMCALTriggerAmplitudes = new TArrayF(array) ; } | |
873f1f73 | 140 | |
af885e0f | 141 | void SetVertex(const AliESDVertex *vertex) { |
142 | new (&fSPDVertex) AliESDVertex(*vertex); | |
9f57c1aa | 143 | } |
af885e0f | 144 | const AliESDVertex *GetVertex() const {return &fSPDVertex;} |
145 | ||
146 | void SetMultiplicity(const AliMultiplicity *mul) { | |
147 | new (&fSPDMult) AliMultiplicity(*mul); | |
9f57c1aa | 148 | } |
af885e0f | 149 | const AliMultiplicity *GetMultiplicity() const {return &fSPDMult;} |
9f57c1aa | 150 | |
af885e0f | 151 | void SetPrimaryVertex(const AliESDVertex *vertex) { |
152 | new (&fPrimaryVertex) AliESDVertex(*vertex); | |
153 | } | |
154 | const AliESDVertex *GetPrimaryVertex() const {return &fPrimaryVertex;} | |
155 | ||
6989bff3 | 156 | void SetDiamond(const AliESDVertex *vertex); |
af885e0f | 157 | Float_t GetDiamondX() const {return fDiamondXY[0];} |
158 | Float_t GetDiamondY() const {return fDiamondXY[1];} | |
159 | Float_t GetSigma2DiamondX() const {return fDiamondCovXY[0];} | |
160 | Float_t GetSigma2DiamondY() const {return fDiamondCovXY[2];} | |
161 | void GetDiamondCovXY(Float_t cov[3]) const { | |
162 | for(Int_t i=0;i<3;i++) cov[i]=fDiamondCovXY[i]; return; | |
163 | } | |
164 | ||
165 | Int_t GetEventNumberInFile() const {return fEventNumberInFile;} | |
166 | UShort_t GetBunchCrossNumber() const {return fBunchCrossNumber;} | |
167 | UInt_t GetOrbitNumber() const {return fOrbitNumber;} | |
168 | UInt_t GetPeriodNumber() const {return fPeriodNumber;} | |
169 | Int_t GetRunNumber() const {return fRunNumber;} | |
170 | UInt_t GetTimeStamp() const { return fTimeStamp;} | |
171 | UInt_t GetEventType() const { return fEventType;} | |
172 | ULong64_t GetTriggerMask() const {return fTriggerMask;} | |
173 | UChar_t GetTriggerCluster() const {return fTriggerCluster;} | |
174 | ||
175 | Int_t GetNumberOfTracks() const {return fTracks.GetEntriesFast();} | |
176 | Int_t GetNumberOfHLTConfMapTracks() const {return fHLTConfMapTracks.GetEntriesFast();} | |
177 | Int_t GetNumberOfHLTHoughTracks() const {return fHLTHoughTracks.GetEntriesFast();} | |
178 | Int_t GetNumberOfMuonTracks() const {return fMuonTracks.GetEntriesFast();} | |
179 | Int_t GetNumberOfPmdTracks() const {return fPmdTracks.GetEntriesFast();} | |
180 | Int_t GetNumberOfTrdTracks() const {return fTrdTracks.GetEntriesFast();} | |
181 | Int_t GetNumberOfV0s() const {return fV0s.GetEntriesFast();} | |
182 | Int_t GetNumberOfCascades() const {return fCascades.GetEntriesFast();} | |
183 | Int_t GetNumberOfKinks() const {return fKinks.GetEntriesFast();} | |
184 | Int_t GetNumberOfCaloClusters() const {return fCaloClusters.GetEntriesFast();} | |
85c60a8e | 185 | |
186 | Int_t GetNumberOfEMCALClusters() const {return fEMCALClusters;} | |
187 | void SetNumberOfEMCALClusters(Int_t clus) {fEMCALClusters = clus;} | |
188 | Int_t GetFirstEMCALCluster() const {return fFirstEMCALCluster;} | |
189 | void SetFirstEMCALCluster(Int_t index) {fFirstEMCALCluster = index;} | |
af885e0f | 190 | TArrayF *GetEMCALTriggerPosition() const {return fEMCALTriggerPosition;} |
191 | TArrayF *GetEMCALTriggerAmplitudes() const {return fEMCALTriggerAmplitudes;} | |
85c60a8e | 192 | |
193 | Int_t GetNumberOfPHOSClusters() const {return fPHOSClusters;} | |
194 | void SetNumberOfPHOSClusters(Int_t part) { fPHOSClusters = part ; } | |
195 | void SetFirstPHOSCluster(Int_t index) { fFirstPHOSCluster = index ; } | |
196 | Int_t GetFirstPHOSCluster() const { return fFirstPHOSCluster ; } | |
af885e0f | 197 | TArrayF *GetPHOSTriggerPosition() const {return fPHOSTriggerPosition;} |
198 | TArrayF *GetPHOSTriggerAmplitudes() const {return fPHOSTriggerAmplitudes;} | |
199 | ||
200 | ||
adf36b9d | 201 | Double32_t GetT0zVertex() const {return fT0zVertex;} |
202 | void SetT0zVertex(Double32_t z) {fT0zVertex=z;} | |
203 | Double32_t GetT0() const {return fT0timeStart;} | |
204 | void SetT0(Double32_t timeStart) {fT0timeStart = timeStart;} | |
571b0564 | 205 | Float_t GetT0clock() const {return fT0clock;} |
206 | void SetT0clock(Float_t timeStart) {fT0clock = timeStart;} | |
adf36b9d | 207 | Double32_t GetT0TOF(Int_t i) const {return fT0TOF[i];} |
208 | const Double32_t * GetT0TOF() const {return fT0TOF;} | |
209 | void SetT0TOF(Int_t icase, Float_t time) { fT0TOF[icase] = time;} | |
210 | Int_t GetT0Trig() const {return fT0trig;} | |
211 | void SetT0Trig(Int_t tvdc) {fT0trig = tvdc;} | |
212 | const Double32_t * GetT0time() const {return fT0time;} | |
213 | void SetT0time(Double32_t time[24]) { | |
214 | for (Int_t i=0; i<24; i++) fT0time[i] = time[i]; | |
af885e0f | 215 | } |
adf36b9d | 216 | const Double32_t * GetT0amplitude() const {return fT0amplitude;} |
217 | void SetT0amplitude(Double32_t amp[24]) { | |
af885e0f | 218 | for (Int_t i=0; i<24; i++) fT0amplitude[i] = amp[i]; |
219 | } | |
571b0564 | 220 | |
af885e0f | 221 | Float_t GetZDCN1Energy() const {return fZDCN1Energy;} |
222 | Float_t GetZDCP1Energy() const {return fZDCP1Energy;} | |
223 | Float_t GetZDCN2Energy() const {return fZDCN2Energy;} | |
224 | Float_t GetZDCP2Energy() const {return fZDCP2Energy;} | |
225 | Float_t GetZDCEMEnergy() const {return fZDCEMEnergy;} | |
226 | Int_t GetZDCParticipants() const {return fZDCParticipants;} | |
227 | void SetZDC(Float_t n1Energy, Float_t p1Energy, Float_t emEnergy, | |
228 | Float_t n2Energy, Float_t p2Energy, Int_t participants) | |
229 | {fZDCN1Energy=n1Energy; fZDCP1Energy=p1Energy; fZDCEMEnergy=emEnergy; | |
230 | fZDCN2Energy=n2Energy; fZDCP2Energy=p2Energy; fZDCParticipants=participants;} | |
ef278eae | 231 | |
af885e0f | 232 | void ResetV0s() { fV0s.Clear(); } |
233 | void ResetCascades() { fCascades.Clear(); } | |
50ca5f39 | 234 | void Reset(); |
bf25155c | 235 | |
ef278eae | 236 | void Print(Option_t *option="") const; |
9da38871 | 237 | |
af885e0f | 238 | void SetFMDData(AliESDFMD * obj) { fESDFMD = new AliESDFMD(*obj); } |
239 | AliESDFMD *GetFMDData(){ return fESDFMD; } | |
240 | ||
241 | void SetVZEROData(AliESDVZERO * obj) { fESDVZERO = new AliESDVZERO(*obj); } | |
242 | AliESDVZERO *GetVZEROData(){ return fESDVZERO; } | |
820b4d9e | 243 | #ifdef MFT_UPGRADE |
244 | //void SetMFTData(AliESDMFT * obj) { fESDMFT = new AliESDMFT(*obj); } | |
245 | //AliESDMFT *GetMFTData(){ return fESDMFT; } | |
246 | #endif | |
bd95bae7 | 247 | void SetACORDEData(AliESDACORDE * obj){ fESDACORDE = new AliESDACORDE(*obj); } |
248 | AliESDACORDE *GetACORDEDAta(){ return fESDACORDE; } | |
af885e0f | 249 | AliRawDataErrorLog *GetErrorLog(Int_t i) const { |
250 | return (AliRawDataErrorLog *)fErrorLogs.UncheckedAt(i); | |
251 | } | |
252 | void AddRawDataErrorLog(const AliRawDataErrorLog *log) { | |
253 | new(fErrorLogs[fErrorLogs.GetEntriesFast()]) AliRawDataErrorLog(*log); | |
254 | } | |
255 | Int_t GetNumberOfErrorLogs() const {return fErrorLogs.GetEntriesFast();} | |
8a8d023f | 256 | |
af885e0f | 257 | protected: |
e149da78 | 258 | AliESD &operator=(const AliESD& source); |
8a8d023f | 259 | |
af885e0f | 260 | // Event Identification |
261 | ||
262 | Int_t fEventNumberInFile;// running Event count in the file | |
263 | UShort_t fBunchCrossNumber;// Bunch Crossing Number | |
264 | UInt_t fOrbitNumber; // Orbit Number | |
265 | UInt_t fPeriodNumber; // Period Number | |
266 | Int_t fRunNumber; // Run Number | |
267 | UInt_t fTimeStamp; // Time stamp | |
268 | UInt_t fEventType; // Type of Event | |
269 | ULong64_t fTriggerMask; // Trigger Type (mask) | |
270 | UChar_t fTriggerCluster; // Trigger cluster (mask) | |
271 | Int_t fRecoVersion; // Version of reconstruction | |
272 | Float_t fMagneticField; // Solenoid Magnetic Field in kG : for compatibility with AliMagF | |
273 | ||
274 | Float_t fZDCN1Energy; // reconstructed energy in the neutron ZDC | |
275 | Float_t fZDCP1Energy; // reconstructed energy in the proton ZDC | |
276 | Float_t fZDCN2Energy; // reconstructed energy in the neutron ZDC | |
277 | Float_t fZDCP2Energy; // reconstructed energy in the proton ZDC | |
278 | Float_t fZDCEMEnergy; // reconstructed energy in the electromagnetic ZDC | |
279 | Int_t fZDCParticipants; // number of participants estimated by the ZDC | |
280 | ||
adf36b9d | 281 | |
282 | Double32_t fT0zVertex; // vertex z position estimated by the T0 | |
af885e0f | 283 | AliESDVertex fSPDVertex; // Primary vertex estimated by the SPD |
284 | AliESDVertex fPrimaryVertex; // Primary vertex estimated using ESD tracks | |
285 | Float_t fDiamondXY[2]; // Interaction diamond (x,y) in RUN | |
286 | Float_t fDiamondCovXY[3]; // Interaction diamond covariance (x,y) in RUN | |
287 | AliMultiplicity fSPDMult; // SPD tracklet multiplicity | |
288 | ||
adf36b9d | 289 | Float_t fT0clock; // backward compatibility |
290 | Double32_t fT0TOF[3]; // interaction time in ns ( A&C, A, C) | |
291 | Double32_t fT0timeStart; // interaction time estimated by the T0 | |
292 | Int_t fT0trig; // T0 trigger signals | |
293 | Double32_t fT0time[24]; // best TOF on each T0 PMT | |
294 | Double32_t fT0amplitude[24]; // number of particles(MIPs) on each T0 PMT | |
295 | ||
af885e0f | 296 | |
297 | TClonesArray fTracks; // ESD tracks | |
298 | TClonesArray fHLTConfMapTracks;// HLT ESD tracks from Conformal Mapper method | |
299 | TClonesArray fHLTHoughTracks; // HLT ESD tracks from Hough Transform method | |
300 | TClonesArray fMuonTracks; // MUON ESD tracks | |
301 | TClonesArray fPmdTracks; // PMD ESD tracks | |
302 | TClonesArray fTrdTracks; // TRD ESD tracks (triggered) | |
303 | TClonesArray fV0s; // V0 vertices | |
304 | TClonesArray fCascades; // Cascade vertices | |
305 | TClonesArray fKinks; // Kinks | |
306 | TClonesArray fCaloClusters; // Calorimeter clusters for PHOS/EMCAL | |
85c60a8e | 307 | Int_t fEMCALClusters; // Number of EMCAL clusters (subset of caloclusters) |
308 | Int_t fFirstEMCALCluster; // First EMCAL cluster in the fCaloClusters list | |
af885e0f | 309 | TArrayF *fEMCALTriggerPosition; ///(x,y,z of 2x2 and x,y,z of nxn) not position of centroid but of patch corner |
310 | TArrayF *fEMCALTriggerAmplitudes; //(2x2 max ampl, 2x2 amp out of patch, nxn max ampl, nxn amp out of patch) | |
85c60a8e | 311 | |
312 | Int_t fPHOSClusters; // Number of PHOS clusters (subset of caloclusters) | |
313 | Int_t fFirstPHOSCluster; // First PHOS cluster in the fCaloClusters list | |
af885e0f | 314 | TArrayF *fPHOSTriggerPosition; //(x,y,z of 2x2 and x,y,z of nxn), not position of centroid but of patch corner |
315 | TArrayF *fPHOSTriggerAmplitudes; //(2x2 max ampl, 2x2 amp out of patch, nxn max ampl, nxn amp out of patch) | |
316 | ||
317 | AliESDFMD *fESDFMD; // FMD object containing rough multiplicity | |
318 | AliESDVZERO *fESDVZERO; // VZERO object containing rough multiplicity | |
bd95bae7 | 319 | AliESDACORDE *fESDACORDE; // ACORDE ESD object containing bit pattern |
820b4d9e | 320 | #ifdef MFT_UPGRADE |
321 | //AliESDMFT *fESDMFT; // MFT object containing rough multiplicity | |
322 | #endif | |
af885e0f | 323 | TClonesArray fErrorLogs; // Raw-data reading error messages |
899ca440 | 324 | |
571b0564 | 325 | ClassDef(AliESD,23) //ESD class |
8a8d023f | 326 | }; |
8a8d023f | 327 | #endif |
328 |