New generator: EPOS
[u/mrichter/AliRoot.git] / STEER / AliMCEvent.h
CommitLineData
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
24class AliStack;
25class AliHeader;
26class AliGenEventHeader;
27
28class TClonesArray;
29
30class AliMCEvent : public AliVEvent {
31
32public:
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() {;}
1d0dd492 47 virtual void ReadFromTree(TTree * /*tree*/, Option_t* /*opt*/) {;}
f12d42ce 48 virtual void WriteToTree(TTree* /*tree*/) const {;}
415d9f5c 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;}
c1b93f02 91 virtual Int_t GetNumberOfV0s() const {return -1;}
bc0379e5 92 virtual Int_t GetNumberOfCascades() const {return -1;}
415d9f5c 93
94 //
95 // MC Specific methods
96 //
97 // Getters
98 AliStack* Stack() {return fStack;}
99 AliHeader* Header() {return fHeader;}
100 AliGenEventHeader* GenEventHeader();
101 // Services
102 virtual void ConnectTreeE (TTree* tree);
103 virtual void ConnectTreeK (TTree* tree);
104 virtual void ConnectTreeTR(TTree* tree);
105 virtual void Clean();
106 virtual void FinishEvent();
107 virtual Int_t GetParticleAndTR(Int_t i, TParticle*& particle, TClonesArray*& trefs);
108 virtual void DrawCheck(Int_t i, Int_t search);
109private:
110 virtual void ReorderAndExpandTreeTR();
111
112private:
93df0e9b 113 AliStack *fStack; //! Current pointer to stack
114 TClonesArray *fMCParticles; //! Pointer to list of particles
115 TRefArray *fMCParticleMap; //! Map of MC Particles
116 AliHeader *fHeader; //! Current pointer to header
117 TClonesArray *fTRBuffer; //! Track reference buffer
118 TClonesArray *fTrackReferences; //! Array of track references
119 TTree *fTreeTR; //! Pointer to Track Reference Tree
120 TTree *fTmpTreeTR; //! Temporary tree TR to read old format
121 TFile *fTmpFileTR; //! Temporary file with TreeTR to read old format
122 Int_t fNprimaries; //! Number of primaries
123 Int_t fNparticles; //! Number of particles
415d9f5c 124 ClassDef(AliMCEvent, 0) // AliVEvent realisation for MC data
125};
126
127
128#endif
129