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