415d9f5c |
1 | // -*- mode: C++ -*- |
2 | #ifndef ALIMCEVENT_H |
3 | #define ALIMCEVENT_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 AliMCEvent |
12 | // |
13 | // Origin: Andreas.Morsch, CERN, andreas.morsch@cern.ch |
14 | //------------------------------------------------------------------------- |
15 | |
16 | |
17 | #include <TTree.h> |
93df0e9b |
18 | #include <TRefArray.h> |
415d9f5c |
19 | |
20 | #include <AliVEvent.h> |
21 | #include "AliVHeader.h" |
22 | #include "AliMCParticle.h" |
23 | |
24 | class AliStack; |
25 | class AliHeader; |
26 | class AliGenEventHeader; |
27 | |
28 | class TClonesArray; |
29 | |
30 | class AliMCEvent : public AliVEvent { |
31 | |
32 | public: |
33 | |
34 | AliMCEvent(); |
35 | virtual ~AliMCEvent() {;} |
36 | AliMCEvent(const AliMCEvent& mcEvnt); |
37 | AliMCEvent& operator=(const AliMCEvent& mcEvnt); |
38 | // |
39 | // Methods implementing the interface |
40 | // |
41 | // Services |
42 | virtual void AddObject(TObject* /*obj*/) {;} |
43 | virtual TObject* FindListObject(const char */*name*/) {return 0;} |
44 | virtual TList* GetList() const {return 0;} |
45 | virtual void CreateStdContent() {;} |
46 | virtual void GetStdContent() {;} |
47 | virtual void ReadFromTree(TTree * /*tree*/) {;} |
48 | virtual const void WriteToTree(TTree* /*tree*/) const {;} |
49 | |
50 | virtual void SetStdNames() {;} |
51 | virtual void Print(Option_t */*option=""*/) const {;} |
52 | |
53 | |
54 | // Header |
55 | virtual AliVHeader* GetHeader() const {return 0;} |
56 | |
57 | // Delegated methods for fESDRun or AODHeader |
58 | |
59 | virtual void SetRunNumber(Int_t /*n*/) {;} |
60 | virtual void SetPeriodNumber(UInt_t /*n*/) {;} |
61 | virtual void SetMagneticField(Double_t /*mf*/) {;} |
62 | |
63 | |
64 | virtual Int_t GetRunNumber() const {return 0;} |
65 | virtual UInt_t GetPeriodNumber() const {return 0;} |
66 | virtual Double_t GetMagneticField() const {return 0.;} |
67 | |
68 | // Setters not needed |
69 | virtual void SetOrbitNumber(UInt_t /*n*/) {;} |
70 | virtual void SetBunchCrossNumber(UShort_t /*n*/) {;} |
71 | virtual void SetEventType(UInt_t /*eventType*/) {;} |
72 | virtual void SetTriggerMask(ULong64_t /*n*/) {;} |
73 | virtual void SetTriggerCluster(UChar_t /*n*/) {;} |
74 | |
75 | virtual UInt_t GetOrbitNumber() const {return 0;} |
76 | virtual UShort_t GetBunchCrossNumber() const {return 0;} |
77 | |
eee13e8d |
78 | virtual UInt_t GetEventType() const {return 0;} |
415d9f5c |
79 | |
a85132e7 |
80 | virtual ULong64_t GetTriggerMask() const {return 0;} |
81 | virtual UChar_t GetTriggerCluster() const {return 0;} |
82 | virtual Double_t GetZDCN1Energy() const {return 0.;} |
83 | virtual Double_t GetZDCP1Energy() const {return 0.;} |
84 | virtual Double_t GetZDCN2Energy() const {return 0.;} |
85 | virtual Double_t GetZDCP2Energy() const {return 0.;} |
eee13e8d |
86 | virtual Double_t GetZDCEMEnergy(Int_t /*i*/) |
87 | const {return 0.;} |
415d9f5c |
88 | // Tracks |
89 | virtual AliMCParticle *GetTrack(Int_t i) const; |
90 | virtual Int_t GetNumberOfTracks() const {return fNparticles;} |
91 | |
92 | // |
93 | // MC Specific methods |
94 | // |
95 | // Getters |
96 | AliStack* Stack() {return fStack;} |
97 | AliHeader* Header() {return fHeader;} |
98 | AliGenEventHeader* GenEventHeader(); |
99 | // Services |
100 | virtual void ConnectTreeE (TTree* tree); |
101 | virtual void ConnectTreeK (TTree* tree); |
102 | virtual void ConnectTreeTR(TTree* tree); |
103 | virtual void Clean(); |
104 | virtual void FinishEvent(); |
105 | virtual Int_t GetParticleAndTR(Int_t i, TParticle*& particle, TClonesArray*& trefs); |
106 | virtual void DrawCheck(Int_t i, Int_t search); |
107 | private: |
108 | virtual void ReorderAndExpandTreeTR(); |
109 | |
110 | private: |
93df0e9b |
111 | AliStack *fStack; //! Current pointer to stack |
112 | TClonesArray *fMCParticles; //! Pointer to list of particles |
113 | TRefArray *fMCParticleMap; //! Map of MC Particles |
114 | AliHeader *fHeader; //! Current pointer to header |
115 | TClonesArray *fTRBuffer; //! Track reference buffer |
116 | TClonesArray *fTrackReferences; //! Array of track references |
117 | TTree *fTreeTR; //! Pointer to Track Reference Tree |
118 | TTree *fTmpTreeTR; //! Temporary tree TR to read old format |
119 | TFile *fTmpFileTR; //! Temporary file with TreeTR to read old format |
120 | Int_t fNprimaries; //! Number of primaries |
121 | Int_t fNparticles; //! Number of particles |
415d9f5c |
122 | ClassDef(AliMCEvent, 0) // AliVEvent realisation for MC data |
123 | }; |
124 | |
125 | |
126 | #endif |
127 | |