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