]>
Commit | Line | Data |
---|---|---|
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 "AliESDCaloTrack.h" |
561b7b31 | 21 | #include "AliESDMuonTrack.h" |
22 | #include "AliESDPmdTrack.h" | |
e23730c7 | 23 | #include "AliESDv0.h" |
24 | #include "AliESDcascade.h" | |
8a8d023f | 25 | |
ae982df3 | 26 | class AliESD : public TObject { |
8a8d023f | 27 | public: |
ae982df3 | 28 | AliESD(); |
29 | virtual ~AliESD() { | |
30 | fTracks.Delete(); | |
672b5f43 | 31 | fCaloTracks.Delete(); |
32 | fMuonTracks.Delete(); | |
561b7b31 | 33 | fPmdTracks.Delete(); |
e23730c7 | 34 | fV0s.Delete(); |
35 | fCascades.Delete(); | |
ae982df3 | 36 | } |
8a8d023f | 37 | |
ae982df3 | 38 | void SetEventNumber(Int_t n) {fEventNumber=n;} |
5121f0b3 | 39 | void SetRunNumber(Int_t n) {fRunNumber=n;} |
2257f27e | 40 | void SetTrigger(Long_t n) {fTrigger=n;} |
a866ac60 | 41 | void SetMagneticField(Float_t mf){fMagneticField = mf;} |
42 | Float_t GetMagneticField() const {return fMagneticField;} | |
43 | ||
873f1f73 | 44 | AliESDtrack *GetTrack(Int_t i) const { |
ae982df3 | 45 | return (AliESDtrack *)fTracks.UncheckedAt(i); |
46 | } | |
873f1f73 | 47 | AliESDCaloTrack *GetCaloTrack(Int_t i) const { |
672b5f43 | 48 | return (AliESDCaloTrack *)fCaloTracks.UncheckedAt(i); |
49 | } | |
873f1f73 | 50 | AliESDMuonTrack *GetMuonTrack(Int_t i) const { |
672b5f43 | 51 | return (AliESDMuonTrack *)fMuonTracks.UncheckedAt(i); |
52 | } | |
561b7b31 | 53 | AliESDPmdTrack *GetPmdTrack(Int_t i) const { |
54 | return (AliESDPmdTrack *)fPmdTracks.UncheckedAt(i); | |
55 | } | |
672b5f43 | 56 | |
ae982df3 | 57 | void AddTrack(const AliESDtrack *t) { |
58 | new(fTracks[fTracks.GetEntriesFast()]) AliESDtrack(*t); | |
59 | } | |
672b5f43 | 60 | void AddCaloTrack(const AliESDCaloTrack *t) { |
61 | new(fCaloTracks[fCaloTracks.GetEntriesFast()]) AliESDCaloTrack(*t); | |
62 | } | |
63 | void AddMuonTrack(const AliESDMuonTrack *t) { | |
64 | new(fMuonTracks[fMuonTracks.GetEntriesFast()]) AliESDMuonTrack(*t); | |
65 | } | |
561b7b31 | 66 | void AddPmdTrack(const AliESDPmdTrack *t) { |
67 | new(fPmdTracks[fPmdTracks.GetEntriesFast()]) AliESDPmdTrack(*t); | |
68 | } | |
8a8d023f | 69 | |
873f1f73 | 70 | AliESDv0 *GetV0(Int_t i) const { |
e23730c7 | 71 | return (AliESDv0 *)fV0s.UncheckedAt(i); |
72 | } | |
73 | void AddV0(const AliESDv0 *v) { | |
74 | new(fV0s[fV0s.GetEntriesFast()]) AliESDv0(*v); | |
75 | } | |
76 | ||
873f1f73 | 77 | AliESDcascade *GetCascade(Int_t i) const { |
e23730c7 | 78 | return (AliESDcascade *)fCascades.UncheckedAt(i); |
79 | } | |
80 | void AddCascade(const AliESDcascade *c) { | |
81 | new(fCascades[fCascades.GetEntriesFast()]) AliESDcascade(*c); | |
82 | } | |
83 | ||
2257f27e | 84 | void SetVertex(AliESDVertex* vertex) { |
85 | new(&fPrimaryVertex) AliESDVertex(*vertex); | |
86 | } | |
87 | const AliESDVertex* GetVertex() const {return &fPrimaryVertex;}; | |
873f1f73 | 88 | |
ae982df3 | 89 | Int_t GetEventNumber() const {return fEventNumber;} |
90 | Int_t GetRunNumber() const {return fRunNumber;} | |
91 | Long_t GetTrigger() const {return fTrigger;} | |
8a8d023f | 92 | |
672b5f43 | 93 | Int_t GetNumberOfTracks() const {return fTracks.GetEntriesFast();} |
94 | Int_t GetNumberOfCaloTracks() const {return fCaloTracks.GetEntriesFast();} | |
95 | Int_t GetNumberOfMuonTracks() const {return fMuonTracks.GetEntriesFast();} | |
561b7b31 | 96 | Int_t GetNumberOfPmdTracks() const {return fPmdTracks.GetEntriesFast();} |
e23730c7 | 97 | Int_t GetNumberOfV0s() const {return fV0s.GetEntriesFast();} |
98 | Int_t GetNumberOfCascades() const {return fCascades.GetEntriesFast();} | |
4a78b8c5 | 99 | |
100 | Float_t GetT0zVertex() const {return fT0zVertex;} | |
101 | void SetT0zVertex(Float_t z) {fT0zVertex=z;} | |
ef278eae | 102 | |
103 | void Print(Option_t *option="") const; | |
104 | ||
8a8d023f | 105 | protected: |
106 | ||
107 | // Event Identification | |
ae982df3 | 108 | Int_t fEventNumber; // Event Number |
109 | Int_t fRunNumber; // Run Number | |
110 | Long_t fTrigger; // Trigger Type | |
111 | Int_t fRecoVersion; // Version of reconstruction | |
a866ac60 | 112 | Float_t fMagneticField; // Solenoid Magnetic Field in kG : for compatibility with AliMagF |
8a8d023f | 113 | |
4a78b8c5 | 114 | Float_t fT0zVertex; // vertex z position estimated by the START |
115 | AliESDVertex fPrimaryVertex; // Primary vertex estimated by the ITS | |
873f1f73 | 116 | |
ae982df3 | 117 | TClonesArray fTracks; // ESD tracks |
672b5f43 | 118 | TClonesArray fCaloTracks; // Calorimeters' ESD tracks |
119 | TClonesArray fMuonTracks; // MUON ESD tracks | |
561b7b31 | 120 | TClonesArray fPmdTracks; // PMD ESD tracks |
e23730c7 | 121 | TClonesArray fV0s; // V0 vertices |
122 | TClonesArray fCascades; // Cascade vertices | |
8a8d023f | 123 | |
6850006c | 124 | ClassDef(AliESD,4) //ESD class |
a866ac60 | 125 | //ver. 2: Magnetic Field Added; skowron |
8a8d023f | 126 | }; |
127 | ||
128 | #endif | |
129 |