Adding RICH and updating PHOS part (Yu.Belikov)
[u/mrichter/AliRoot.git] / STEER / AliESD.h
CommitLineData
ae982df3 1#ifndef ALIESDEVENT_H
2#define ALIESDEVENT_H
8a8d023f 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
88cb7938 6
7/* $Id$ */
8
ae982df3 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//-------------------------------------------------------------------------
8a8d023f 15
9e12cd8c 16#include "TObject.h"
ae982df3 17#include "TClonesArray.h"
2257f27e 18#include "AliESDVertex.h"
ae982df3 19#include "AliESDtrack.h"
672b5f43 20#include "AliESDMuonTrack.h"
21#include "AliESDCaloTrack.h"
e23730c7 22#include "AliESDv0.h"
23#include "AliESDcascade.h"
8a8d023f 24
ae982df3 25class AliESD : public TObject {
8a8d023f 26public:
ae982df3 27 AliESD();
28 virtual ~AliESD() {
29 fTracks.Delete();
672b5f43 30 fCaloTracks.Delete();
31 fMuonTracks.Delete();
e23730c7 32 fV0s.Delete();
33 fCascades.Delete();
ae982df3 34 }
8a8d023f 35
ae982df3 36 void SetEventNumber(Int_t n) {fEventNumber=n;}
5121f0b3 37 void SetRunNumber(Int_t n) {fRunNumber=n;}
2257f27e 38 void SetTrigger(Long_t n) {fTrigger=n;}
a866ac60 39 void SetMagneticField(Float_t mf){fMagneticField = mf;}
40 Float_t GetMagneticField() const {return fMagneticField;}
41
873f1f73 42 AliESDtrack *GetTrack(Int_t i) const {
ae982df3 43 return (AliESDtrack *)fTracks.UncheckedAt(i);
44 }
873f1f73 45 AliESDCaloTrack *GetCaloTrack(Int_t i) const {
672b5f43 46 return (AliESDCaloTrack *)fCaloTracks.UncheckedAt(i);
47 }
873f1f73 48 AliESDMuonTrack *GetMuonTrack(Int_t i) const {
672b5f43 49 return (AliESDMuonTrack *)fMuonTracks.UncheckedAt(i);
50 }
51
ae982df3 52 void AddTrack(const AliESDtrack *t) {
53 new(fTracks[fTracks.GetEntriesFast()]) AliESDtrack(*t);
54 }
672b5f43 55 void AddCaloTrack(const AliESDCaloTrack *t) {
56 new(fCaloTracks[fCaloTracks.GetEntriesFast()]) AliESDCaloTrack(*t);
57 }
58 void AddMuonTrack(const AliESDMuonTrack *t) {
59 new(fMuonTracks[fMuonTracks.GetEntriesFast()]) AliESDMuonTrack(*t);
60 }
8a8d023f 61
873f1f73 62 AliESDv0 *GetV0(Int_t i) const {
e23730c7 63 return (AliESDv0 *)fV0s.UncheckedAt(i);
64 }
65 void AddV0(const AliESDv0 *v) {
66 new(fV0s[fV0s.GetEntriesFast()]) AliESDv0(*v);
67 }
68
873f1f73 69 AliESDcascade *GetCascade(Int_t i) const {
e23730c7 70 return (AliESDcascade *)fCascades.UncheckedAt(i);
71 }
72 void AddCascade(const AliESDcascade *c) {
73 new(fCascades[fCascades.GetEntriesFast()]) AliESDcascade(*c);
74 }
75
2257f27e 76 void SetVertex(AliESDVertex* vertex) {
77 new(&fPrimaryVertex) AliESDVertex(*vertex);
78 }
79 const AliESDVertex* GetVertex() const {return &fPrimaryVertex;};
873f1f73 80
ae982df3 81 Int_t GetEventNumber() const {return fEventNumber;}
82 Int_t GetRunNumber() const {return fRunNumber;}
83 Long_t GetTrigger() const {return fTrigger;}
8a8d023f 84
672b5f43 85 Int_t GetNumberOfTracks() const {return fTracks.GetEntriesFast();}
86 Int_t GetNumberOfCaloTracks() const {return fCaloTracks.GetEntriesFast();}
87 Int_t GetNumberOfMuonTracks() const {return fMuonTracks.GetEntriesFast();}
e23730c7 88 Int_t GetNumberOfV0s() const {return fV0s.GetEntriesFast();}
89 Int_t GetNumberOfCascades() const {return fCascades.GetEntriesFast();}
4a78b8c5 90
91 Float_t GetT0zVertex() const {return fT0zVertex;}
92 void SetT0zVertex(Float_t z) {fT0zVertex=z;}
ef278eae 93
94 void Print(Option_t *option="") const;
95
8a8d023f 96protected:
97
98 // Event Identification
ae982df3 99 Int_t fEventNumber; // Event Number
100 Int_t fRunNumber; // Run Number
101 Long_t fTrigger; // Trigger Type
102 Int_t fRecoVersion; // Version of reconstruction
a866ac60 103 Float_t fMagneticField; // Solenoid Magnetic Field in kG : for compatibility with AliMagF
8a8d023f 104
4a78b8c5 105 Float_t fT0zVertex; // vertex z position estimated by the START
106 AliESDVertex fPrimaryVertex; // Primary vertex estimated by the ITS
873f1f73 107
ae982df3 108 TClonesArray fTracks; // ESD tracks
672b5f43 109 TClonesArray fCaloTracks; // Calorimeters' ESD tracks
110 TClonesArray fMuonTracks; // MUON ESD tracks
e23730c7 111 TClonesArray fV0s; // V0 vertices
112 TClonesArray fCascades; // Cascade vertices
8a8d023f 113
2257f27e 114 ClassDef(AliESD,3) //ESD class
a866ac60 115 //ver. 2: Magnetic Field Added; skowron
8a8d023f 116};
117
118#endif
119