]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliESD.cxx
PropagateToDCA in case of track and vertex (M.Ivanov)
[u/mrichter/AliRoot.git] / STEER / 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$ */
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
27 ClassImp(AliESD)
28
29 //______________________________________________________________________________
30 AliESD::AliESD():
31   fEventNumber(0),
32   fRunNumber(0),
33   fTrigger(0),
34   fRecoVersion(0),
35   fMagneticField(0),
36   fZDCN1Energy(0),
37   fZDCP1Energy(0),
38   fZDCN2Energy(0),
39   fZDCP2Energy(0),
40   fZDCEMEnergy(0),
41   fZDCParticipants(0),
42   fT0zVertex(0),
43   fPrimaryVertex(),
44   fTracks("AliESDtrack",15000),
45   fHLTConfMapTracks("AliESDHLTtrack",25000),
46   fHLTHoughTracks("AliESDHLTtrack",15000),
47   fMuonTracks("AliESDMuonTrack",30),
48   fPmdTracks("AliESDPmdTrack",3000),
49   fTrdTracks("AliESDTrdTrack",300),
50   fV0s("AliESDv0",200),  
51   fCascades("AliESDcascade",20),
52   fKinks("AliESDkink",4000),
53   fV0MIs("AliESDV0MI",4000),
54   fCaloClusters("AliESDCaloCluster",10000),
55   fEMCALClusters(0), 
56   fFirstEMCALCluster(-1),
57   fPHOSClusters(0), 
58   fFirstPHOSCluster(-1),
59   fESDFMD(0x0)
60 {
61
62 }
63
64 //______________________________________________________________________________
65 AliESD::~AliESD()
66 {
67   //
68   // Standard destructor
69   //
70   fTracks.Delete();
71   fHLTConfMapTracks.Delete();
72   fHLTHoughTracks.Delete();
73   fMuonTracks.Delete();
74   fPmdTracks.Delete();
75   fTrdTracks.Delete();
76   fV0s.Delete();
77   fCascades.Delete();
78   fKinks.Delete();
79   fV0MIs.Delete();
80   fCaloClusters.Delete();
81   delete fESDFMD;
82 }
83
84 void AliESD::UpdateV0PIDs()
85 {
86   //
87   //
88   //
89   Int_t nV0 = GetNumberOfV0MIs();
90   for (Int_t i=0;i<nV0;i++){
91     AliESDV0MI * v0 = GetV0MI(i);
92     AliESDtrack* tp = GetTrack(v0->GetIndex(0));
93     AliESDtrack* tm = GetTrack(v0->GetIndex(1));
94     if (!tm || !tp){
95       printf("BBBUUUUUUUGGGG\n");
96     }
97     Double_t pp[5],pm[5];
98     tp->GetESDpid(pp);
99     tm->GetESDpid(pm);
100     v0->UpdatePID(pp,pm);    
101   }
102 }
103
104 //______________________________________________________________________________
105 void AliESD::Reset()
106 {
107   fEventNumber=0;
108   fRunNumber=0;
109   fTrigger=0;
110   fRecoVersion=0;
111   fMagneticField=0;
112   fZDCN1Energy=0;
113   fZDCP1Energy=0;
114   fZDCN2Energy=0;
115   fZDCP2Energy=0;
116   fZDCEMEnergy=0;
117   fZDCParticipants=0;
118   fT0zVertex=0;
119   fPrimaryVertex.Reset();
120   fTracks.Clear();
121   fHLTConfMapTracks.Clear();
122   fHLTHoughTracks.Clear();
123   fMuonTracks.Clear();
124   fPmdTracks.Clear();
125   fTrdTracks.Clear();
126   fV0s.Clear();
127   fCascades.Clear();
128   fCaloClusters.Clear();
129   fEMCALClusters=0; 
130   fFirstEMCALCluster=-1; 
131   fPHOSClusters=0; 
132   fFirstPHOSCluster=-1; 
133   if (fESDFMD) fESDFMD->Clear();
134 }
135
136 //______________________________________________________________________________
137 void AliESD::Print(Option_t *) const 
138 {
139   //
140   // Print header information of the event
141   //
142   printf("ESD run information\n");
143   printf("Event # %d Run # %d Trigger %ld Magnetic field %f \n",
144          GetEventNumber(),
145          GetRunNumber(),
146          GetTrigger(),
147          GetMagneticField() );
148   printf("Vertex: (%.4f +- %.4f, %.4f +- %.4f, %.4f +- %.4f) cm\n",
149          fPrimaryVertex.GetXv(), fPrimaryVertex.GetXRes(),
150          fPrimaryVertex.GetYv(), fPrimaryVertex.GetYRes(),
151          fPrimaryVertex.GetZv(), fPrimaryVertex.GetZRes());
152   printf("Event from reconstruction version %d \n",fRecoVersion);
153   printf("Number of tracks: \n");
154   printf("                 charged   %d\n", GetNumberOfTracks());
155   printf("                 hlt CF    %d\n", GetNumberOfHLTConfMapTracks());
156   printf("                 hlt HT    %d\n", GetNumberOfHLTHoughTracks());
157   printf("                 phos      %d\n", GetNumberOfPHOSClusters());
158   printf("                 emcal     %d\n", GetNumberOfEMCALClusters());
159   printf("                 muon      %d\n", GetNumberOfMuonTracks());
160   printf("                 pmd       %d\n", GetNumberOfPmdTracks());
161   printf("                 trd       %d\n", GetNumberOfTrdTracks());
162   printf("                 v0        %d\n", GetNumberOfV0s());
163   printf("                 cascades  %d\n)", GetNumberOfCascades());
164   printf("                 kinks     %d\n)", GetNumberOfKinks());
165   printf("                 V0MIs     %d\n)", GetNumberOfV0MIs());
166   printf("                 CaloClusters %d\n)", GetNumberOfCaloClusters());
167   printf("                 FMD       %s\n)", (fESDFMD ? "yes" : "no"));
168 }