]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliMCEvent.h
Write Monte Carlo Particles.
[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;}
415d9f5c 92
93 //
94 // MC Specific methods
95 //
96 // Getters
97 AliStack* Stack() {return fStack;}
98 AliHeader* Header() {return fHeader;}
99 AliGenEventHeader* GenEventHeader();
100 // Services
101 virtual void ConnectTreeE (TTree* tree);
102 virtual void ConnectTreeK (TTree* tree);
103 virtual void ConnectTreeTR(TTree* tree);
104 virtual void Clean();
105 virtual void FinishEvent();
106 virtual Int_t GetParticleAndTR(Int_t i, TParticle*& particle, TClonesArray*& trefs);
107 virtual void DrawCheck(Int_t i, Int_t search);
108private:
109 virtual void ReorderAndExpandTreeTR();
110
111private:
93df0e9b 112 AliStack *fStack; //! Current pointer to stack
113 TClonesArray *fMCParticles; //! Pointer to list of particles
114 TRefArray *fMCParticleMap; //! Map of MC Particles
115 AliHeader *fHeader; //! Current pointer to header
116 TClonesArray *fTRBuffer; //! Track reference buffer
117 TClonesArray *fTrackReferences; //! Array of track references
118 TTree *fTreeTR; //! Pointer to Track Reference Tree
119 TTree *fTmpTreeTR; //! Temporary tree TR to read old format
120 TFile *fTmpFileTR; //! Temporary file with TreeTR to read old format
121 Int_t fNprimaries; //! Number of primaries
122 Int_t fNparticles; //! Number of particles
415d9f5c 123 ClassDef(AliMCEvent, 0) // AliVEvent realisation for MC data
124};
125
126
127#endif
128