1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
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 //-----------------------------------------------------------------
26 #include "AliESDfriend.h"
30 //______________________________________________________________________________
48 fTracks("AliESDtrack",15000),
49 fHLTConfMapTracks("AliESDHLTtrack",25000),
50 fHLTHoughTracks("AliESDHLTtrack",15000),
51 fMuonTracks("AliESDMuonTrack",30),
52 fPmdTracks("AliESDPmdTrack",3000),
53 fTrdTracks("AliESDTrdTrack",300),
55 fCascades("AliESDcascade",20),
56 fKinks("AliESDkink",4000),
57 fV0MIs("AliESDV0MI",4000),
58 fCaloClusters("AliESDCaloCluster",10000),
60 fFirstEMCALCluster(-1),
62 fFirstPHOSCluster(-1),
65 for (Int_t i=0; i<24; i++) {
71 //______________________________________________________________________________
75 // Standard destructor
78 delete fPrimaryVertex;
80 fHLTConfMapTracks.Delete();
81 fHLTHoughTracks.Delete();
89 fCaloClusters.Delete();
93 void AliESD::UpdateV0PIDs()
98 Int_t nV0 = GetNumberOfV0MIs();
99 for (Int_t i=0;i<nV0;i++){
100 AliESDV0MI * v0 = GetV0MI(i);
101 AliESDtrack* tp = GetTrack(v0->GetIndex(0));
102 AliESDtrack* tm = GetTrack(v0->GetIndex(1));
104 printf("BBBUUUUUUUGGGG\n");
106 Double_t pp[5],pm[5];
109 v0->UpdatePID(pp,pm);
113 //______________________________________________________________________________
130 delete fSPDVertex; fSPDVertex=0;
131 delete fPrimaryVertex; fPrimaryVertex=0;
133 fHLTConfMapTracks.Clear();
134 fHLTHoughTracks.Clear();
140 fCaloClusters.Clear();
142 fFirstEMCALCluster=-1;
144 fFirstPHOSCluster=-1;
145 if (fESDFMD) fESDFMD->Clear();
148 //______________________________________________________________________________
149 void AliESD::Print(Option_t *) const
152 // Print header information of the event
154 printf("ESD run information\n");
155 printf("Event # %d Run # %d Trigger %lld Magnetic field %f \n",
159 GetMagneticField() );
161 printf("Vertex: (%.4f +- %.4f, %.4f +- %.4f, %.4f +- %.4f) cm\n",
162 fPrimaryVertex->GetXv(), fPrimaryVertex->GetXRes(),
163 fPrimaryVertex->GetYv(), fPrimaryVertex->GetYRes(),
164 fPrimaryVertex->GetZv(), fPrimaryVertex->GetZRes());
165 printf("Event from reconstruction version %d \n",fRecoVersion);
166 printf("Number of tracks: \n");
167 printf(" charged %d\n", GetNumberOfTracks());
168 printf(" hlt CF %d\n", GetNumberOfHLTConfMapTracks());
169 printf(" hlt HT %d\n", GetNumberOfHLTHoughTracks());
170 printf(" muon %d\n", GetNumberOfMuonTracks());
171 printf(" pmd %d\n", GetNumberOfPmdTracks());
172 printf(" trd %d\n", GetNumberOfTrdTracks());
173 printf(" v0 %d\n", GetNumberOfV0s());
174 printf(" cascades %d\n", GetNumberOfCascades());
175 printf(" kinks %d\n", GetNumberOfKinks());
176 printf(" V0MIs %d\n", GetNumberOfV0MIs());
177 printf(" CaloClusters %d\n", GetNumberOfCaloClusters());
178 printf(" phos %d\n", GetNumberOfPHOSClusters());
179 printf(" emcal %d\n", GetNumberOfEMCALClusters());
180 printf(" FMD %s\n", (fESDFMD ? "yes" : "no"));
183 void AliESD::SetESDfriend(const AliESDfriend *ev) {
185 // Attaches the complementary info to the ESD
189 Int_t ntrk=ev->GetNumberOfTracks();
191 for (Int_t i=0; i<ntrk; i++) {
192 const AliESDfriendTrack *f=ev->GetTrack(i);
193 GetTrack(i)->SetFriendTrack(f);
197 void AliESD::GetESDfriend(AliESDfriend *ev) const {
199 // Extracts the complementary info from the ESD
203 Int_t ntrk=GetNumberOfTracks();
205 for (Int_t i=0; i<ntrk; i++) {
206 const AliESDtrack *t=GetTrack(i);
207 const AliESDfriendTrack *f=t->GetFriendTrack();