AddHitList also added to SetTreeAddress
[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"
18#include "AliESDtrack.h"
672b5f43 19#include "AliESDMuonTrack.h"
20#include "AliESDCaloTrack.h"
e23730c7 21#include "AliESDv0.h"
22#include "AliESDcascade.h"
8a8d023f 23
ae982df3 24class AliESD : public TObject {
8a8d023f 25public:
ae982df3 26 AliESD();
27 virtual ~AliESD() {
28 fTracks.Delete();
672b5f43 29 fCaloTracks.Delete();
30 fMuonTracks.Delete();
e23730c7 31 fV0s.Delete();
32 fCascades.Delete();
ae982df3 33 }
8a8d023f 34
ae982df3 35 void SetEventNumber(Int_t n) {fEventNumber=n;}
5121f0b3 36 void SetRunNumber(Int_t n) {fRunNumber=n;}
a866ac60 37 void SetMagneticField(Float_t mf){fMagneticField = mf;}
38 Float_t GetMagneticField() const {return fMagneticField;}
39
873f1f73 40 AliESDtrack *GetTrack(Int_t i) const {
ae982df3 41 return (AliESDtrack *)fTracks.UncheckedAt(i);
42 }
873f1f73 43 AliESDCaloTrack *GetCaloTrack(Int_t i) const {
672b5f43 44 return (AliESDCaloTrack *)fCaloTracks.UncheckedAt(i);
45 }
873f1f73 46 AliESDMuonTrack *GetMuonTrack(Int_t i) const {
672b5f43 47 return (AliESDMuonTrack *)fMuonTracks.UncheckedAt(i);
48 }
49
ae982df3 50 void AddTrack(const AliESDtrack *t) {
51 new(fTracks[fTracks.GetEntriesFast()]) AliESDtrack(*t);
52 }
672b5f43 53 void AddCaloTrack(const AliESDCaloTrack *t) {
54 new(fCaloTracks[fCaloTracks.GetEntriesFast()]) AliESDCaloTrack(*t);
55 }
56 void AddMuonTrack(const AliESDMuonTrack *t) {
57 new(fMuonTracks[fMuonTracks.GetEntriesFast()]) AliESDMuonTrack(*t);
58 }
8a8d023f 59
873f1f73 60 AliESDv0 *GetV0(Int_t i) const {
e23730c7 61 return (AliESDv0 *)fV0s.UncheckedAt(i);
62 }
63 void AddV0(const AliESDv0 *v) {
64 new(fV0s[fV0s.GetEntriesFast()]) AliESDv0(*v);
65 }
66
873f1f73 67 AliESDcascade *GetCascade(Int_t i) const {
e23730c7 68 return (AliESDcascade *)fCascades.UncheckedAt(i);
69 }
70 void AddCascade(const AliESDcascade *c) {
71 new(fCascades[fCascades.GetEntriesFast()]) AliESDcascade(*c);
72 }
73
873f1f73 74 void SetVertex(const Double_t *vtx, const Double_t *cvtx=0);
75 void GetVertex(Double_t *vtx, Double_t *cvtx) const;
76
ae982df3 77 Int_t GetEventNumber() const {return fEventNumber;}
78 Int_t GetRunNumber() const {return fRunNumber;}
79 Long_t GetTrigger() const {return fTrigger;}
8a8d023f 80
672b5f43 81 Int_t GetNumberOfTracks() const {return fTracks.GetEntriesFast();}
82 Int_t GetNumberOfCaloTracks() const {return fCaloTracks.GetEntriesFast();}
83 Int_t GetNumberOfMuonTracks() const {return fMuonTracks.GetEntriesFast();}
e23730c7 84 Int_t GetNumberOfV0s() const {return fV0s.GetEntriesFast();}
85 Int_t GetNumberOfCascades() const {return fCascades.GetEntriesFast();}
8a8d023f 86
87protected:
88
89 // Event Identification
ae982df3 90 Int_t fEventNumber; // Event Number
91 Int_t fRunNumber; // Run Number
92 Long_t fTrigger; // Trigger Type
93 Int_t fRecoVersion; // Version of reconstruction
a866ac60 94 Float_t fMagneticField; // Solenoid Magnetic Field in kG : for compatibility with AliMagF
8a8d023f 95
873f1f73 96 Double_t fVtx[3]; // Primary vertex position
97 Double_t fCovVtx[6]; // Cov. matrix of the primary vertex position
98
ae982df3 99 TClonesArray fTracks; // ESD tracks
672b5f43 100 TClonesArray fCaloTracks; // Calorimeters' ESD tracks
101 TClonesArray fMuonTracks; // MUON ESD tracks
e23730c7 102 TClonesArray fV0s; // V0 vertices
103 TClonesArray fCascades; // Cascade vertices
8a8d023f 104
a866ac60 105 ClassDef(AliESD,2) //ESD class
106 //ver. 2: Magnetic Field Added; skowron
8a8d023f 107};
108
109#endif
110