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