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