Primary vertex included in ESD (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"
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;}
8a8d023f 36
873f1f73 37 AliESDtrack *GetTrack(Int_t i) const {
ae982df3 38 return (AliESDtrack *)fTracks.UncheckedAt(i);
39 }
873f1f73 40 AliESDCaloTrack *GetCaloTrack(Int_t i) const {
672b5f43 41 return (AliESDCaloTrack *)fCaloTracks.UncheckedAt(i);
42 }
873f1f73 43 AliESDMuonTrack *GetMuonTrack(Int_t i) const {
672b5f43 44 return (AliESDMuonTrack *)fMuonTracks.UncheckedAt(i);
45 }
46
ae982df3 47 void AddTrack(const AliESDtrack *t) {
48 new(fTracks[fTracks.GetEntriesFast()]) AliESDtrack(*t);
49 }
672b5f43 50 void AddCaloTrack(const AliESDCaloTrack *t) {
51 new(fCaloTracks[fCaloTracks.GetEntriesFast()]) AliESDCaloTrack(*t);
52 }
53 void AddMuonTrack(const AliESDMuonTrack *t) {
54 new(fMuonTracks[fMuonTracks.GetEntriesFast()]) AliESDMuonTrack(*t);
55 }
8a8d023f 56
873f1f73 57 AliESDv0 *GetV0(Int_t i) const {
e23730c7 58 return (AliESDv0 *)fV0s.UncheckedAt(i);
59 }
60 void AddV0(const AliESDv0 *v) {
61 new(fV0s[fV0s.GetEntriesFast()]) AliESDv0(*v);
62 }
63
873f1f73 64 AliESDcascade *GetCascade(Int_t i) const {
e23730c7 65 return (AliESDcascade *)fCascades.UncheckedAt(i);
66 }
67 void AddCascade(const AliESDcascade *c) {
68 new(fCascades[fCascades.GetEntriesFast()]) AliESDcascade(*c);
69 }
70
873f1f73 71 void SetVertex(const Double_t *vtx, const Double_t *cvtx=0);
72 void GetVertex(Double_t *vtx, Double_t *cvtx) const;
73
ae982df3 74 Int_t GetEventNumber() const {return fEventNumber;}
75 Int_t GetRunNumber() const {return fRunNumber;}
76 Long_t GetTrigger() const {return fTrigger;}
8a8d023f 77
672b5f43 78 Int_t GetNumberOfTracks() const {return fTracks.GetEntriesFast();}
79 Int_t GetNumberOfCaloTracks() const {return fCaloTracks.GetEntriesFast();}
80 Int_t GetNumberOfMuonTracks() const {return fMuonTracks.GetEntriesFast();}
e23730c7 81 Int_t GetNumberOfV0s() const {return fV0s.GetEntriesFast();}
82 Int_t GetNumberOfCascades() const {return fCascades.GetEntriesFast();}
8a8d023f 83
84protected:
85
86 // Event Identification
ae982df3 87 Int_t fEventNumber; // Event Number
88 Int_t fRunNumber; // Run Number
89 Long_t fTrigger; // Trigger Type
90 Int_t fRecoVersion; // Version of reconstruction
8a8d023f 91
873f1f73 92 Double_t fVtx[3]; // Primary vertex position
93 Double_t fCovVtx[6]; // Cov. matrix of the primary vertex position
94
ae982df3 95 TClonesArray fTracks; // ESD tracks
672b5f43 96 TClonesArray fCaloTracks; // Calorimeters' ESD tracks
97 TClonesArray fMuonTracks; // MUON ESD tracks
e23730c7 98 TClonesArray fV0s; // V0 vertices
99 TClonesArray fCascades; // Cascade vertices
8a8d023f 100
ae982df3 101 ClassDef(AliESD,1) //ESD class
8a8d023f 102};
103
104#endif
105