]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/ESD/AliESD.cxx
better just warning than error in case of mirrors requesting when putting to local...
[u/mrichter/AliRoot.git] / STEER / ESD / AliESD.cxx
CommitLineData
8a8d023f 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
acd84897 16/* $Id$ */
8a8d023f 17
ae982df3 18//-----------------------------------------------------------------
19// Implementation of the ESD class
20// This is the class to deal with during the phisical analysis of data
af7ba10c 21// This class is generated directly by the reconstruction methods
ae982df3 22// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
23//-----------------------------------------------------------------
8a8d023f 24
b545009a 25#include "AliESD.h"
26#include "AliESDfriend.h"
53203d32 27
28ClassImp(AliESD)
29
30//______________________________________________________________________________
31AliESD::AliESD():
af885e0f 32 fEventNumberInFile(0),
33 fBunchCrossNumber(0),
34 fOrbitNumber(0),
35 fPeriodNumber(0),
36 fRunNumber(0),
37 fTimeStamp(0),
38 fEventType(0),
39 fTriggerMask(0),
40 fTriggerCluster(0),
41 fRecoVersion(0),
42 fMagneticField(0),
43 fZDCN1Energy(0),
44 fZDCP1Energy(0),
45 fZDCN2Energy(0),
46 fZDCP2Energy(0),
47 fZDCEMEnergy(0),
48 fZDCParticipants(0),
49 fT0zVertex(0),
50 fSPDVertex(),
51 fPrimaryVertex(),
52 fSPDMult(),
0f0c06de 53 fT0clock(0),
adf36b9d 54 fT0timeStart(0),
55 fT0trig(0),
af885e0f 56 fTracks("AliESDtrack",15000),
57 fHLTConfMapTracks("AliESDHLTtrack",25000),
58 fHLTHoughTracks("AliESDHLTtrack",15000),
59 fMuonTracks("AliESDMuonTrack",30),
60 fPmdTracks("AliESDPmdTrack",3000),
61 fTrdTracks("AliESDTrdTrack",300),
62 fV0s("AliESDv0",200),
63 fCascades("AliESDcascade",20),
64 fKinks("AliESDkink",4000),
65 fCaloClusters("AliESDCaloCluster",10000),
85c60a8e 66 fEMCALClusters(0),
67 fFirstEMCALCluster(-1),
af885e0f 68 fEMCALTriggerPosition(0x0),
69 fEMCALTriggerAmplitudes(0x0),
85c60a8e 70 fPHOSClusters(0),
af885e0f 71 fFirstPHOSCluster(-1),
72 fPHOSTriggerPosition(0x0),
73 fPHOSTriggerAmplitudes(0x0),
74 fESDFMD(0x0),
75 fESDVZERO(0x0),
bd95bae7 76 fESDACORDE(0x0),
af885e0f 77 fErrorLogs("AliRawDataErrorLog",5)
820b4d9e 78 #ifdef MFT_UPGRADE
79 // ,fESDMFT(0x0)
80 #endif
9da38871 81{
6989bff3 82 //
83 // Standar constructor
84 //
85
adf36b9d 86 for (Int_t i=0; i<3; i++) fT0TOF[i] = 0;
87 for (Int_t i=0; i<24; i++) {
af885e0f 88 fT0time[i] = 0;
89 fT0amplitude[i] = 0;
90 }
91 for (Int_t i=0; i<2; i++) fDiamondXY[i]=0.;
92 for (Int_t i=0; i<3; i++) fDiamondCovXY[i]=0.;
873f1f73 93}
e149da78 94
c028b974 95//______________________________________________________________________________
96AliESD::AliESD(const AliESD& esd):
97 TObject(esd),
af885e0f 98 fEventNumberInFile(esd.fEventNumberInFile),
99 fBunchCrossNumber(esd.fBunchCrossNumber),
100 fOrbitNumber(esd.fOrbitNumber),
101 fPeriodNumber(esd.fPeriodNumber),
102 fRunNumber(esd.fRunNumber),
103 fTimeStamp(esd.fTimeStamp),
104 fEventType(esd.fEventType),
105 fTriggerMask(esd.fTriggerMask),
106 fTriggerCluster(esd.fTriggerCluster),
107 fRecoVersion(esd.fRecoVersion),
108 fMagneticField(esd.fMagneticField),
109 fZDCN1Energy(esd.fZDCN1Energy),
110 fZDCP1Energy(esd.fZDCP1Energy),
111 fZDCN2Energy(esd.fZDCN2Energy),
112 fZDCP2Energy(esd.fZDCP2Energy),
113 fZDCEMEnergy(esd.fZDCEMEnergy),
114 fZDCParticipants(esd.fZDCParticipants),
115 fT0zVertex(esd.fT0zVertex),
116 fSPDVertex(esd.fSPDVertex),
117 fPrimaryVertex(esd.fPrimaryVertex),
118 fSPDMult(esd.fSPDMult),
0f0c06de 119 fT0clock(esd.fT0clock),
d999f2e6 120 fT0timeStart(esd.fT0timeStart),
adf36b9d 121 fT0trig(esd.fT0trig),
af885e0f 122 fTracks(*((TClonesArray*)esd.fTracks.Clone())),
123 fHLTConfMapTracks(*((TClonesArray*)esd.fHLTConfMapTracks.Clone())),
124 fHLTHoughTracks(*((TClonesArray*)esd.fHLTHoughTracks.Clone())),
125 fMuonTracks(*((TClonesArray*)esd.fMuonTracks.Clone())),
126 fPmdTracks(*((TClonesArray*)esd.fPmdTracks.Clone())),
127 fTrdTracks(*((TClonesArray*)esd.fTrdTracks.Clone())),
128 fV0s(*((TClonesArray*)esd.fV0s.Clone())),
129 fCascades(*((TClonesArray*)esd.fCascades.Clone())),
130 fKinks(*((TClonesArray*)esd.fKinks.Clone())),
131 fCaloClusters(*((TClonesArray*)esd.fCaloClusters.Clone())),
c028b974 132 fEMCALClusters(esd.fEMCALClusters),
133 fFirstEMCALCluster(esd.fFirstEMCALCluster),
af885e0f 134 fEMCALTriggerPosition(esd. fEMCALTriggerPosition),
135 fEMCALTriggerAmplitudes(esd.fEMCALTriggerAmplitudes),
c028b974 136 fPHOSClusters(esd.fPHOSClusters),
af885e0f 137 fFirstPHOSCluster(esd.fFirstPHOSCluster),
138 fPHOSTriggerPosition(esd.fPHOSTriggerPosition),
139 fPHOSTriggerAmplitudes(esd.fPHOSTriggerAmplitudes),
140 fESDFMD(esd.fESDFMD),
141 fESDVZERO(esd.fESDVZERO),
bd95bae7 142 fESDACORDE(esd.fESDACORDE),
af885e0f 143 fErrorLogs(*((TClonesArray*)esd.fErrorLogs.Clone()))
820b4d9e 144 #ifdef MFT_UPGRADE
145 //, fESDMFT(esd.fESDMFT)
146 #endif
c028b974 147{
6989bff3 148 //
149 // copy constructor
150 //
adf36b9d 151 for (Int_t i=0; i<3; i++)fT0TOF[i] = esd.fT0TOF[i];
af885e0f 152 for (Int_t i=0; i<24; i++) {
153 fT0time[i] = esd.fT0time[i];
154 fT0amplitude[i] = esd.fT0amplitude[i];
155 }
156 for (Int_t i=0; i<2; i++) fDiamondXY[i]=esd.fDiamondXY[i];
157 for (Int_t i=0; i<3; i++) fDiamondCovXY[i]=esd.fDiamondCovXY[i];
c028b974 158}
159
af7ba10c 160//______________________________________________________________________________
161AliESD::~AliESD()
162{
163 //
164 // Standard destructor
165 //
af885e0f 166 fTracks.Delete();
8bbc564d 167 fHLTConfMapTracks.Delete();
168 fHLTHoughTracks.Delete();
af885e0f 169 fMuonTracks.Delete();
af7ba10c 170 fPmdTracks.Delete();
0ee00e25 171 fTrdTracks.Delete();
af7ba10c 172 fV0s.Delete();
173 fCascades.Delete();
51ad6848 174 fKinks.Delete();
85c60a8e 175 fCaloClusters.Delete();
af885e0f 176 delete fESDFMD;
177 delete fESDVZERO;
6989bff3 178 delete fEMCALTriggerPosition;
179 delete fEMCALTriggerAmplitudes;
180 delete fPHOSTriggerPosition;
181 delete fPHOSTriggerAmplitudes;
bd95bae7 182 delete fESDACORDE;
820b4d9e 183 #ifdef MFT_UPGRADE
184// delete fESDMFT;
185 #endif
af885e0f 186 fErrorLogs.Delete();
64df000d 187
51ad6848 188}
189
bf25155c 190//______________________________________________________________________________
191void AliESD::Reset()
192{
6989bff3 193 //
194 // Reset the contents and delete the entries in TClonesArrays
195 //
196
af885e0f 197 fEventNumberInFile=0;
198 fBunchCrossNumber=0;
199 fOrbitNumber=0;
200 fPeriodNumber=0;
201 fRunNumber=0;
202 fTimeStamp = 0;
203 fEventType = 0;
204 fTriggerMask=0;
205 fTriggerCluster=0;
206 fRecoVersion=0;
207 fMagneticField=0;
208 fZDCN1Energy=0;
209 fZDCP1Energy=0;
210 fZDCN2Energy=0;
211 fZDCP2Energy=0;
212 fZDCEMEnergy=0;
213 fZDCParticipants=0;
214 fT0zVertex=0;
5a2b4ee8 215
6989bff3 216 for (Int_t i=0; i<2; i++) fDiamondXY[i]=0.;
217 for (Int_t i=0; i<3; i++) fDiamondCovXY[i]=0.;
5a2b4ee8 218
6989bff3 219 for (Int_t i=0; i<24; i++) {
220 fT0time[i] = 0;
221 fT0amplitude[i] = 0;
222 }
223 fT0timeStart = 0;
0f0c06de 224 fT0clock = 0;
adf36b9d 225 for (Int_t i=0; i<3; i++) fT0TOF[i] = 0;
5a2b4ee8 226//
227 fSPDMult.~AliMultiplicity();
228 new (&fSPDMult) AliMultiplicity();
229 fSPDVertex.~AliESDVertex();
230 new (&fSPDVertex) AliESDVertex();
231 fPrimaryVertex.~AliESDVertex();
232 new (&fPrimaryVertex) AliESDVertex();
233//
6989bff3 234 fTracks.Delete();
235 fHLTConfMapTracks.Delete();
236 fHLTHoughTracks.Delete();
237 fMuonTracks.Delete();
238 fPmdTracks.Delete();
239 fTrdTracks.Delete();
240 fV0s.Delete();
241 fCascades.Delete();
5a2b4ee8 242 fKinks.Delete();
6989bff3 243 fCaloClusters.Delete();
5a2b4ee8 244//
85c60a8e 245 fEMCALClusters=0;
246 fFirstEMCALCluster=-1;
247 fPHOSClusters=0;
248 fFirstPHOSCluster=-1;
5a2b4ee8 249//
250 if (fEMCALTriggerPosition) fEMCALTriggerPosition ->Reset();
251 if (fEMCALTriggerAmplitudes) fEMCALTriggerAmplitudes->Reset();
252 if (fPHOSTriggerPosition) fPHOSTriggerPosition ->Reset();
253 if (fPHOSTriggerAmplitudes) fPHOSTriggerAmplitudes ->Reset();
254//
af885e0f 255 if (fESDFMD) fESDFMD->Clear();
5a2b4ee8 256//
6989bff3 257 if (fESDVZERO){
5a2b4ee8 258 fESDVZERO->~AliESDVZERO();
259 new (fESDVZERO) AliESDVZERO();
6989bff3 260 }
bd95bae7 261//
262 if (fESDACORDE){
263 fESDACORDE->~AliESDACORDE();
264 new (fESDACORDE) AliESDACORDE();
820b4d9e 265 }
266//
267 #ifdef MFT_UPGRADE
268 // if (fESDMFT){
269// fESDMFT->~AliESDMFT();
270// new (fESDMFT) AliESDMFT();
271// }
272 #endif
5a2b4ee8 273//
6989bff3 274 fErrorLogs.Delete();
bf25155c 275}
af7ba10c 276
a023d8d8 277
278Bool_t AliESD::RemoveKink(Int_t rm) {
279 // ---------------------------------------------------------
280 // Remove a kink candidate and references to it from ESD,
281 // if this candidate does not come from a reconstructed decay
282 // Not yet implemented...
283 // ---------------------------------------------------------
284 Int_t last=GetNumberOfKinks()-1;
285 if ((rm<0)||(rm>last)) return kFALSE;
286
287 return kTRUE;
288}
289
290Bool_t AliESD::RemoveV0(Int_t rm) {
291 // ---------------------------------------------------------
292 // Remove a V0 candidate and references to it from ESD,
293 // if this candidate does not come from a reconstructed decay
294 // ---------------------------------------------------------
295 Int_t last=GetNumberOfV0s()-1;
296 if ((rm<0)||(rm>last)) return kFALSE;
297
298 AliESDv0 *v0=GetV0(rm);
299 Int_t idxP=v0->GetPindex(), idxN=v0->GetNindex();
300
301 v0=GetV0(last);
302 Int_t lastIdxP=v0->GetPindex(), lastIdxN=v0->GetNindex();
303
304 Int_t used=0;
305
306 // Check if this V0 comes from a reconstructed decay
307 Int_t ncs=GetNumberOfCascades();
308 for (Int_t n=0; n<ncs; n++) {
309 AliESDcascade *cs=GetCascade(n);
310
311 Int_t csIdxP=cs->GetPindex();
312 Int_t csIdxN=cs->GetNindex();
313
314 if (idxP==csIdxP)
315 if (idxN==csIdxN) return kFALSE;
316
317 if (csIdxP==lastIdxP)
318 if (csIdxN==lastIdxN) used++;
319 }
320
321 //Replace the removed V0 with the last V0
322 TClonesArray &a=fV0s;
323 delete a.RemoveAt(rm);
324
325 if (rm==last) return kTRUE;
326
327 //v0 is pointing to the last V0 candidate...
328 new (a[rm]) AliESDv0(*v0);
329 delete a.RemoveAt(last);
330
331 if (!used) return kTRUE;
332
333
334 // Remap the indices of the daughters of reconstructed decays
335 for (Int_t n=0; n<ncs; n++) {
336 AliESDcascade *cs=GetCascade(n);
337
338
339 Int_t csIdxP=cs->GetPindex();
340 Int_t csIdxN=cs->GetNindex();
341
342 if (csIdxP==lastIdxP)
343 if (csIdxN==lastIdxN) {
344 cs->AliESDv0::SetIndex(1,idxP);
345 cs->AliESDv0::SetIndex(0,idxN);
346 used--;
347 if (!used) return kTRUE;
348 }
349 }
350
351 return kTRUE;
352}
353
7f68891d 354Bool_t AliESD::RemoveTrack(Int_t rm) {
d64bd07d 355 // ---------------------------------------------------------
7f68891d 356 // Remove a track and references to it from ESD,
357 // if this track does not come from a reconstructed decay
d64bd07d 358 // ---------------------------------------------------------
7f68891d 359 Int_t last=GetNumberOfTracks()-1;
360 if ((rm<0)||(rm>last)) return kFALSE;
361
362 Int_t used=0;
d64bd07d 363
6fca035d 364 // Check if this track comes from the reconstructed primary vertex
365 if (fPrimaryVertex.GetStatus()) {
366 UShort_t *primIdx=fPrimaryVertex.GetIndices();
367 Int_t n=fPrimaryVertex.GetNIndices();
368 while (n--) {
369 Int_t idx=Int_t(primIdx[n]);
370 if (rm==idx) return kFALSE;
371 if (idx==last) used++;
372 }
373 }
374
d64bd07d 375 // Check if this track comes from a reconstructed decay
7f68891d 376 Int_t nv0=GetNumberOfV0s();
377 for (Int_t n=0; n<nv0; n++) {
378 AliESDv0 *v0=GetV0(n);
379
380 Int_t idx=v0->GetNindex();
381 if (rm==idx) return kFALSE;
382 if (idx==last) used++;
383
384 idx=v0->GetPindex();
385 if (rm==idx) return kFALSE;
386 if (idx==last) used++;
387 }
d64bd07d 388
7f68891d 389 Int_t ncs=GetNumberOfCascades();
390 for (Int_t n=0; n<ncs; n++) {
391 AliESDcascade *cs=GetCascade(n);
d64bd07d 392
7f68891d 393 Int_t idx=cs->GetIndex();
394 if (rm==idx) return kFALSE;
395 if (idx==last) used++;
396 }
397
398 Int_t nkn=GetNumberOfKinks();
399 for (Int_t n=0; n<nkn; n++) {
400 AliESDkink *kn=GetKink(n);
d64bd07d 401
7f68891d 402 Int_t idx=kn->GetIndex(0);
403 if (rm==idx) return kFALSE;
404 if (idx==last) used++;
405
406 idx=kn->GetIndex(1);
407 if (rm==idx) return kFALSE;
408 if (idx==last) used++;
409 }
410
411
412 //Replace the removed track with the last track
413 TClonesArray &a=fTracks;
414 delete a.RemoveAt(rm);
415
416 if (rm==last) return kTRUE;
417
418 AliESDtrack *t=GetTrack(last);
a6c3743e 419 if (!t) {AliFatal(Form("NULL pointer for ESD track %d",last));}
7f68891d 420 t->SetID(rm);
ddfbc51a 421 new (a[rm]) AliESDtrack(*t);
7f68891d 422 delete a.RemoveAt(last);
423
6fca035d 424
7f68891d 425 if (!used) return kTRUE;
7f68891d 426
a023d8d8 427
6fca035d 428 // Remap the indices of the tracks used for the primary vertex reconstruction
429 if (fPrimaryVertex.GetStatus()) {
430 UShort_t *primIdx=fPrimaryVertex.GetIndices();
431 Int_t n=fPrimaryVertex.GetNIndices();
432 while (n--) {
433 Int_t idx=Int_t(primIdx[n]);
434 if (idx==last) {
435 primIdx[n]=Short_t(rm);
436 used--;
437 if (!used) return kTRUE;
438 }
439 }
440 }
441
7f68891d 442 // Remap the indices of the daughters of reconstructed decays
443 for (Int_t n=0; n<nv0; n++) {
444 AliESDv0 *v0=GetV0(n);
445 if (v0->GetIndex(0)==last) {
446 v0->SetIndex(0,rm);
447 used--;
448 if (!used) return kTRUE;
449 }
450 if (v0->GetIndex(1)==last) {
451 v0->SetIndex(1,rm);
452 used--;
453 if (!used) return kTRUE;
454 }
455 }
456
457 for (Int_t n=0; n<ncs; n++) {
458 AliESDcascade *cs=GetCascade(n);
459 if (cs->GetIndex()==last) {
460 cs->SetIndex(rm);
461 used--;
462 if (!used) return kTRUE;
463 }
464 }
465
466 for (Int_t n=0; n<nkn; n++) {
467 AliESDkink *kn=GetKink(n);
468 if (kn->GetIndex(0)==last) {
469 kn->SetIndex(rm,0);
470 used--;
471 if (!used) return kTRUE;
472 }
473 if (kn->GetIndex(1)==last) {
474 kn->SetIndex(rm,1);
475 used--;
476 if (!used) return kTRUE;
477 }
478 }
d64bd07d 479
480 return kTRUE;
481}
482
a023d8d8 483
7f68891d 484Bool_t AliESD::Clean(Float_t *cleanPars) {
485 //
486 // Remove the data which are not needed for the physics analysis.
487 //
a023d8d8 488 // 1) Cleaning the V0 candidates
489 // ---------------------------
490 // If the cosine of the V0 pointing angle "csp" and
491 // the DCA between the daughter tracks "dca" does not satisfy
492 // the conditions
493 //
494 // csp > cleanPars[1] + dca/cleanPars[0]*(1.- cleanPars[1])
495 //
496 // an attempt to remove this V0 candidate from ESD is made.
497 //
498 // The V0 candidate gets removed if it does not belong to any
499 // recosntructed cascade decay
500 //
501 // 12.11.2007, optimal values: cleanPars[0]=0.5, cleanPars[1]=0.999
502 //
503 // 2) Cleaning the tracks
504 // ----------------------
505 // If track's transverse parameter is larger than cleanPars[2]
7f68891d 506 // OR
a023d8d8 507 // track's longitudinal parameter is larger than cleanPars[3]
508 // an attempt to remove this track from ESD is made.
7f68891d 509 //
a023d8d8 510 // The track gets removed if it does not come
511 // from a reconstructed decay
7f68891d 512 //
a023d8d8 513 Bool_t rc=kFALSE;
514
515 Float_t dcaMax=cleanPars[0];
516 Float_t cspMin=cleanPars[1];
517
518 Int_t nV0s=GetNumberOfV0s();
519 for (Int_t i=nV0s-1; i>=0; i--) {
520 AliESDv0 *v0=GetV0(i);
521
522 Float_t dca=v0->GetDcaV0Daughters();
523 Float_t csp=v0->GetV0CosineOfPointingAngle();
524 Float_t cspcut=cspMin + dca/dcaMax*(1.-cspMin);
525 if (csp > cspcut) continue;
526
527 if (RemoveV0(i)) rc=kTRUE;
528 }
529
7f68891d 530
a023d8d8 531 Float_t dmax=cleanPars[2], zmax=cleanPars[3];
7f68891d 532
533 const AliESDVertex *vertex=GetVertex();
a023d8d8 534 Bool_t vtxOK=vertex->GetStatus();
7f68891d 535
536 Int_t nTracks=GetNumberOfTracks();
537 for (Int_t i=nTracks-1; i>=0; i--) {
538 AliESDtrack *track=GetTrack(i);
a6c3743e 539 if (!track) {AliFatal(Form("NULL pointer for ESD track %d",i));}
7f68891d 540 Float_t xy,z; track->GetImpactParameters(xy,z);
541 if ((TMath::Abs(xy) > dmax) || (vtxOK && (TMath::Abs(z) > zmax))) {
542 if (RemoveTrack(i)) rc=kTRUE;
543 }
544 }
545
546 return rc;
547}
548
d6a49f20 549Int_t AliESD::AddV0(const AliESDv0 *v) {
550 //
551 // Add V0
552 //
af885e0f 553 Int_t idx=fV0s.GetEntriesFast();
554 new(fV0s[idx]) AliESDv0(*v);
555 return idx;
d6a49f20 556}
557
af7ba10c 558//______________________________________________________________________________
559void AliESD::Print(Option_t *) const
560{
561 //
562 // Print header information of the event
563 //
5f7789fc 564 printf("ESD run information\n");
4d422cad 565 printf("Event # in file %d Bunch crossing # %d Orbit # %d Period # %d Run # %d Trigger %lld Magnetic field %f \n",
31fd97b2 566 GetEventNumberInFile(),
567 GetBunchCrossNumber(),
568 GetOrbitNumber(),
4d422cad 569 GetPeriodNumber(),
ef278eae 570 GetRunNumber(),
b647652d 571 GetTriggerMask(),
ef278eae 572 GetMagneticField() );
af885e0f 573 printf("Vertex: (%.4f +- %.4f, %.4f +- %.4f, %.4f +- %.4f) cm\n",
574 fPrimaryVertex.GetXv(), fPrimaryVertex.GetXRes(),
575 fPrimaryVertex.GetYv(), fPrimaryVertex.GetYRes(),
576 fPrimaryVertex.GetZv(), fPrimaryVertex.GetZRes());
9f57c1aa 577 printf("Mean vertex in RUN: X=%.4f Y=%.4f cm\n",
578 GetDiamondX(),GetDiamondY());
32e449be 579 printf("SPD Multiplicity. Number of tracklets %d \n",
af885e0f 580 fSPDMult.GetNumberOfTracklets());
581 printf("Event from reconstruction version %d \n",fRecoVersion);
ef278eae 582 printf("Number of tracks: \n");
85c60a8e 583 printf(" charged %d\n", GetNumberOfTracks());
af885e0f 584 printf(" hlt CF %d\n", GetNumberOfHLTConfMapTracks());
585 printf(" hlt HT %d\n", GetNumberOfHLTHoughTracks());
ef278eae 586 printf(" muon %d\n", GetNumberOfMuonTracks());
a2882fb4 587 printf(" pmd %d\n", GetNumberOfPmdTracks());
0ee00e25 588 printf(" trd %d\n", GetNumberOfTrdTracks());
ef278eae 589 printf(" v0 %d\n", GetNumberOfV0s());
667ee8bf 590 printf(" cascades %d\n", GetNumberOfCascades());
591 printf(" kinks %d\n", GetNumberOfKinks());
667ee8bf 592 printf(" CaloClusters %d\n", GetNumberOfCaloClusters());
593 printf(" phos %d\n", GetNumberOfPHOSClusters());
594 printf(" emcal %d\n", GetNumberOfEMCALClusters());
595 printf(" FMD %s\n", (fESDFMD ? "yes" : "no"));
dd735cf0 596 printf(" VZERO %s\n", (fESDVZERO ? "yes" : "no"));
820b4d9e 597 #ifdef MFT_UPGRADE
598 // printf(" MFT %s\n", (fESDMFT ? "yes" : "no"));
599 #endif
ef278eae 600}
d75007f6 601
602void AliESD::SetESDfriend(const AliESDfriend *ev) {
603 //
604 // Attaches the complementary info to the ESD
605 //
606 if (!ev) return;
607
608 Int_t ntrk=ev->GetNumberOfTracks();
af885e0f 609
d75007f6 610 for (Int_t i=0; i<ntrk; i++) {
611 const AliESDfriendTrack *f=ev->GetTrack(i);
a6c3743e 612 if (!f) {AliFatal(Form("NULL pointer for ESD track %d",i));}
d75007f6 613 GetTrack(i)->SetFriendTrack(f);
614 }
615}
616
617void AliESD::GetESDfriend(AliESDfriend *ev) const {
618 //
619 // Extracts the complementary info from the ESD
620 //
621 if (!ev) return;
622
623 Int_t ntrk=GetNumberOfTracks();
624
625 for (Int_t i=0; i<ntrk; i++) {
80799a5f 626 AliESDtrack *t=GetTrack(i);
a6c3743e 627 if (!t) {AliFatal(Form("NULL pointer for ESD track %d",i));}
ddfbc51a 628 const AliESDfriendTrack *f=t->GetFriendTrack();
629 ev->AddTrack(f);
630
631 t->ReleaseESDfriendTrack();// Not to have two copies of "friendTrack"
632
d75007f6 633 }
634}
6989bff3 635
636void AliESD::SetDiamond(const AliESDVertex *vertex)
637{
638 //
639 // Set the interaction diamond
640 //
641 fDiamondXY[0]=vertex->GetXv();
642 fDiamondXY[1]=vertex->GetYv();
643 Double_t cov[6];
644 vertex->GetCovMatrix(cov);
645 fDiamondCovXY[0]=cov[0];
646 fDiamondCovXY[1]=cov[1];
647 fDiamondCovXY[2]=cov[2];
648 }