]>
Commit | Line | Data |
---|---|---|
9da38871 | 1 | // -*- mode: C++ -*- |
af7ba10c | 2 | #ifndef ALIESD_H |
3 | #define ALIESD_H | |
8a8d023f | 4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
88cb7938 | 7 | |
8 | /* $Id$ */ | |
9 | ||
ae982df3 | 10 | //------------------------------------------------------------------------- |
11 | // Class AliESD | |
12 | // This is the class to deal with during the physical analysis of data | |
13 | // | |
14 | // Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch | |
15 | //------------------------------------------------------------------------- | |
8a8d023f | 16 | |
af7ba10c | 17 | #include <TClonesArray.h> |
18 | #include <TObject.h> | |
19 | ||
af7ba10c | 20 | #include "AliESDMuonTrack.h" |
21 | #include "AliESDPmdTrack.h" | |
0ee00e25 | 22 | #include "AliESDTrdTrack.h" |
af7ba10c | 23 | #include "AliESDVertex.h" |
24 | #include "AliESDcascade.h" | |
51ad6848 | 25 | #include "AliESDkink.h" |
af7ba10c | 26 | #include "AliESDtrack.h" |
482070f2 | 27 | #include "AliESDHLTtrack.h" |
85c60a8e | 28 | #include "AliESDCaloCluster.h" |
af7ba10c | 29 | #include "AliESDv0.h" |
51ad6848 | 30 | #include "AliESDV0MI.h" |
9da38871 | 31 | #include "AliESDFMD.h" |
32e449be | 32 | #include "AliMultiplicity.h" |
8a8d023f | 33 | |
d75007f6 | 34 | class AliESDfriend; |
35 | ||
ae982df3 | 36 | class AliESD : public TObject { |
8a8d023f | 37 | public: |
ae982df3 | 38 | AliESD(); |
af7ba10c | 39 | virtual ~AliESD(); |
8a8d023f | 40 | |
d75007f6 | 41 | void SetESDfriend(const AliESDfriend *f); |
42 | void GetESDfriend(AliESDfriend *f) const; | |
43 | ||
ae982df3 | 44 | void SetEventNumber(Int_t n) {fEventNumber=n;} |
5121f0b3 | 45 | void SetRunNumber(Int_t n) {fRunNumber=n;} |
b647652d | 46 | void SetTriggerMask(ULong64_t n) {fTriggerMask=n;} |
47 | void SetTriggerCluster(UChar_t n) {fTriggerCluster = n;} | |
a866ac60 | 48 | void SetMagneticField(Float_t mf){fMagneticField = mf;} |
49 | Float_t GetMagneticField() const {return fMagneticField;} | |
50 | ||
873f1f73 | 51 | AliESDtrack *GetTrack(Int_t i) const { |
ae982df3 | 52 | return (AliESDtrack *)fTracks.UncheckedAt(i); |
53 | } | |
482070f2 | 54 | AliESDHLTtrack *GetHLTConfMapTrack(Int_t i) const { |
55 | return (AliESDHLTtrack *)fHLTConfMapTracks.UncheckedAt(i); | |
56 | } | |
57 | AliESDHLTtrack *GetHLTHoughTrack(Int_t i) const { | |
58 | return (AliESDHLTtrack *)fHLTHoughTracks.UncheckedAt(i); | |
59 | } | |
873f1f73 | 60 | AliESDMuonTrack *GetMuonTrack(Int_t i) const { |
672b5f43 | 61 | return (AliESDMuonTrack *)fMuonTracks.UncheckedAt(i); |
62 | } | |
561b7b31 | 63 | AliESDPmdTrack *GetPmdTrack(Int_t i) const { |
64 | return (AliESDPmdTrack *)fPmdTracks.UncheckedAt(i); | |
65 | } | |
0ee00e25 | 66 | AliESDTrdTrack *GetTrdTrack(Int_t i) const { |
67 | return (AliESDTrdTrack *)fTrdTracks.UncheckedAt(i); | |
68 | } | |
672b5f43 | 69 | |
51ad6848 | 70 | Int_t AddTrack(const AliESDtrack *t) { |
71 | AliESDtrack * track = new(fTracks[fTracks.GetEntriesFast()]) AliESDtrack(*t); | |
72 | track->SetID(fTracks.GetEntriesFast()-1); | |
73 | return track->GetID(); | |
74 | ||
ae982df3 | 75 | } |
482070f2 | 76 | void AddHLTConfMapTrack(const AliESDHLTtrack *t) { |
77 | new(fHLTConfMapTracks[fHLTConfMapTracks.GetEntriesFast()]) AliESDHLTtrack(*t); | |
78 | } | |
79 | void AddHLTHoughTrack(const AliESDHLTtrack *t) { | |
80 | new(fHLTHoughTracks[fHLTHoughTracks.GetEntriesFast()]) AliESDHLTtrack(*t); | |
81 | } | |
672b5f43 | 82 | void AddMuonTrack(const AliESDMuonTrack *t) { |
83 | new(fMuonTracks[fMuonTracks.GetEntriesFast()]) AliESDMuonTrack(*t); | |
84 | } | |
561b7b31 | 85 | void AddPmdTrack(const AliESDPmdTrack *t) { |
86 | new(fPmdTracks[fPmdTracks.GetEntriesFast()]) AliESDPmdTrack(*t); | |
87 | } | |
0ee00e25 | 88 | void AddTrdTrack(const AliESDTrdTrack *t) { |
89 | new(fTrdTracks[fTrdTracks.GetEntriesFast()]) AliESDTrdTrack(*t); | |
90 | } | |
8a8d023f | 91 | |
873f1f73 | 92 | AliESDv0 *GetV0(Int_t i) const { |
e23730c7 | 93 | return (AliESDv0 *)fV0s.UncheckedAt(i); |
94 | } | |
95 | void AddV0(const AliESDv0 *v) { | |
96 | new(fV0s[fV0s.GetEntriesFast()]) AliESDv0(*v); | |
97 | } | |
51ad6848 | 98 | void UpdateV0PIDs(); |
e23730c7 | 99 | |
873f1f73 | 100 | AliESDcascade *GetCascade(Int_t i) const { |
e23730c7 | 101 | return (AliESDcascade *)fCascades.UncheckedAt(i); |
102 | } | |
103 | void AddCascade(const AliESDcascade *c) { | |
104 | new(fCascades[fCascades.GetEntriesFast()]) AliESDcascade(*c); | |
105 | } | |
106 | ||
51ad6848 | 107 | AliESDkink *GetKink(Int_t i) const { |
108 | return (AliESDkink *)fKinks.UncheckedAt(i); | |
109 | } | |
110 | Int_t AddKink(const AliESDkink *c) { | |
111 | AliESDkink * kink = new(fKinks[fKinks.GetEntriesFast()]) AliESDkink(*c); | |
112 | kink->SetID(fKinks.GetEntriesFast()); | |
113 | return fKinks.GetEntriesFast()-1; | |
114 | } | |
115 | ||
116 | AliESDV0MI *GetV0MI(Int_t i) const { | |
117 | return (AliESDV0MI *)fV0MIs.UncheckedAt(i); | |
118 | } | |
119 | Int_t AddV0MI(const AliESDV0MI *c) { | |
120 | AliESDV0MI * v0 = new(fV0MIs[fV0MIs.GetEntriesFast()]) AliESDV0MI(*c); | |
121 | v0->SetID(fV0MIs.GetEntriesFast()-1); | |
122 | return fV0MIs.GetEntriesFast()-1; | |
123 | } | |
124 | ||
85c60a8e | 125 | AliESDCaloCluster *GetCaloCluster(Int_t i) const { |
126 | return (AliESDCaloCluster *)fCaloClusters.UncheckedAt(i); | |
127 | } | |
128 | Int_t AddCaloCluster(const AliESDCaloCluster *c) { | |
129 | AliESDCaloCluster *clus = new(fCaloClusters[fCaloClusters.GetEntriesFast()]) AliESDCaloCluster(*c); | |
130 | clus->SetID(fCaloClusters.GetEntriesFast()-1); | |
131 | return fCaloClusters.GetEntriesFast()-1; | |
132 | } | |
133 | ||
15b965a7 | 134 | void SetVertex(const AliESDVertex *vertex) { |
135 | new (&fSPDVertex) AliESDVertex(*vertex); | |
2257f27e | 136 | } |
15b965a7 | 137 | const AliESDVertex *GetVertex() const {return &fSPDVertex;} |
c5e3e5d1 | 138 | |
32e449be | 139 | void SetMultiplicity(const AliMultiplicity *mul) { |
140 | new (&fSPDMult) AliMultiplicity(*mul); | |
141 | } | |
142 | const AliMultiplicity *GetMultiplicity() const {return &fSPDMult;} | |
143 | ||
15b965a7 | 144 | void SetPrimaryVertex(const AliESDVertex *vertex) { |
145 | new (&fPrimaryVertex) AliESDVertex(*vertex); | |
c5e3e5d1 | 146 | } |
15b965a7 | 147 | const AliESDVertex *GetPrimaryVertex() const {return &fPrimaryVertex;} |
873f1f73 | 148 | |
ae982df3 | 149 | Int_t GetEventNumber() const {return fEventNumber;} |
150 | Int_t GetRunNumber() const {return fRunNumber;} | |
b647652d | 151 | ULong64_t GetTriggerMask() const {return fTriggerMask;} |
152 | UChar_t GetTriggerCluster() const {return fTriggerCluster;} | |
8a8d023f | 153 | |
672b5f43 | 154 | Int_t GetNumberOfTracks() const {return fTracks.GetEntriesFast();} |
482070f2 | 155 | Int_t GetNumberOfHLTConfMapTracks() const {return fHLTConfMapTracks.GetEntriesFast();} |
156 | Int_t GetNumberOfHLTHoughTracks() const {return fHLTHoughTracks.GetEntriesFast();} | |
672b5f43 | 157 | Int_t GetNumberOfMuonTracks() const {return fMuonTracks.GetEntriesFast();} |
561b7b31 | 158 | Int_t GetNumberOfPmdTracks() const {return fPmdTracks.GetEntriesFast();} |
0ee00e25 | 159 | Int_t GetNumberOfTrdTracks() const {return fTrdTracks.GetEntriesFast();} |
e23730c7 | 160 | Int_t GetNumberOfV0s() const {return fV0s.GetEntriesFast();} |
161 | Int_t GetNumberOfCascades() const {return fCascades.GetEntriesFast();} | |
51ad6848 | 162 | Int_t GetNumberOfKinks() const {return fKinks.GetEntriesFast();} |
163 | Int_t GetNumberOfV0MIs() const {return fV0MIs.GetEntriesFast();} | |
85c60a8e | 164 | Int_t GetNumberOfCaloClusters() const {return fCaloClusters.GetEntriesFast();} |
165 | ||
166 | Int_t GetNumberOfEMCALClusters() const {return fEMCALClusters;} | |
167 | void SetNumberOfEMCALClusters(Int_t clus) {fEMCALClusters = clus;} | |
168 | Int_t GetFirstEMCALCluster() const {return fFirstEMCALCluster;} | |
169 | void SetFirstEMCALCluster(Int_t index) {fFirstEMCALCluster = index;} | |
170 | ||
171 | Int_t GetNumberOfPHOSClusters() const {return fPHOSClusters;} | |
172 | void SetNumberOfPHOSClusters(Int_t part) { fPHOSClusters = part ; } | |
173 | void SetFirstPHOSCluster(Int_t index) { fFirstPHOSCluster = index ; } | |
174 | Int_t GetFirstPHOSCluster() const { return fFirstPHOSCluster ; } | |
a2882fb4 | 175 | |
4a78b8c5 | 176 | Float_t GetT0zVertex() const {return fT0zVertex;} |
177 | void SetT0zVertex(Float_t z) {fT0zVertex=z;} | |
6d45eaef | 178 | Float_t GetT0() const {return fT0timeStart;} |
179 | void SetT0(Float_t timeStart) {fT0timeStart = timeStart;} | |
180 | const Float_t * GetT0time() const {return fT0time;} | |
181 | void SetT0time(Float_t time[24]) { | |
182 | for (Int_t i=0; i<24; i++) fT0time[i] = time[i]; | |
183 | } | |
184 | const Float_t * GetT0amplitude() const {return fT0amplitude;} | |
185 | void SetT0amplitude(Float_t amp[24]) { | |
186 | for (Int_t i=0; i<24; i++) fT0amplitude[i] = amp[i]; | |
187 | } | |
ef278eae | 188 | |
32a5cab4 | 189 | Float_t GetZDCN1Energy() const {return fZDCN1Energy;} |
190 | Float_t GetZDCP1Energy() const {return fZDCP1Energy;} | |
191 | Float_t GetZDCN2Energy() const {return fZDCN2Energy;} | |
192 | Float_t GetZDCP2Energy() const {return fZDCP2Energy;} | |
878bc0c2 | 193 | Float_t GetZDCEMEnergy() const {return fZDCEMEnergy;} |
194 | Int_t GetZDCParticipants() const {return fZDCParticipants;} | |
32a5cab4 | 195 | void SetZDC(Float_t n1Energy, Float_t p1Energy, Float_t emEnergy, |
196 | Float_t n2Energy, Float_t p2Energy, Int_t participants) | |
197 | {fZDCN1Energy=n1Energy; fZDCP1Energy=p1Energy; fZDCEMEnergy=emEnergy; | |
198 | fZDCN2Energy=n2Energy; fZDCP2Energy=p2Energy; fZDCParticipants=participants;} | |
878bc0c2 | 199 | |
50ca5f39 | 200 | void ResetV0s() { fV0s.Clear(); } |
201 | void ResetCascades() { fCascades.Clear(); } | |
202 | void Reset(); | |
bf25155c | 203 | |
ef278eae | 204 | void Print(Option_t *option="") const; |
9da38871 | 205 | |
206 | void SetFMDData(AliESDFMD * obj) { | |
207 | fESDFMD = new AliESDFMD(*obj); | |
208 | } | |
209 | ||
210 | AliESDFMD * GetFMDData(){ return fESDFMD;} | |
ef278eae | 211 | |
8a8d023f | 212 | protected: |
c028b974 | 213 | AliESD(const AliESD&); |
fe12e09c | 214 | AliESD &operator=(const AliESD& source); |
8a8d023f | 215 | |
216 | // Event Identification | |
ae982df3 | 217 | Int_t fEventNumber; // Event Number |
218 | Int_t fRunNumber; // Run Number | |
b647652d | 219 | ULong64_t fTriggerMask; // Trigger Type (mask) |
220 | UChar_t fTriggerCluster; // Trigger cluster (mask) | |
ae982df3 | 221 | Int_t fRecoVersion; // Version of reconstruction |
a866ac60 | 222 | Float_t fMagneticField; // Solenoid Magnetic Field in kG : for compatibility with AliMagF |
8a8d023f | 223 | |
32a5cab4 | 224 | Float_t fZDCN1Energy; // reconstructed energy in the neutron ZDC |
225 | Float_t fZDCP1Energy; // reconstructed energy in the proton ZDC | |
226 | Float_t fZDCN2Energy; // reconstructed energy in the neutron ZDC | |
227 | Float_t fZDCP2Energy; // reconstructed energy in the proton ZDC | |
878bc0c2 | 228 | Float_t fZDCEMEnergy; // reconstructed energy in the electromagnetic ZDC |
229 | Int_t fZDCParticipants; // number of participants estimated by the ZDC | |
230 | ||
4a78b8c5 | 231 | Float_t fT0zVertex; // vertex z position estimated by the START |
15b965a7 | 232 | AliESDVertex fSPDVertex; // Primary vertex estimated by the SPD |
233 | AliESDVertex fPrimaryVertex; // Primary vertex estimated using ESD tracks | |
32e449be | 234 | AliMultiplicity fSPDMult; // SPD tracklet multiplicity |
c5e3e5d1 | 235 | |
6d45eaef | 236 | Float_t fT0timeStart; // interaction time estimated by the START |
237 | Float_t fT0time[24]; // best TOF on each START PMT | |
238 | Float_t fT0amplitude[24]; // number of particles(MIPs) on each START PMT | |
8bbc564d | 239 | |
240 | TClonesArray fTracks; // ESD tracks | |
241 | TClonesArray fHLTConfMapTracks;// HLT ESD tracks from Conformal Mapper method | |
242 | TClonesArray fHLTHoughTracks; // HLT ESD tracks from Hough Transform method | |
243 | TClonesArray fMuonTracks; // MUON ESD tracks | |
244 | TClonesArray fPmdTracks; // PMD ESD tracks | |
0ee00e25 | 245 | TClonesArray fTrdTracks; // TRD ESD tracks (triggered) |
8bbc564d | 246 | TClonesArray fV0s; // V0 vertices |
247 | TClonesArray fCascades; // Cascade vertices | |
51ad6848 | 248 | TClonesArray fKinks; // Kinks |
249 | TClonesArray fV0MIs; // V0MI | |
85c60a8e | 250 | TClonesArray fCaloClusters; // Calorimeter clusters for PHOS/EMCAL |
251 | Int_t fEMCALClusters; // Number of EMCAL clusters (subset of caloclusters) | |
252 | Int_t fFirstEMCALCluster; // First EMCAL cluster in the fCaloClusters list | |
253 | ||
254 | Int_t fPHOSClusters; // Number of PHOS clusters (subset of caloclusters) | |
255 | Int_t fFirstPHOSCluster; // First PHOS cluster in the fCaloClusters list | |
704be597 | 256 | |
9da38871 | 257 | AliESDFMD * fESDFMD; // FMD object containing rough multiplicity |
258 | ||
32e449be | 259 | ClassDef(AliESD,13) //ESD class |
8a8d023f | 260 | }; |
8a8d023f | 261 | #endif |
262 |