]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALIESD_H | |
2 | #define ALIESD_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | ||
7 | /* $Id$ */ | |
8 | ||
9 | //------------------------------------------------------------------------- | |
10 | // Class AliESD | |
11 | // This is the class to deal with during the physical analysis of data | |
12 | // | |
13 | // Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch | |
14 | //------------------------------------------------------------------------- | |
15 | ||
16 | #include <TClonesArray.h> | |
17 | #include <TObject.h> | |
18 | ||
19 | #include "AliESDMuonTrack.h" | |
20 | #include "AliESDPmdTrack.h" | |
21 | #include "AliESDVertex.h" | |
22 | #include "AliESDcascade.h" | |
23 | #include "AliESDkink.h" | |
24 | #include "AliESDtrack.h" | |
25 | #include "AliESDHLTtrack.h" | |
26 | #include "AliESDv0.h" | |
27 | #include "AliESDV0MI.h" | |
28 | ||
29 | class AliESD : public TObject { | |
30 | public: | |
31 | AliESD(); | |
32 | virtual ~AliESD(); | |
33 | ||
34 | void SetEventNumber(Int_t n) {fEventNumber=n;} | |
35 | void SetRunNumber(Int_t n) {fRunNumber=n;} | |
36 | void SetTrigger(Long_t n) {fTrigger=n;} | |
37 | void SetMagneticField(Float_t mf){fMagneticField = mf;} | |
38 | Float_t GetMagneticField() const {return fMagneticField;} | |
39 | ||
40 | AliESDtrack *GetTrack(Int_t i) const { | |
41 | return (AliESDtrack *)fTracks.UncheckedAt(i); | |
42 | } | |
43 | AliESDHLTtrack *GetHLTConfMapTrack(Int_t i) const { | |
44 | return (AliESDHLTtrack *)fHLTConfMapTracks.UncheckedAt(i); | |
45 | } | |
46 | AliESDHLTtrack *GetHLTHoughTrack(Int_t i) const { | |
47 | return (AliESDHLTtrack *)fHLTHoughTracks.UncheckedAt(i); | |
48 | } | |
49 | AliESDMuonTrack *GetMuonTrack(Int_t i) const { | |
50 | return (AliESDMuonTrack *)fMuonTracks.UncheckedAt(i); | |
51 | } | |
52 | AliESDPmdTrack *GetPmdTrack(Int_t i) const { | |
53 | return (AliESDPmdTrack *)fPmdTracks.UncheckedAt(i); | |
54 | } | |
55 | ||
56 | Int_t AddTrack(const AliESDtrack *t) { | |
57 | AliESDtrack * track = new(fTracks[fTracks.GetEntriesFast()]) AliESDtrack(*t); | |
58 | track->SetID(fTracks.GetEntriesFast()-1); | |
59 | return track->GetID(); | |
60 | ||
61 | } | |
62 | void AddHLTConfMapTrack(const AliESDHLTtrack *t) { | |
63 | new(fHLTConfMapTracks[fHLTConfMapTracks.GetEntriesFast()]) AliESDHLTtrack(*t); | |
64 | } | |
65 | void AddHLTHoughTrack(const AliESDHLTtrack *t) { | |
66 | new(fHLTHoughTracks[fHLTHoughTracks.GetEntriesFast()]) AliESDHLTtrack(*t); | |
67 | } | |
68 | void AddMuonTrack(const AliESDMuonTrack *t) { | |
69 | new(fMuonTracks[fMuonTracks.GetEntriesFast()]) AliESDMuonTrack(*t); | |
70 | } | |
71 | void AddPmdTrack(const AliESDPmdTrack *t) { | |
72 | new(fPmdTracks[fPmdTracks.GetEntriesFast()]) AliESDPmdTrack(*t); | |
73 | } | |
74 | ||
75 | AliESDv0 *GetV0(Int_t i) const { | |
76 | return (AliESDv0 *)fV0s.UncheckedAt(i); | |
77 | } | |
78 | void AddV0(const AliESDv0 *v) { | |
79 | new(fV0s[fV0s.GetEntriesFast()]) AliESDv0(*v); | |
80 | } | |
81 | void UpdateV0PIDs(); | |
82 | ||
83 | AliESDcascade *GetCascade(Int_t i) const { | |
84 | return (AliESDcascade *)fCascades.UncheckedAt(i); | |
85 | } | |
86 | void AddCascade(const AliESDcascade *c) { | |
87 | new(fCascades[fCascades.GetEntriesFast()]) AliESDcascade(*c); | |
88 | } | |
89 | ||
90 | AliESDkink *GetKink(Int_t i) const { | |
91 | return (AliESDkink *)fKinks.UncheckedAt(i); | |
92 | } | |
93 | Int_t AddKink(const AliESDkink *c) { | |
94 | AliESDkink * kink = new(fKinks[fKinks.GetEntriesFast()]) AliESDkink(*c); | |
95 | kink->SetID(fKinks.GetEntriesFast()); | |
96 | return fKinks.GetEntriesFast()-1; | |
97 | } | |
98 | ||
99 | AliESDV0MI *GetV0MI(Int_t i) const { | |
100 | return (AliESDV0MI *)fV0MIs.UncheckedAt(i); | |
101 | } | |
102 | Int_t AddV0MI(const AliESDV0MI *c) { | |
103 | AliESDV0MI * v0 = new(fV0MIs[fV0MIs.GetEntriesFast()]) AliESDV0MI(*c); | |
104 | v0->SetID(fV0MIs.GetEntriesFast()-1); | |
105 | return fV0MIs.GetEntriesFast()-1; | |
106 | } | |
107 | ||
108 | ||
109 | void SetVertex(const AliESDVertex* vertex) { | |
110 | new(&fPrimaryVertex) AliESDVertex(*vertex); | |
111 | } | |
112 | const AliESDVertex* GetVertex() const {return &fPrimaryVertex;}; | |
113 | ||
114 | Int_t GetEventNumber() const {return fEventNumber;} | |
115 | Int_t GetRunNumber() const {return fRunNumber;} | |
116 | Long_t GetTrigger() const {return fTrigger;} | |
117 | ||
118 | Int_t GetNumberOfTracks() const {return fTracks.GetEntriesFast();} | |
119 | Int_t GetNumberOfHLTConfMapTracks() const {return fHLTConfMapTracks.GetEntriesFast();} | |
120 | Int_t GetNumberOfHLTHoughTracks() const {return fHLTHoughTracks.GetEntriesFast();} | |
121 | Int_t GetNumberOfMuonTracks() const {return fMuonTracks.GetEntriesFast();} | |
122 | Int_t GetNumberOfPmdTracks() const {return fPmdTracks.GetEntriesFast();} | |
123 | Int_t GetNumberOfV0s() const {return fV0s.GetEntriesFast();} | |
124 | Int_t GetNumberOfCascades() const {return fCascades.GetEntriesFast();} | |
125 | Int_t GetNumberOfKinks() const {return fKinks.GetEntriesFast();} | |
126 | Int_t GetNumberOfV0MIs() const {return fV0MIs.GetEntriesFast();} | |
127 | Int_t GetNumberOfPHOSParticles() const {return fPHOSParticles;} | |
128 | void SetNumberOfPHOSParticles(Int_t part) { fPHOSParticles = part ; } | |
129 | void SetFirstPHOSParticle(Int_t index) { fFirstPHOSParticle = index ; } | |
130 | Int_t GetNumberOfEMCALParticles() const {return fEMCALParticles;} | |
131 | void SetNumberOfEMCALParticles(Int_t part) { fEMCALParticles = part ; } | |
132 | void SetFirstEMCALParticle(Int_t index) { fFirstEMCALParticle = index ; } | |
133 | ||
134 | ||
135 | Float_t GetT0zVertex() const {return fT0zVertex;} | |
136 | void SetT0zVertex(Float_t z) {fT0zVertex=z;} | |
137 | ||
138 | Float_t GetZDCNEnergy() const {return fZDCNEnergy;} | |
139 | Float_t GetZDCPEnergy() const {return fZDCPEnergy;} | |
140 | Float_t GetZDCEMEnergy() const {return fZDCEMEnergy;} | |
141 | Int_t GetZDCParticipants() const {return fZDCParticipants;} | |
142 | void SetZDC(Float_t nEnergy, Float_t pEnergy, Float_t emEnergy, | |
143 | Int_t participants) | |
144 | {fZDCNEnergy=nEnergy; fZDCPEnergy=pEnergy; fZDCEMEnergy=emEnergy; | |
145 | fZDCParticipants=participants;} | |
146 | ||
147 | void ResetV0s() { fV0s.Clear(); } | |
148 | void ResetCascades() { fCascades.Clear(); } | |
149 | void Reset(); | |
150 | ||
151 | void Print(Option_t *option="") const; | |
152 | ||
153 | protected: | |
154 | ||
155 | // Event Identification | |
156 | Int_t fEventNumber; // Event Number | |
157 | Int_t fRunNumber; // Run Number | |
158 | Long_t fTrigger; // Trigger Type | |
159 | Int_t fRecoVersion; // Version of reconstruction | |
160 | Float_t fMagneticField; // Solenoid Magnetic Field in kG : for compatibility with AliMagF | |
161 | ||
162 | Float_t fZDCNEnergy; // reconstructed energy in the neutron ZDC | |
163 | Float_t fZDCPEnergy; // reconstructed energy in the proton ZDC | |
164 | Float_t fZDCEMEnergy; // reconstructed energy in the electromagnetic ZDC | |
165 | Int_t fZDCParticipants; // number of participants estimated by the ZDC | |
166 | ||
167 | Float_t fT0zVertex; // vertex z position estimated by the START | |
168 | AliESDVertex fPrimaryVertex; // Primary vertex estimated by the ITS | |
169 | ||
170 | TClonesArray fTracks; // ESD tracks | |
171 | TClonesArray fHLTConfMapTracks;// HLT ESD tracks from Conformal Mapper method | |
172 | TClonesArray fHLTHoughTracks; // HLT ESD tracks from Hough Transform method | |
173 | TClonesArray fMuonTracks; // MUON ESD tracks | |
174 | TClonesArray fPmdTracks; // PMD ESD tracks | |
175 | TClonesArray fV0s; // V0 vertices | |
176 | TClonesArray fCascades; // Cascade vertices | |
177 | TClonesArray fKinks; // Kinks | |
178 | TClonesArray fV0MIs; // V0MI | |
179 | Int_t fPHOSParticles; // Number of PHOS particles (stored as fTracks) | |
180 | Int_t fEMCALParticles; // Number of EMCAL particles (stored as fTracks) | |
181 | Int_t fFirstPHOSParticle; // First PHOS particle in the fTracks list | |
182 | Int_t fFirstEMCALParticle;// First EMCAL particle in the fTracks list | |
183 | ||
184 | ClassDef(AliESD,8) //ESD class | |
185 | }; | |
186 | #endif | |
187 |