]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliESD.cxx
Removing warnings on alphacxx6
[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   fZDCNEnergy(0),
37   fZDCPEnergy(0),
38   fZDCEMEnergy(0),
39   fZDCParticipants(0),
40   fT0zVertex(0),
41   fPrimaryVertex(),
42   fTracks("AliESDtrack",15000),
43   fHLTConfMapTracks("AliESDHLTtrack",25000),
44   fHLTHoughTracks("AliESDHLTtrack",15000),
45   fMuonTracks("AliESDMuonTrack",30),
46   fPmdTracks("AliESDPmdTrack",3000),
47   fV0s("AliESDv0",200),  
48   fCascades("AliESDcascade",20),
49   fKinks("AliESDkink",4000),
50   fV0MIs("AliESDV0MI",4000),
51   fPHOSParticles(0), 
52   fEMCALParticles(0), 
53   fFirstPHOSParticle(-1), 
54   fFirstEMCALParticle(-1){
55 }
56
57 //______________________________________________________________________________
58 AliESD::~AliESD()
59 {
60   //
61   // Standard destructor
62   //
63   fTracks.Delete();
64   fHLTConfMapTracks.Delete();
65   fHLTHoughTracks.Delete();
66   fMuonTracks.Delete();
67   fPmdTracks.Delete();
68   fV0s.Delete();
69   fCascades.Delete();
70   fKinks.Delete();
71   fV0MIs.Delete();
72 }
73
74 void AliESD::UpdateV0PIDs()
75 {
76   //
77   //
78   //
79   Int_t nV0 = GetNumberOfV0MIs();
80   for (Int_t i=0;i<nV0;i++){
81     AliESDV0MI * v0 = GetV0MI(i);
82     AliESDtrack* tp = GetTrack(v0->GetIndex(0));
83     AliESDtrack* tm = GetTrack(v0->GetIndex(1));
84     if (!tm || !tp){
85       printf("BBBUUUUUUUGGGG\n");
86     }
87     Double_t pp[5],pm[5];
88     tp->GetESDpid(pp);
89     tm->GetESDpid(pm);
90     v0->UpdatePID(pp,pm);    
91   }
92 }
93
94 //______________________________________________________________________________
95 void AliESD::Reset()
96 {
97   fEventNumber=0;
98   fRunNumber=0;
99   fTrigger=0;
100   fRecoVersion=0;
101   fMagneticField=0;
102   fZDCNEnergy=0;
103   fZDCPEnergy=0;
104   fZDCEMEnergy=0;
105   fZDCParticipants=0;
106   fT0zVertex=0;
107   fPrimaryVertex.Reset();
108   fTracks.Clear();
109   fHLTConfMapTracks.Clear();
110   fHLTHoughTracks.Clear();
111   fMuonTracks.Clear();
112   fPmdTracks.Clear();
113   fV0s.Clear();
114   fCascades.Clear();
115   fPHOSParticles=0; 
116   fEMCALParticles=0; 
117   fFirstPHOSParticle=-1; 
118   fFirstEMCALParticle=-1;
119 }
120
121 //______________________________________________________________________________
122 void AliESD::Print(Option_t *) const 
123 {
124   //
125   // Print header information of the event
126   //
127   printf("ESD run information\n");
128   printf("Event # %d Run # %d Trigger %ld Magnetic field %f \n",
129          GetEventNumber(),
130          GetRunNumber(),
131          GetTrigger(),
132          GetMagneticField() );
133   printf("Vertex: (%.4f +- %.4f, %.4f +- %.4f, %.4f +- %.4f) cm\n",
134          fPrimaryVertex.GetXv(), fPrimaryVertex.GetXRes(),
135          fPrimaryVertex.GetYv(), fPrimaryVertex.GetYRes(),
136          fPrimaryVertex.GetZv(), fPrimaryVertex.GetZRes());
137   printf("Event from reconstruction version %d \n",fRecoVersion);
138   printf("Number of tracks: \n");
139   printf("                 charged   %d\n",GetNumberOfTracks()-GetNumberOfPHOSParticles()-GetNumberOfEMCALParticles());
140   printf("                 hlt CF    %d\n", GetNumberOfHLTConfMapTracks());
141   printf("                 hlt HT    %d\n", GetNumberOfHLTHoughTracks());
142   printf("                 phos      %d\n", GetNumberOfPHOSParticles());
143   printf("                 emcal     %d\n", GetNumberOfEMCALParticles());
144   printf("                 muon      %d\n", GetNumberOfMuonTracks());
145   printf("                 pmd       %d\n", GetNumberOfPmdTracks());
146   printf("                 v0        %d\n", GetNumberOfV0s());
147   printf("                 cascades  %d\n)", GetNumberOfCascades());
148   printf("                 kinks     %d\n)", GetNumberOfKinks());
149   printf("                 V0MIs     %d\n)", GetNumberOfV0MIs());
150 }