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