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