]>
Commit | Line | Data |
---|---|---|
af885e0f | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | /* $Id$ */ | |
17 | ||
18 | //----------------------------------------------------------------- | |
f56a9fa7 | 19 | // Implementation of the AliESDEvent class |
20 | // This is the class to deal with during the phisical analysis of data. | |
21 | // It also ensures the backward compatibility with the old ESD format. | |
22 | // | |
23 | // Origin: Christian Klein-Boesing, CERN, Christian.Klein-Boesing@cern.ch | |
af885e0f | 24 | //----------------------------------------------------------------- |
25 | ||
26 | #include "TList.h" | |
cd1d4ee0 | 27 | #include "TRefArray.h" |
af885e0f | 28 | #include <TNamed.h> |
29 | ||
a023d8d8 | 30 | #include "AliLog.h" |
af885e0f | 31 | #include "AliESDEvent.h" |
32 | #include "AliESDfriend.h" | |
33 | #include "AliESDVZERO.h" | |
34 | #include "AliESDHLTtrack.h" | |
35 | #include "AliESDFMD.h" | |
36 | #include "AliESD.h" | |
f0106218 | 37 | #include "AliESDMuonTrack.h" |
38 | #include "AliESDPmdTrack.h" | |
39 | #include "AliESDTrdTrack.h" | |
40 | #include "AliESDVertex.h" | |
41 | #include "AliESDcascade.h" | |
42 | #include "AliESDPmdTrack.h" | |
43 | #include "AliESDTrdTrack.h" | |
44 | #include "AliESDVertex.h" | |
45 | #include "AliESDcascade.h" | |
46 | #include "AliESDkink.h" | |
47 | #include "AliESDtrack.h" | |
48 | #include "AliESDHLTtrack.h" | |
49 | #include "AliESDCaloCluster.h" | |
50 | #include "AliESDv0.h" | |
51 | #include "AliESDFMD.h" | |
52 | #include "AliESDVZERO.h" | |
53 | #include "AliMultiplicity.h" | |
54 | #include "AliRawDataErrorLog.h" | |
af885e0f | 55 | |
56 | ||
57 | ClassImp(AliESDEvent) | |
58 | ||
60e8f114 | 59 | |
60 | ||
61 | // here we define the names, some classes are no TNamed, therefore the classnames | |
62 | // are the Names | |
63 | const char* AliESDEvent::fESDListName[kESDListN] = {"AliESDRun", | |
64 | "AliESDHeader", | |
65 | "AliESDZDC", | |
66 | "AliESDFMD", | |
67 | "AliESDVZERO", | |
68 | "AliESDTZERO", | |
69 | "SPDVertex", | |
70 | "PrimaryVertex", | |
71 | "AliMultiplicity", | |
72 | "PHOSTrigger", | |
73 | "EMCALTrigger", | |
74 | "Tracks", | |
75 | "MuonTracks", | |
76 | "PmdTracks", | |
77 | "TrdTracks", | |
78 | "V0s", | |
72da5d8c | 79 | "Cascades", |
60e8f114 | 80 | "Kinks", |
81 | "CaloClusters", | |
82 | "AliRawDataErrorLogs"}; | |
af885e0f | 83 | //______________________________________________________________________________ |
84 | AliESDEvent::AliESDEvent(): | |
024c7734 | 85 | AliVEvent(), |
af885e0f | 86 | fESDObjects(new TList()), |
87 | fESDRun(0), | |
88 | fHeader(0), | |
89 | fESDZDC(0), | |
90 | fESDFMD(0), | |
91 | fESDVZERO(0), | |
92 | fESDTZERO(0), | |
93 | fSPDVertex(0), | |
94 | fPrimaryVertex(0), | |
95 | fSPDMult(0), | |
96 | fPHOSTrigger(0), | |
97 | fEMCALTrigger(0), | |
98 | fTracks(0), | |
99 | fMuonTracks(0), | |
100 | fPmdTracks(0), | |
101 | fTrdTracks(0), | |
102 | fV0s(0), | |
103 | fCascades(0), | |
104 | fKinks(0), | |
105 | fCaloClusters(0), | |
106 | fErrorLogs(0), | |
107 | fESDOld(0), | |
60e8f114 | 108 | fConnected(kFALSE), |
af885e0f | 109 | fEMCALClusters(0), |
110 | fFirstEMCALCluster(-1), | |
111 | fPHOSClusters(0), | |
112 | fFirstPHOSCluster(-1) | |
113 | { | |
114 | } | |
115 | //______________________________________________________________________________ | |
116 | AliESDEvent::AliESDEvent(const AliESDEvent& esd): | |
024c7734 | 117 | AliVEvent(esd), |
af885e0f | 118 | fESDObjects(new TList()), |
119 | fESDRun(new AliESDRun(*esd.fESDRun)), | |
120 | fHeader(new AliESDHeader(*esd.fHeader)), | |
121 | fESDZDC(new AliESDZDC(*esd.fESDZDC)), | |
122 | fESDFMD(new AliESDFMD(*esd.fESDFMD)), | |
123 | fESDVZERO(new AliESDVZERO(*esd.fESDVZERO)), | |
124 | fESDTZERO(new AliESDTZERO(*esd.fESDTZERO)), | |
125 | fSPDVertex(new AliESDVertex(*esd.fSPDVertex)), | |
126 | fPrimaryVertex(new AliESDVertex(*esd.fPrimaryVertex)), | |
127 | fSPDMult(new AliMultiplicity(*esd.fSPDMult)), | |
128 | fPHOSTrigger(new AliESDCaloTrigger(*esd.fPHOSTrigger)), | |
129 | fEMCALTrigger(new AliESDCaloTrigger(*esd.fEMCALTrigger)), | |
130 | fTracks(new TClonesArray(*esd.fTracks)), | |
131 | fMuonTracks(new TClonesArray(*esd.fMuonTracks)), | |
132 | fPmdTracks(new TClonesArray(*esd.fPmdTracks)), | |
133 | fTrdTracks(new TClonesArray(*esd.fTrdTracks)), | |
134 | fV0s(new TClonesArray(*esd.fV0s)), | |
135 | fCascades(new TClonesArray(*esd.fCascades)), | |
136 | fKinks(new TClonesArray(*esd.fKinks)), | |
137 | fCaloClusters(new TClonesArray(*esd.fCaloClusters)), | |
138 | fErrorLogs(new TClonesArray(*esd.fErrorLogs)), | |
139 | fESDOld(new AliESD(*esd.fESDOld)), | |
60e8f114 | 140 | fConnected(esd.fConnected), |
af885e0f | 141 | fEMCALClusters(esd.fEMCALClusters), |
142 | fFirstEMCALCluster(esd.fFirstEMCALCluster), | |
143 | fPHOSClusters(esd.fPHOSClusters), | |
144 | fFirstPHOSCluster(esd.fFirstPHOSCluster) | |
145 | ||
146 | { | |
147 | // CKB init in the constructor list and only add here ... | |
148 | AddObject(fESDRun); | |
149 | AddObject(fHeader); | |
150 | AddObject(fESDZDC); | |
151 | AddObject(fESDFMD); | |
152 | AddObject(fESDVZERO); | |
153 | AddObject(fESDTZERO); | |
154 | AddObject(fSPDVertex); | |
155 | AddObject(fPrimaryVertex); | |
156 | AddObject(fSPDMult); | |
157 | AddObject(fPHOSTrigger); | |
158 | AddObject(fEMCALTrigger); | |
159 | AddObject(fTracks); | |
160 | AddObject(fMuonTracks); | |
161 | AddObject(fPmdTracks); | |
162 | AddObject(fTrdTracks); | |
163 | AddObject(fV0s); | |
164 | AddObject(fCascades); | |
165 | AddObject(fKinks); | |
166 | AddObject(fCaloClusters); | |
167 | AddObject(fErrorLogs); | |
168 | ||
169 | GetStdContent(); | |
170 | ||
171 | } | |
172 | ||
173 | //______________________________________________________________________________ | |
174 | AliESDEvent & AliESDEvent::operator=(const AliESDEvent& source) { | |
175 | ||
176 | // Assignment operator | |
177 | ||
178 | if(&source == this) return *this; | |
024c7734 | 179 | AliVEvent::operator=(source); |
af885e0f | 180 | |
181 | fESDRun = new AliESDRun(*source.fESDRun); | |
182 | fHeader = new AliESDHeader(*source.fHeader); | |
183 | fESDZDC = new AliESDZDC(*source.fESDZDC); | |
184 | fESDFMD = new AliESDFMD(*source.fESDFMD); | |
185 | fESDVZERO = new AliESDVZERO(*source.fESDVZERO); | |
186 | fESDTZERO = new AliESDTZERO(*source.fESDTZERO); | |
187 | fSPDVertex = new AliESDVertex(*source.fSPDVertex); | |
188 | fPrimaryVertex = new AliESDVertex(*source.fPrimaryVertex); | |
189 | fSPDMult = new AliMultiplicity(*source.fSPDMult); | |
190 | fPHOSTrigger = new AliESDCaloTrigger(*source.fPHOSTrigger); | |
191 | fEMCALTrigger = new AliESDCaloTrigger(*source.fEMCALTrigger); | |
192 | fTracks = new TClonesArray(*source.fTracks); | |
193 | fMuonTracks = new TClonesArray(*source.fMuonTracks); | |
194 | fPmdTracks = new TClonesArray(*source.fPmdTracks); | |
195 | fTrdTracks = new TClonesArray(*source.fTrdTracks); | |
196 | fV0s = new TClonesArray(*source.fV0s); | |
197 | fCascades = new TClonesArray(*source.fCascades); | |
198 | fKinks = new TClonesArray(*source.fKinks); | |
199 | fCaloClusters = new TClonesArray(*source.fCaloClusters); | |
200 | fErrorLogs = new TClonesArray(*source.fErrorLogs); | |
201 | fESDOld = new AliESD(*source.fESDOld); | |
202 | // CKB this way?? or | |
203 | // or AddObject( fESDZDC = new AliESDZDC(*source.fESDZDC)); | |
204 | ||
205 | fESDObjects = new TList(); | |
206 | AddObject(fESDRun); | |
207 | AddObject(fHeader); | |
208 | AddObject(fESDZDC); | |
209 | AddObject(fESDFMD); | |
210 | AddObject(fESDVZERO); | |
211 | AddObject(fESDTZERO); | |
212 | AddObject(fSPDVertex); | |
213 | AddObject(fPrimaryVertex); | |
214 | AddObject(fSPDMult); | |
215 | AddObject(fPHOSTrigger); | |
216 | AddObject(fEMCALTrigger); | |
217 | AddObject(fTracks); | |
218 | AddObject(fMuonTracks); | |
219 | AddObject(fPmdTracks); | |
220 | AddObject(fTrdTracks); | |
221 | AddObject(fV0s); | |
222 | AddObject(fCascades); | |
223 | AddObject(fKinks); | |
224 | AddObject(fCaloClusters); | |
225 | AddObject(fErrorLogs); | |
226 | ||
60e8f114 | 227 | fConnected = source.fConnected; |
af885e0f | 228 | fEMCALClusters = source.fEMCALClusters; |
229 | fFirstEMCALCluster = source.fFirstEMCALCluster; | |
230 | fPHOSClusters = source.fPHOSClusters; | |
231 | fFirstPHOSCluster = source.fFirstPHOSCluster; | |
232 | ||
233 | ||
234 | ||
235 | return *this; | |
236 | ||
237 | } | |
238 | ||
239 | ||
240 | //______________________________________________________________________________ | |
241 | AliESDEvent::~AliESDEvent() | |
242 | { | |
243 | // | |
244 | // Standard destructor | |
245 | // | |
246 | ||
001b9beb | 247 | // everthing on the list gets deleted automatically |
139f2194 | 248 | |
249 | ||
60e8f114 | 250 | if(fESDObjects&&!fConnected) |
251 | { | |
252 | delete fESDObjects; | |
253 | fESDObjects = 0; | |
254 | } | |
139f2194 | 255 | |
60e8f114 | 256 | |
af885e0f | 257 | } |
258 | ||
259 | //______________________________________________________________________________ | |
260 | void AliESDEvent::Reset() | |
261 | { | |
262 | ||
263 | ||
264 | // Reset the standard contents | |
265 | ResetStdContent(); | |
266 | ||
267 | if(fESDOld)fESDOld->Reset(); | |
001b9beb | 268 | // call reset for user supplied data? |
af885e0f | 269 | } |
270 | ||
271 | void AliESDEvent::ResetStdContent() | |
272 | { | |
273 | // Reset the standard contents | |
274 | if(fESDRun) fESDRun->Reset(); | |
275 | if(fHeader) fHeader->Reset(); | |
276 | if(fESDZDC) fESDZDC->Reset(); | |
277 | if(fESDFMD) fESDFMD->Clear(); // why clear.... need consistend names | |
278 | // if(fESDVZERO) fESDVZERO->; // NOT IMPLEMENTED | |
279 | // if(fESDVZERO) new (fESDVZERO) AliESDVZERO(); | |
280 | if(fESDTZERO) fESDTZERO->Reset(); | |
281 | // CKB no clear/reset implemented | |
282 | if(fSPDVertex){ | |
316c6cd9 | 283 | fSPDVertex->~AliESDVertex(); |
af885e0f | 284 | new (fSPDVertex) AliESDVertex(); |
60e8f114 | 285 | fSPDVertex->SetName(fESDListName[kSPDVertex]); |
af885e0f | 286 | } |
287 | if(fPrimaryVertex){ | |
316c6cd9 | 288 | fPrimaryVertex->~AliESDVertex(); |
af885e0f | 289 | new (fPrimaryVertex) AliESDVertex(); |
60e8f114 | 290 | fPrimaryVertex->SetName(fESDListName[kPrimaryVertex]); |
af885e0f | 291 | } |
316c6cd9 | 292 | if(fSPDMult){ |
293 | fSPDMult->~AliMultiplicity(); | |
294 | new (fSPDMult) AliMultiplicity(); | |
295 | } | |
af885e0f | 296 | if(fPHOSTrigger)fPHOSTrigger->Reset(); |
297 | if(fEMCALTrigger)fEMCALTrigger->Reset(); | |
bc9a7b42 | 298 | if(fTracks)fTracks->Delete(); |
af885e0f | 299 | if(fMuonTracks)fMuonTracks->Clear(); |
300 | if(fPmdTracks)fPmdTracks->Clear(); | |
301 | if(fTrdTracks)fTrdTracks->Clear(); | |
302 | if(fV0s)fV0s->Clear(); | |
303 | if(fCascades)fCascades->Clear(); | |
304 | if(fKinks)fKinks->Clear(); | |
bc9a7b42 | 305 | if(fCaloClusters)fCaloClusters->Delete(); |
16167d49 | 306 | if(fErrorLogs) fErrorLogs->Delete(); |
af885e0f | 307 | |
60e8f114 | 308 | // don't reset fconnected fConnected ; |
309 | ||
af885e0f | 310 | fEMCALClusters=0; |
311 | fFirstEMCALCluster=-1; | |
312 | fPHOSClusters=0; | |
313 | fFirstPHOSCluster=-1; | |
314 | } | |
315 | ||
316 | ||
317 | Int_t AliESDEvent::AddV0(const AliESDv0 *v) { | |
318 | // | |
319 | // Add V0 | |
320 | // | |
321 | TClonesArray &fv = *fV0s; | |
322 | Int_t idx=fV0s->GetEntriesFast(); | |
323 | new(fv[idx]) AliESDv0(*v); | |
324 | return idx; | |
325 | } | |
326 | ||
327 | //______________________________________________________________________________ | |
328 | void AliESDEvent::Print(Option_t *) const | |
329 | { | |
330 | // | |
331 | // Print header information of the event | |
332 | // | |
333 | printf("ESD run information\n"); | |
334 | printf("Event # in file %d Bunch crossing # %d Orbit # %d Period # %d Run # %d Trigger %lld Magnetic field %f \n", | |
335 | GetEventNumberInFile(), | |
336 | GetBunchCrossNumber(), | |
337 | GetOrbitNumber(), | |
338 | GetPeriodNumber(), | |
339 | GetRunNumber(), | |
340 | GetTriggerMask(), | |
341 | GetMagneticField() ); | |
342 | printf("Vertex: (%.4f +- %.4f, %.4f +- %.4f, %.4f +- %.4f) cm\n", | |
343 | fPrimaryVertex->GetXv(), fPrimaryVertex->GetXRes(), | |
344 | fPrimaryVertex->GetYv(), fPrimaryVertex->GetYRes(), | |
345 | fPrimaryVertex->GetZv(), fPrimaryVertex->GetZRes()); | |
346 | printf("Mean vertex in RUN: X=%.4f Y=%.4f cm\n", | |
347 | GetDiamondX(),GetDiamondY()); | |
348 | printf("SPD Multiplicity. Number of tracklets %d \n", | |
349 | fSPDMult->GetNumberOfTracklets()); | |
350 | printf("Number of tracks: \n"); | |
351 | printf(" charged %d\n", GetNumberOfTracks()); | |
352 | printf(" muon %d\n", GetNumberOfMuonTracks()); | |
353 | printf(" pmd %d\n", GetNumberOfPmdTracks()); | |
354 | printf(" trd %d\n", GetNumberOfTrdTracks()); | |
355 | printf(" v0 %d\n", GetNumberOfV0s()); | |
356 | printf(" cascades %d\n", GetNumberOfCascades()); | |
357 | printf(" kinks %d\n", GetNumberOfKinks()); | |
358 | printf(" CaloClusters %d\n", GetNumberOfCaloClusters()); | |
359 | printf(" phos %d\n", GetNumberOfPHOSClusters()); | |
360 | printf(" emcal %d\n", GetNumberOfEMCALClusters()); | |
361 | printf(" FMD %s\n", (fESDFMD ? "yes" : "no")); | |
362 | printf(" VZERO %s\n", (fESDVZERO ? "yes" : "no")); | |
024c7734 | 363 | |
364 | return; | |
af885e0f | 365 | } |
366 | ||
367 | void AliESDEvent::SetESDfriend(const AliESDfriend *ev) { | |
368 | // | |
369 | // Attaches the complementary info to the ESD | |
370 | // | |
371 | if (!ev) return; | |
372 | ||
5300bdab | 373 | // to be sure that we set the tracks also |
374 | // in case of old esds | |
60e8f114 | 375 | // if(fESDOld)CopyFromOldESD(); |
5300bdab | 376 | |
af885e0f | 377 | Int_t ntrk=ev->GetNumberOfTracks(); |
378 | ||
379 | for (Int_t i=0; i<ntrk; i++) { | |
380 | const AliESDfriendTrack *f=ev->GetTrack(i); | |
381 | GetTrack(i)->SetFriendTrack(f); | |
382 | } | |
383 | } | |
384 | ||
a023d8d8 | 385 | Bool_t AliESDEvent::RemoveKink(Int_t rm) { |
386 | // --------------------------------------------------------- | |
387 | // Remove a kink candidate and references to it from ESD, | |
388 | // if this candidate does not come from a reconstructed decay | |
389 | // Not yet implemented... | |
390 | // --------------------------------------------------------- | |
391 | Int_t last=GetNumberOfKinks()-1; | |
392 | if ((rm<0)||(rm>last)) return kFALSE; | |
393 | ||
394 | return kTRUE; | |
395 | } | |
396 | ||
397 | Bool_t AliESDEvent::RemoveV0(Int_t rm) { | |
398 | // --------------------------------------------------------- | |
399 | // Remove a V0 candidate and references to it from ESD, | |
400 | // if this candidate does not come from a reconstructed decay | |
401 | // --------------------------------------------------------- | |
402 | Int_t last=GetNumberOfV0s()-1; | |
403 | if ((rm<0)||(rm>last)) return kFALSE; | |
404 | ||
405 | AliESDv0 *v0=GetV0(rm); | |
406 | Int_t idxP=v0->GetPindex(), idxN=v0->GetNindex(); | |
407 | ||
408 | v0=GetV0(last); | |
409 | Int_t lastIdxP=v0->GetPindex(), lastIdxN=v0->GetNindex(); | |
410 | ||
411 | Int_t used=0; | |
412 | ||
413 | // Check if this V0 comes from a reconstructed decay | |
414 | Int_t ncs=GetNumberOfCascades(); | |
415 | for (Int_t n=0; n<ncs; n++) { | |
416 | AliESDcascade *cs=GetCascade(n); | |
417 | ||
418 | Int_t csIdxP=cs->GetPindex(); | |
419 | Int_t csIdxN=cs->GetNindex(); | |
420 | ||
421 | if (idxP==csIdxP) | |
422 | if (idxN==csIdxN) return kFALSE; | |
423 | ||
424 | if (csIdxP==lastIdxP) | |
425 | if (csIdxN==lastIdxN) used++; | |
426 | } | |
427 | ||
428 | //Replace the removed V0 with the last V0 | |
429 | TClonesArray &a=*fV0s; | |
430 | delete a.RemoveAt(rm); | |
431 | ||
432 | if (rm==last) return kTRUE; | |
433 | ||
434 | //v0 is pointing to the last V0 candidate... | |
435 | new (a[rm]) AliESDv0(*v0); | |
436 | delete a.RemoveAt(last); | |
437 | ||
438 | if (!used) return kTRUE; | |
439 | ||
440 | ||
441 | // Remap the indices of the daughters of reconstructed decays | |
442 | for (Int_t n=0; n<ncs; n++) { | |
443 | AliESDcascade *cs=GetCascade(n); | |
444 | ||
445 | ||
446 | Int_t csIdxP=cs->GetPindex(); | |
447 | Int_t csIdxN=cs->GetNindex(); | |
448 | ||
449 | if (csIdxP==lastIdxP) | |
450 | if (csIdxN==lastIdxN) { | |
451 | cs->AliESDv0::SetIndex(1,idxP); | |
452 | cs->AliESDv0::SetIndex(0,idxN); | |
453 | used--; | |
454 | if (!used) return kTRUE; | |
455 | } | |
456 | } | |
457 | ||
458 | return kTRUE; | |
459 | } | |
460 | ||
7f68891d | 461 | Bool_t AliESDEvent::RemoveTrack(Int_t rm) { |
d64bd07d | 462 | // --------------------------------------------------------- |
7f68891d | 463 | // Remove a track and references to it from ESD, |
464 | // if this track does not come from a reconstructed decay | |
d64bd07d | 465 | // --------------------------------------------------------- |
7f68891d | 466 | Int_t last=GetNumberOfTracks()-1; |
467 | if ((rm<0)||(rm>last)) return kFALSE; | |
468 | ||
469 | Int_t used=0; | |
d64bd07d | 470 | |
471 | // Check if this track comes from a reconstructed decay | |
7f68891d | 472 | Int_t nv0=GetNumberOfV0s(); |
473 | for (Int_t n=0; n<nv0; n++) { | |
474 | AliESDv0 *v0=GetV0(n); | |
475 | ||
476 | Int_t idx=v0->GetNindex(); | |
477 | if (rm==idx) return kFALSE; | |
478 | if (idx==last) used++; | |
479 | ||
480 | idx=v0->GetPindex(); | |
481 | if (rm==idx) return kFALSE; | |
482 | if (idx==last) used++; | |
483 | } | |
484 | ||
485 | Int_t ncs=GetNumberOfCascades(); | |
486 | for (Int_t n=0; n<ncs; n++) { | |
487 | AliESDcascade *cs=GetCascade(n); | |
d64bd07d | 488 | |
7f68891d | 489 | Int_t idx=cs->GetIndex(); |
490 | if (rm==idx) return kFALSE; | |
491 | if (idx==last) used++; | |
492 | } | |
493 | ||
494 | Int_t nkn=GetNumberOfKinks(); | |
495 | for (Int_t n=0; n<nkn; n++) { | |
496 | AliESDkink *kn=GetKink(n); | |
497 | ||
498 | Int_t idx=kn->GetIndex(0); | |
499 | if (rm==idx) return kFALSE; | |
500 | if (idx==last) used++; | |
501 | ||
502 | idx=kn->GetIndex(1); | |
503 | if (rm==idx) return kFALSE; | |
504 | if (idx==last) used++; | |
505 | } | |
d64bd07d | 506 | |
d64bd07d | 507 | |
7f68891d | 508 | //Replace the removed track with the last track |
509 | TClonesArray &a=*fTracks; | |
510 | delete a.RemoveAt(rm); | |
511 | ||
512 | if (rm==last) return kTRUE; | |
513 | ||
514 | AliESDtrack *t=GetTrack(last); | |
515 | t->SetID(rm); | |
516 | new (a[rm]) AliESDtrack(*t); | |
517 | delete a.RemoveAt(last); | |
518 | ||
519 | if (!used) return kTRUE; | |
520 | ||
521 | ||
522 | // Remap the indices of the daughters of reconstructed decays | |
523 | for (Int_t n=0; n<nv0; n++) { | |
524 | AliESDv0 *v0=GetV0(n); | |
525 | if (v0->GetIndex(0)==last) { | |
526 | v0->SetIndex(0,rm); | |
527 | used--; | |
528 | if (!used) return kTRUE; | |
529 | } | |
530 | if (v0->GetIndex(1)==last) { | |
531 | v0->SetIndex(1,rm); | |
532 | used--; | |
533 | if (!used) return kTRUE; | |
534 | } | |
535 | } | |
536 | ||
537 | for (Int_t n=0; n<ncs; n++) { | |
538 | AliESDcascade *cs=GetCascade(n); | |
539 | if (cs->GetIndex()==last) { | |
540 | cs->SetIndex(rm); | |
541 | used--; | |
542 | if (!used) return kTRUE; | |
543 | } | |
544 | } | |
545 | ||
546 | for (Int_t n=0; n<nkn; n++) { | |
547 | AliESDkink *kn=GetKink(n); | |
548 | if (kn->GetIndex(0)==last) { | |
549 | kn->SetIndex(rm,0); | |
550 | used--; | |
551 | if (!used) return kTRUE; | |
552 | } | |
553 | if (kn->GetIndex(1)==last) { | |
554 | kn->SetIndex(rm,1); | |
555 | used--; | |
556 | if (!used) return kTRUE; | |
557 | } | |
558 | } | |
d64bd07d | 559 | |
560 | return kTRUE; | |
561 | } | |
562 | ||
563 | ||
7f68891d | 564 | Bool_t AliESDEvent::Clean(Float_t *cleanPars) { |
565 | // | |
566 | // Remove the data which are not needed for the physics analysis. | |
567 | // | |
a023d8d8 | 568 | // 1) Cleaning the V0 candidates |
569 | // --------------------------- | |
570 | // If the cosine of the V0 pointing angle "csp" and | |
571 | // the DCA between the daughter tracks "dca" does not satisfy | |
572 | // the conditions | |
573 | // | |
574 | // csp > cleanPars[1] + dca/cleanPars[0]*(1.- cleanPars[1]) | |
575 | // | |
576 | // an attempt to remove this V0 candidate from ESD is made. | |
577 | // | |
578 | // The V0 candidate gets removed if it does not belong to any | |
579 | // recosntructed cascade decay | |
580 | // | |
581 | // 12.11.2007, optimal values: cleanPars[0]=0.5, cleanPars[1]=0.999 | |
582 | // | |
583 | // 2) Cleaning the tracks | |
584 | // ---------------------- | |
585 | // If track's transverse parameter is larger than cleanPars[2] | |
7f68891d | 586 | // OR |
a023d8d8 | 587 | // track's longitudinal parameter is larger than cleanPars[3] |
588 | // an attempt to remove this track from ESD is made. | |
7f68891d | 589 | // |
a023d8d8 | 590 | // The track gets removed if it does not come |
591 | // from a reconstructed decay | |
7f68891d | 592 | // |
a023d8d8 | 593 | Bool_t rc=kFALSE; |
594 | ||
595 | Float_t dcaMax=cleanPars[0]; | |
596 | Float_t cspMin=cleanPars[1]; | |
597 | ||
598 | Int_t nV0s=GetNumberOfV0s(); | |
599 | for (Int_t i=nV0s-1; i>=0; i--) { | |
600 | AliESDv0 *v0=GetV0(i); | |
601 | ||
602 | Float_t dca=v0->GetDcaV0Daughters(); | |
603 | Float_t csp=v0->GetV0CosineOfPointingAngle(); | |
604 | Float_t cspcut=cspMin + dca/dcaMax*(1.-cspMin); | |
605 | if (csp > cspcut) continue; | |
606 | ||
607 | if (RemoveV0(i)) rc=kTRUE; | |
608 | } | |
609 | ||
7f68891d | 610 | |
a023d8d8 | 611 | Float_t dmax=cleanPars[2], zmax=cleanPars[3]; |
7f68891d | 612 | |
613 | const AliESDVertex *vertex=GetVertex(); | |
a023d8d8 | 614 | Bool_t vtxOK=vertex->GetStatus(); |
7f68891d | 615 | |
616 | Int_t nTracks=GetNumberOfTracks(); | |
617 | for (Int_t i=nTracks-1; i>=0; i--) { | |
618 | AliESDtrack *track=GetTrack(i); | |
619 | Float_t xy,z; track->GetImpactParameters(xy,z); | |
620 | if ((TMath::Abs(xy) > dmax) || (vtxOK && (TMath::Abs(z) > zmax))) { | |
621 | if (RemoveTrack(i)) rc=kTRUE; | |
622 | } | |
623 | } | |
624 | ||
625 | return rc; | |
626 | } | |
627 | ||
af885e0f | 628 | Int_t AliESDEvent::AddTrack(const AliESDtrack *t) { |
629 | // Add track | |
630 | TClonesArray &ftr = *fTracks; | |
631 | AliESDtrack * track = new(ftr[fTracks->GetEntriesFast()])AliESDtrack(*t); | |
632 | track->SetID(fTracks->GetEntriesFast()-1); | |
633 | return track->GetID(); | |
634 | } | |
635 | ||
f0106218 | 636 | void AliESDEvent::AddMuonTrack(const AliESDMuonTrack *t) { |
637 | TClonesArray &fmu = *fMuonTracks; | |
638 | new(fmu[fMuonTracks->GetEntriesFast()]) AliESDMuonTrack(*t); | |
639 | } | |
640 | ||
641 | void AliESDEvent::AddPmdTrack(const AliESDPmdTrack *t) { | |
642 | TClonesArray &fpmd = *fPmdTracks; | |
643 | new(fpmd[fPmdTracks->GetEntriesFast()]) AliESDPmdTrack(*t); | |
644 | } | |
645 | ||
646 | void AliESDEvent::AddTrdTrack(const AliESDTrdTrack *t) { | |
647 | TClonesArray &ftrd = *fTrdTracks; | |
648 | new(ftrd[fTrdTracks->GetEntriesFast()]) AliESDTrdTrack(*t); | |
649 | } | |
650 | ||
651 | ||
652 | ||
653 | ||
af885e0f | 654 | Int_t AliESDEvent::AddKink(const AliESDkink *c) { |
655 | // Add kink | |
656 | TClonesArray &fk = *fKinks; | |
657 | AliESDkink * kink = new(fk[fKinks->GetEntriesFast()]) AliESDkink(*c); | |
658 | kink->SetID(fKinks->GetEntriesFast()); // CKB different from the other imps.. | |
659 | return fKinks->GetEntriesFast()-1; | |
660 | } | |
661 | ||
f0106218 | 662 | |
663 | void AliESDEvent::AddCascade(const AliESDcascade *c) { | |
664 | TClonesArray &fc = *fCascades; | |
665 | new(fc[fCascades->GetEntriesFast()]) AliESDcascade(*c); | |
666 | } | |
667 | ||
668 | ||
af885e0f | 669 | Int_t AliESDEvent::AddCaloCluster(const AliESDCaloCluster *c) { |
670 | // Add calocluster | |
671 | TClonesArray &fc = *fCaloClusters; | |
672 | AliESDCaloCluster *clus = new(fc[fCaloClusters->GetEntriesFast()]) AliESDCaloCluster(*c); | |
673 | clus->SetID(fCaloClusters->GetEntriesFast()-1); | |
674 | return fCaloClusters->GetEntriesFast()-1; | |
675 | } | |
676 | ||
677 | ||
f0106218 | 678 | void AliESDEvent::AddRawDataErrorLog(const AliRawDataErrorLog *log) { |
679 | TClonesArray &errlogs = *fErrorLogs; | |
680 | new(errlogs[errlogs.GetEntriesFast()]) AliRawDataErrorLog(*log); | |
681 | } | |
682 | ||
60e8f114 | 683 | void AliESDEvent::SetVertex(const AliESDVertex *vertex) { |
684 | // use already allocated space | |
685 | if(fSPDVertex){ | |
316c6cd9 | 686 | *fSPDVertex = *vertex; |
60e8f114 | 687 | fSPDVertex->SetName(fESDListName[kSPDVertex]); |
688 | } | |
689 | } | |
690 | ||
691 | void AliESDEvent::SetPrimaryVertex(const AliESDVertex *vertex) { | |
60e8f114 | 692 | if(fPrimaryVertex){ |
316c6cd9 | 693 | *fPrimaryVertex = *vertex; |
60e8f114 | 694 | fPrimaryVertex->SetName(fESDListName[kPrimaryVertex]); |
695 | } | |
696 | } | |
697 | ||
f0106218 | 698 | void AliESDEvent::SetMultiplicity(const AliMultiplicity *mul) { |
699 | if(fSPDMult){ | |
316c6cd9 | 700 | *fSPDMult = *mul; |
f0106218 | 701 | } |
702 | } | |
703 | ||
704 | ||
af885e0f | 705 | void AliESDEvent::SetFMDData(AliESDFMD * obj) { |
706 | // use already allocated space | |
707 | if(fESDFMD){ | |
316c6cd9 | 708 | *fESDFMD = *obj; |
af885e0f | 709 | } |
710 | } | |
711 | ||
712 | void AliESDEvent::SetVZEROData(AliESDVZERO * obj){ | |
713 | // use already allocated space | |
714 | if(fESDVZERO) | |
715 | new(fESDVZERO) AliESDVZERO(*obj); | |
716 | } | |
717 | ||
718 | void AliESDEvent::GetESDfriend(AliESDfriend *ev) const { | |
719 | // | |
720 | // Extracts the complementary info from the ESD | |
721 | // | |
722 | if (!ev) return; | |
723 | ||
724 | Int_t ntrk=GetNumberOfTracks(); | |
725 | ||
726 | for (Int_t i=0; i<ntrk; i++) { | |
80799a5f | 727 | AliESDtrack *t=GetTrack(i); |
af885e0f | 728 | const AliESDfriendTrack *f=t->GetFriendTrack(); |
729 | ev->AddTrack(f); | |
80799a5f | 730 | |
731 | t->ReleaseESDfriendTrack();// Not to have two copies of "friendTrack" | |
732 | ||
af885e0f | 733 | } |
734 | } | |
735 | ||
736 | ||
737 | void AliESDEvent::AddObject(TObject* obj) | |
738 | { | |
739 | // Add an object to the list of object. | |
740 | // Please be aware that in order to increase performance you should | |
741 | // refrain from using TObjArrays (if possible). Use TClonesArrays, instead. | |
742 | fESDObjects->SetOwner(kTRUE); | |
743 | fESDObjects->AddLast(obj); | |
744 | } | |
745 | ||
746 | ||
747 | void AliESDEvent::GetStdContent() | |
748 | { | |
749 | // set pointers for standard content | |
60e8f114 | 750 | // get by name much safer and not a big overhead since not called very often |
751 | ||
752 | fESDRun = (AliESDRun*)fESDObjects->FindObject(fESDListName[kESDRun]); | |
753 | fHeader = (AliESDHeader*)fESDObjects->FindObject(fESDListName[kHeader]); | |
754 | fESDZDC = (AliESDZDC*)fESDObjects->FindObject(fESDListName[kESDZDC]); | |
755 | fESDFMD = (AliESDFMD*)fESDObjects->FindObject(fESDListName[kESDFMD]); | |
756 | fESDVZERO = (AliESDVZERO*)fESDObjects->FindObject(fESDListName[kESDVZERO]); | |
757 | fESDTZERO = (AliESDTZERO*)fESDObjects->FindObject(fESDListName[kESDTZERO]); | |
758 | fSPDVertex = (AliESDVertex*)fESDObjects->FindObject(fESDListName[kSPDVertex]); | |
759 | fPrimaryVertex = (AliESDVertex*)fESDObjects->FindObject(fESDListName[kPrimaryVertex]); | |
760 | fSPDMult = (AliMultiplicity*)fESDObjects->FindObject(fESDListName[kSPDMult]); | |
761 | fPHOSTrigger = (AliESDCaloTrigger*)fESDObjects->FindObject(fESDListName[kPHOSTrigger]); | |
762 | fEMCALTrigger = (AliESDCaloTrigger*)fESDObjects->FindObject(fESDListName[kEMCALTrigger]); | |
763 | fTracks = (TClonesArray*)fESDObjects->FindObject(fESDListName[kTracks]); | |
764 | fMuonTracks = (TClonesArray*)fESDObjects->FindObject(fESDListName[kMuonTracks]); | |
765 | fPmdTracks = (TClonesArray*)fESDObjects->FindObject(fESDListName[kPmdTracks]); | |
766 | fTrdTracks = (TClonesArray*)fESDObjects->FindObject(fESDListName[kTrdTracks]); | |
767 | fV0s = (TClonesArray*)fESDObjects->FindObject(fESDListName[kV0s]); | |
768 | fCascades = (TClonesArray*)fESDObjects->FindObject(fESDListName[kCascades]); | |
769 | fKinks = (TClonesArray*)fESDObjects->FindObject(fESDListName[kKinks]); | |
770 | fCaloClusters = (TClonesArray*)fESDObjects->FindObject(fESDListName[kCaloClusters]); | |
771 | fErrorLogs = (TClonesArray*)fESDObjects->FindObject(fESDListName[kErrorLogs]); | |
af885e0f | 772 | |
773 | } | |
774 | ||
775 | void AliESDEvent::SetStdNames(){ | |
776 | // Set the names of the standard contents | |
60e8f114 | 777 | // |
778 | if(fESDObjects->GetEntries()==kESDListN){ | |
779 | for(int i = 0;i < fESDObjects->GetEntries();i++){ | |
780 | TObject *fObj = fESDObjects->At(i); | |
781 | if(fObj->InheritsFrom("TNamed")){ | |
782 | ((TNamed*)fObj)->SetName(fESDListName[i]); | |
783 | } | |
784 | else if(fObj->InheritsFrom("TClonesArray")){ | |
785 | ((TClonesArray*)fObj)->SetName(fESDListName[i]); | |
786 | } | |
787 | } | |
788 | } | |
789 | else{ | |
790 | printf("%s:%d SetStdNames() Wrong number of Std Entries \n",(char*)__FILE__,__LINE__); | |
791 | } | |
af885e0f | 792 | } |
793 | ||
794 | void AliESDEvent::CreateStdContent() | |
795 | { | |
796 | // create the standard AOD content and set pointers | |
797 | ||
798 | // create standard objects and add them to the TList of objects | |
799 | AddObject(new AliESDRun()); | |
800 | AddObject(new AliESDHeader()); | |
801 | AddObject(new AliESDZDC()); | |
802 | AddObject(new AliESDFMD()); | |
803 | AddObject(new AliESDVZERO()); | |
804 | AddObject(new AliESDTZERO()); | |
805 | AddObject(new AliESDVertex()); | |
806 | AddObject(new AliESDVertex()); | |
807 | AddObject(new AliMultiplicity()); | |
808 | AddObject(new AliESDCaloTrigger()); | |
809 | AddObject(new AliESDCaloTrigger()); | |
810 | AddObject(new TClonesArray("AliESDtrack",0)); | |
811 | AddObject(new TClonesArray("AliESDMuonTrack",0)); | |
812 | AddObject(new TClonesArray("AliESDPmdTrack",0)); | |
813 | AddObject(new TClonesArray("AliESDTrdTrack",0)); | |
814 | AddObject(new TClonesArray("AliESDv0",0)); | |
815 | AddObject(new TClonesArray("AliESDcascade",0)); | |
816 | AddObject(new TClonesArray("AliESDkink",0)); | |
817 | AddObject(new TClonesArray("AliESDCaloCluster",0)); | |
818 | AddObject(new TClonesArray("AliRawDataErrorLog",0)); | |
819 | ||
820 | // check the order of the indices against enum... | |
821 | ||
af885e0f | 822 | // set names |
823 | SetStdNames(); | |
60e8f114 | 824 | // read back pointers |
825 | GetStdContent(); | |
af885e0f | 826 | } |
827 | ||
001b9beb | 828 | TObject* AliESDEvent::FindListObject(const char *name){ |
829 | if(fESDObjects)return fESDObjects->FindObject(name); | |
830 | return 0; | |
831 | } | |
832 | ||
cd1d4ee0 | 833 | Int_t AliESDEvent::GetPHOSClusters(TRefArray *clusters) const |
834 | { | |
835 | // fills the provided TRefArray with all found phos clusters | |
836 | ||
837 | clusters->Clear(); | |
838 | ||
839 | AliESDCaloCluster *cl = 0; | |
840 | for (Int_t i = 0; i < GetNumberOfCaloClusters(); i++) { | |
841 | ||
842 | if ( cl = GetCaloCluster(i)) { | |
843 | if (cl->IsPHOS()){ | |
844 | clusters->Add(cl); | |
845 | printf("IsPHOS %d Size: %d \n",i,clusters->GetEntriesFast()); | |
846 | } | |
847 | } | |
848 | } | |
849 | return clusters->GetEntriesFast(); | |
850 | } | |
851 | ||
852 | Int_t AliESDEvent::GetEMCALClusters(TRefArray *clusters) const | |
853 | { | |
854 | // fills the provided TRefArray with all found phos clusters | |
855 | ||
856 | clusters->Clear(); | |
857 | ||
858 | AliESDCaloCluster *cl = 0; | |
859 | for (Int_t i = 0; i < GetNumberOfCaloClusters(); i++) { | |
860 | ||
861 | if ( cl = GetCaloCluster(i)) { | |
862 | if (cl->IsEMCAL()){ | |
863 | clusters->Add(cl); | |
864 | printf("IsEMCAL %d Size: %d \n",i,clusters->GetEntriesFast()); | |
865 | } | |
866 | } | |
867 | } | |
868 | return clusters->GetEntriesFast(); | |
869 | } | |
870 | ||
871 | ||
af885e0f | 872 | void AliESDEvent::ReadFromTree(TTree *tree){ |
024c7734 | 873 | |
874 | // load the TTree | |
875 | tree->LoadTree(0); | |
876 | ||
001b9beb | 877 | // if we find the "ESD" branch on the tree we do have the old structure |
af885e0f | 878 | if(tree->GetBranch("ESD")){ |
b93c2026 | 879 | char ** address = (char **)(tree->GetBranch("ESD")->GetAddress()); |
880 | if (!address) { | |
881 | printf("%s %d AliESDEvent::ReadFromTree() Reading old Tree \n",(char*)__FILE__,__LINE__); | |
882 | tree->SetBranchAddress("ESD",&fESDOld); | |
883 | } else { | |
884 | printf("%s %d AliESDEvent::ReadFromTree() Reading old Tree \n",(char*)__FILE__,__LINE__); | |
885 | printf("%s %d Branch already connected. Using existing branch address. \n",(char*)__FILE__,__LINE__); | |
886 | fESDOld = (AliESD*) (*address); | |
887 | } | |
888 | ||
889 | ||
890 | CreateStdContent(); // create for copy | |
891 | // when reading back we are not owner of the list | |
892 | // must not delete it | |
893 | fESDObjects->SetOwner(kFALSE); | |
894 | return; | |
af885e0f | 895 | } |
896 | ||
897 | fESDOld = 0; | |
898 | ||
899 | ||
900 | // Try to find AliESDEvent | |
901 | AliESDEvent *esdEvent = 0; | |
902 | esdEvent = (AliESDEvent*)tree->GetTree()->GetUserInfo()->FindObject("AliESDEvent"); | |
bff64acf | 903 | //esdEvent = (AliESDEvent*)tree->GetUserInfo()->FindObject("AliESDEvent"); |
af885e0f | 904 | |
001b9beb | 905 | if(esdEvent){ |
941603c0 | 906 | // Check if already connected to tree |
139f2194 | 907 | TList* connectedList = (TList*) (tree->GetUserInfo()->FindObject("ESDObjectsConnectedToTree")); |
908 | if (connectedList) { | |
909 | // If connected use the connected list if objects | |
910 | fESDObjects->Delete(); | |
b5bc83df | 911 | fESDObjects = connectedList; |
912 | GetStdContent(); | |
60e8f114 | 913 | fConnected = true; |
139f2194 | 914 | return; |
915 | } | |
916 | // Connect to tree | |
001b9beb | 917 | if(fESDObjects->GetEntries()!=0){ |
918 | // this should not happen here put a warning? | |
919 | } | |
920 | // prevent a memory leak when reading back the TList | |
921 | delete fESDObjects; | |
922 | fESDObjects = 0; | |
af885e0f | 923 | // create a new TList from the UserInfo TList... |
924 | // copy constructor does not work... | |
925 | fESDObjects = (TList*)(esdEvent->GetList()->Clone()); | |
139f2194 | 926 | fESDObjects->SetOwner(kFALSE); |
af885e0f | 927 | if(fESDObjects->GetEntries()<kESDListN){ |
941603c0 | 928 | printf("%s %d AliESDEvent::ReadFromTree() TList contains less than the standard contents %d < %d \n", |
929 | (char*)__FILE__,__LINE__,fESDObjects->GetEntries(),kESDListN); | |
af885e0f | 930 | } |
931 | // set the branch addresses | |
932 | TIter next(fESDObjects); | |
933 | TNamed *el; | |
934 | while((el=(TNamed*)next())){ | |
935 | TString bname(el->GetName()); | |
936 | ||
937 | if(bname.CompareTo("AliESDfriend")==0) | |
938 | { | |
939 | // AliESDfriend does not have a name ... | |
af885e0f | 940 | tree->SetBranchAddress("ESDfriend.",fESDObjects->GetObjectRef(el)); |
941 | } | |
942 | else{ | |
943 | tree->SetBranchAddress(bname.Data(),fESDObjects->GetObjectRef(el)); | |
944 | } | |
945 | } | |
946 | GetStdContent(); | |
947 | // when reading back we are not owner of the list | |
948 | // must not delete it | |
949 | fESDObjects->SetOwner(kFALSE); | |
60e8f114 | 950 | fESDObjects->SetName("ESDObjectsConnectedToTree"); |
139f2194 | 951 | // we are not owner of the list objects |
952 | // must not delete it | |
60e8f114 | 953 | tree->GetUserInfo()->Add(fESDObjects); |
954 | fConnected = true; | |
af885e0f | 955 | }// no esdEvent |
956 | else { | |
001b9beb | 957 | // we can't get the list from the user data, create standard content |
958 | // and set it by hand (no ESDfriend at the moment | |
af885e0f | 959 | CreateStdContent(); |
960 | TIter next(fESDObjects); | |
961 | TNamed *el; | |
962 | while((el=(TNamed*)next())){ | |
963 | TString bname(el->GetName()); | |
964 | tree->SetBranchAddress(bname.Data(),fESDObjects->GetObjectRef(el)); | |
965 | } | |
966 | GetStdContent(); | |
967 | // when reading back we are not owner of the list | |
968 | // must not delete it | |
969 | fESDObjects->SetOwner(kFALSE); | |
970 | } | |
971 | ||
972 | ||
973 | ||
974 | } | |
975 | ||
976 | ||
977 | void AliESDEvent::CopyFromOldESD() | |
978 | { | |
979 | // Method which copies over everthing from the old esd structure to the | |
980 | // new | |
981 | ||
982 | if(fESDOld){ | |
983 | ResetStdContent(); | |
984 | // Run | |
985 | SetRunNumber(fESDOld->GetRunNumber()); | |
986 | SetPeriodNumber(fESDOld->GetPeriodNumber()); | |
987 | SetMagneticField(fESDRun->GetMagneticField()); | |
988 | ||
989 | // leave out diamond ... | |
990 | // SetDiamond(const AliESDVertex *vertex) { fESDRun->SetDiamond(vertex);} | |
991 | ||
992 | // header | |
993 | SetTriggerMask(fESDOld->GetTriggerMask()); | |
994 | SetOrbitNumber(fESDOld->GetOrbitNumber()); | |
995 | SetTimeStamp(fESDOld->GetTimeStamp()); | |
996 | SetEventType(fESDOld->GetEventType()); | |
997 | SetEventNumberInFile(fESDOld->GetEventNumberInFile()); | |
998 | SetBunchCrossNumber(fESDOld->GetBunchCrossNumber()); | |
999 | SetTriggerCluster(fESDOld->GetTriggerCluster()); | |
1000 | ||
1001 | // ZDC | |
1002 | ||
1003 | SetZDC(fESDOld->GetZDCN1Energy(), | |
1004 | fESDOld->GetZDCP1Energy(), | |
1005 | fESDOld->GetZDCEMEnergy(), | |
1006 | fESDOld->GetZDCN2Energy(), | |
1007 | fESDOld->GetZDCP2Energy(), | |
1008 | fESDOld->GetZDCParticipants()); | |
1009 | ||
1010 | // FMD | |
1011 | ||
cb6aa27f | 1012 | if(fESDOld->GetFMDData())SetFMDData(fESDOld->GetFMDData()); |
af885e0f | 1013 | |
1014 | // T0 | |
1015 | ||
1016 | SetT0zVertex(fESDOld->GetT0zVertex()); | |
1017 | SetT0(fESDOld->GetT0()); | |
1018 | // leave amps out | |
1019 | ||
1020 | // VZERO | |
c06eaba2 | 1021 | if (fESDOld->GetVZEROData()) SetVZEROData(fESDOld->GetVZEROData()); |
af885e0f | 1022 | |
cb6aa27f | 1023 | if(fESDOld->GetVertex())SetVertex(fESDOld->GetVertex()); |
af885e0f | 1024 | |
cb6aa27f | 1025 | if(fESDOld->GetPrimaryVertex())SetPrimaryVertex(fESDOld->GetPrimaryVertex()); |
af885e0f | 1026 | |
cb6aa27f | 1027 | if(fESDOld->GetMultiplicity())SetMultiplicity(fESDOld->GetMultiplicity()); |
af885e0f | 1028 | |
1029 | for(int i = 0;i<fESDOld->GetNumberOfTracks();i++){ | |
1030 | AddTrack(fESDOld->GetTrack(i)); | |
1031 | } | |
1032 | ||
1033 | for(int i = 0;i<fESDOld->GetNumberOfMuonTracks();i++){ | |
1034 | AddMuonTrack(fESDOld->GetMuonTrack(i)); | |
1035 | } | |
1036 | ||
1037 | for(int i = 0;i<fESDOld->GetNumberOfPmdTracks();i++){ | |
1038 | AddPmdTrack(fESDOld->GetPmdTrack(i)); | |
1039 | } | |
1040 | ||
1041 | for(int i = 0;i<fESDOld->GetNumberOfTrdTracks();i++){ | |
1042 | AddTrdTrack(fESDOld->GetTrdTrack(i)); | |
1043 | } | |
1044 | ||
1045 | for(int i = 0;i<fESDOld->GetNumberOfV0s();i++){ | |
1046 | AddV0(fESDOld->GetV0(i)); | |
1047 | } | |
1048 | ||
1049 | for(int i = 0;i<fESDOld->GetNumberOfCascades();i++){ | |
1050 | AddCascade(fESDOld->GetCascade(i)); | |
1051 | } | |
1052 | ||
1053 | for(int i = 0;i<fESDOld->GetNumberOfKinks();i++){ | |
1054 | AddKink(fESDOld->GetKink(i)); | |
1055 | } | |
1056 | ||
1057 | ||
1058 | for(int i = 0;i<fESDOld->GetNumberOfCaloClusters();i++){ | |
1059 | AddCaloCluster(fESDOld->GetCaloCluster(i)); | |
1060 | } | |
1061 | }// if fesdold | |
1062 | } | |
1063 | ||
1064 | ||
1065 |