Adding a virtual getter for the number of cascades (A. Maire)
[u/mrichter/AliRoot.git] / STEER / AliVEvent.h
CommitLineData
6bc03c45 1// -*- mode: C++ -*-
2#ifndef ALIVEVENT_H
3#define ALIVEVENT_H
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7
8/* $Id$ */
9
10//-------------------------------------------------------------------------
11// Class AliVEvent
12//
13// Origin: Markus Oldenburg, CERN, Markus.Oldenburg@cern.ch
14//-------------------------------------------------------------------------
15
16#include <TObject.h>
17#include <TTree.h>
18#include "AliVHeader.h"
19#include "AliVParticle.h"
5303c167 20#include "AliVVertex.h"
6bc03c45 21
22class AliVEvent : public TObject {
23
24public:
25
26 AliVEvent() { }
27 virtual ~AliVEvent() { }
28 AliVEvent(const AliVEvent& vEvnt);
29 AliVEvent& operator=(const AliVEvent& vEvnt);
30
31 // Services
32 virtual void AddObject(TObject* obj) = 0;
33 virtual TObject* FindListObject(const char *name) = 0;
34 virtual TList* GetList() const = 0;
35
36 virtual void CreateStdContent() = 0;
37 virtual void GetStdContent() = 0;
38
1d0dd492 39 virtual void ReadFromTree(TTree *tree, Option_t* opt) = 0;
f12d42ce 40 virtual void WriteToTree(TTree* tree) const = 0;
6bc03c45 41
42 //virtual void Reset() = 0;
43 //virtual void ResetStdContent() = 0;
44 virtual void SetStdNames() = 0;
45
46 virtual void Print(Option_t *option="") const = 0;
47
48 // Header
49 virtual AliVHeader* GetHeader() const = 0;
50
51 // Delegated methods for fESDRun or AODHeader
52
53 virtual void SetRunNumber(Int_t n) = 0;
54 virtual void SetPeriodNumber(UInt_t n) = 0;
55 virtual void SetMagneticField(Double_t mf) = 0;
56
57 virtual Int_t GetRunNumber() const = 0;
58 virtual UInt_t GetPeriodNumber() const = 0;
59 virtual Double_t GetMagneticField() const = 0;
60
5303c167 61 virtual Double_t GetDiamondX() const {return -999.;}
62 virtual Double_t GetDiamondY() const {return -999.;}
63 virtual void GetDiamondCovXY(Float_t cov[3]) const
64 {cov[0]=-999.; return;}
65
6bc03c45 66 // Delegated methods for fHeader
67 virtual void SetOrbitNumber(UInt_t n) = 0;
68 virtual void SetBunchCrossNumber(UShort_t n) = 0;
69 virtual void SetEventType(UInt_t eventType)= 0;
70 virtual void SetTriggerMask(ULong64_t n) = 0;
71 virtual void SetTriggerCluster(UChar_t n) = 0;
72
73 virtual UInt_t GetOrbitNumber() const = 0;
74 virtual UShort_t GetBunchCrossNumber() const = 0;
75 virtual UInt_t GetEventType() const = 0;
76 virtual ULong64_t GetTriggerMask() const = 0;
77 virtual UChar_t GetTriggerCluster() const = 0;
78
79 virtual Double_t GetZDCN1Energy() const = 0;
80 virtual Double_t GetZDCP1Energy() const = 0;
81 virtual Double_t GetZDCN2Energy() const = 0;
82 virtual Double_t GetZDCP2Energy() const = 0;
a85132e7 83 virtual Double_t GetZDCEMEnergy(Int_t i) const = 0;
6bc03c45 84
85 // Tracks
86 virtual AliVParticle *GetTrack(Int_t i) const = 0;
87 //virtual Int_t AddTrack(const AliVParticle *t) = 0;
88 virtual Int_t GetNumberOfTracks() const = 0;
c1b93f02 89 virtual Int_t GetNumberOfV0s() const = 0;
bc0379e5 90 virtual Int_t GetNumberOfCascades() const = 0;
6bc03c45 91
5303c167 92 // Primary vertex
93 virtual const AliVVertex *GetPrimaryVertex() const {return 0x0;}
94
6bc03c45 95 //---------- end of new stuff
96
97
98 /* to be considered to go in here be implemented
99
100 void SetPrimaryVertex(const AliESDVertex *vertex) {
101 *fPrimaryVertex = *vertex;
102 fPrimaryVertex->SetName("PrimaryVertex");// error prone use class wide names?
103 }
6bc03c45 104
105 void SetMultiplicity(const AliMultiplicity *mul) {
106 *fSPDMult = *mul;
107 // CKB
108 // new (&fSPDMult) AliMultiplicity(*mul);
109 }
110 const AliMultiplicity *GetMultiplicity() const {return fSPDMult;}
111
112
113 AliESDMuonTrack *GetMuonTrack(Int_t i) const {
114 return (AliESDMuonTrack *)fMuonTracks->UncheckedAt(i);
115 }
116 void AddMuonTrack(const AliESDMuonTrack *t) {
117 TClonesArray &fmu = *fMuonTracks;
118 new(fmu[fMuonTracks->GetEntriesFast()]) AliESDMuonTrack(*t);
119 }
120
121 AliESDv0 *GetV0(Int_t i) const {
122 return (AliESDv0*)fV0s->UncheckedAt(i);
123 }
124 Int_t AddV0(const AliESDv0 *v);
125
126 AliESDcascade *GetCascade(Int_t i) const {
127 return (AliESDcascade *)fCascades->UncheckedAt(i);
128 }
129 void AddCascade(const AliESDcascade *c) {
130 TClonesArray &fc = *fCascades;
131 new(fc[fCascades->GetEntriesFast()]) AliESDcascade(*c);
132 }
133
134 AliESDkink *GetKink(Int_t i) const {
135 return (AliESDkink *)fKinks->UncheckedAt(i);
136 }
137 Int_t AddKink(const AliESDkink *c);
138
139 AliESDCaloCluster *GetCaloCluster(Int_t i) const {
140 return (AliESDCaloCluster *)fCaloClusters->UncheckedAt(i);
141 }
142 Int_t AddCaloCluster(const AliESDCaloCluster *c);
143
144 Int_t GetNumberOfMuonTracks() const {return fMuonTracks->GetEntriesFast();}
145 Int_t GetNumberOfV0s() const {return fV0s->GetEntriesFast();}
146 Int_t GetNumberOfCascades() const {return fCascades->GetEntriesFast();}
147 Int_t GetNumberOfKinks() const {return fKinks->GetEntriesFast();}
148 Int_t GetNumberOfCaloClusters() const {return fCaloClusters->GetEntriesFast();}
149
150 */
151
152 ClassDef(AliVEvent,0) // base class for AliEvent data
153};
154#endif
155