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