]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliMCEvent.h
correct for omission
[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>
7aad0c47 19#include <TClonesArray.h>
415d9f5c 20
21#include <AliVEvent.h>
22#include "AliVHeader.h"
7aad0c47 23#include "AliVParticle.h"
5df3496b 24#include "AliVVertex.h"
415d9f5c 25#include "AliMCParticle.h"
26
befa9db4 27class AliCentrality;
415d9f5c 28class AliStack;
29class AliHeader;
30class AliGenEventHeader;
31
32class TClonesArray;
93836e1b 33class TList;
415d9f5c 34
35class AliMCEvent : public AliVEvent {
36
37public:
38
39 AliMCEvent();
40 virtual ~AliMCEvent() {;}
41 AliMCEvent(const AliMCEvent& mcEvnt);
42 AliMCEvent& operator=(const AliMCEvent& mcEvnt);
43 //
44 // Methods implementing the interface
45 //
46 // Services
47 virtual void AddObject(TObject* /*obj*/) {;}
2811495d 48 virtual TObject* FindListObject(const char */*name*/) const {return 0;}
415d9f5c 49 virtual TList* GetList() const {return 0;}
50 virtual void CreateStdContent() {;}
51 virtual void GetStdContent() {;}
1d0dd492 52 virtual void ReadFromTree(TTree * /*tree*/, Option_t* /*opt*/) {;}
ec8aded8 53 virtual void WriteToTree(TTree* /*tree*/) const {;}
415d9f5c 54
55 virtual void SetStdNames() {;}
56 virtual void Print(Option_t */*option=""*/) const {;}
35152e4b 57 virtual void PreReadAll();
ec8aded8 58 virtual void Reset() {;}
415d9f5c 59
60 // Header
61 virtual AliVHeader* GetHeader() const {return 0;}
62
63 // Delegated methods for fESDRun or AODHeader
64
65 virtual void SetRunNumber(Int_t /*n*/) {;}
66 virtual void SetPeriodNumber(UInt_t /*n*/) {;}
67 virtual void SetMagneticField(Double_t /*mf*/) {;}
68
69
70 virtual Int_t GetRunNumber() const {return 0;}
7aad0c47 71 virtual UInt_t GetPeriodNumber() const {return 0;}
415d9f5c 72 virtual Double_t GetMagneticField() const {return 0.;}
73
74 // Setters not needed
75 virtual void SetOrbitNumber(UInt_t /*n*/) {;}
76 virtual void SetBunchCrossNumber(UShort_t /*n*/) {;}
77 virtual void SetEventType(UInt_t /*eventType*/) {;}
78 virtual void SetTriggerMask(ULong64_t /*n*/) {;}
79 virtual void SetTriggerCluster(UChar_t /*n*/) {;}
80
7aad0c47 81 virtual UInt_t GetOrbitNumber() const {return 0;}
82 virtual UShort_t GetBunchCrossNumber() const {return 0;}
415d9f5c 83
7aad0c47 84 virtual UInt_t GetEventType() const {return 0;}
415d9f5c 85
a85132e7 86 virtual ULong64_t GetTriggerMask() const {return 0;}
87 virtual UChar_t GetTriggerCluster() const {return 0;}
88 virtual Double_t GetZDCN1Energy() const {return 0.;}
89 virtual Double_t GetZDCP1Energy() const {return 0.;}
90 virtual Double_t GetZDCN2Energy() const {return 0.;}
91 virtual Double_t GetZDCP2Energy() const {return 0.;}
eee13e8d 92 virtual Double_t GetZDCEMEnergy(Int_t /*i*/)
93 const {return 0.;}
415d9f5c 94 // Tracks
7aad0c47 95 virtual AliVParticle *GetTrack(Int_t i) const;
415d9f5c 96 virtual Int_t GetNumberOfTracks() const {return fNparticles;}
c1b93f02 97 virtual Int_t GetNumberOfV0s() const {return -1;}
bc0379e5 98 virtual Int_t GetNumberOfCascades() const {return -1;}
5df3496b 99 // Vertex
100 virtual const AliVVertex *GetPrimaryVertex() const;
101
415d9f5c 102 //
103 // MC Specific methods
104 //
105 // Getters
106 AliStack* Stack() {return fStack;}
107 AliHeader* Header() {return fHeader;}
5df3496b 108 AliGenEventHeader* GenEventHeader() const;
415d9f5c 109 // Services
110 virtual void ConnectTreeE (TTree* tree);
111 virtual void ConnectTreeK (TTree* tree);
112 virtual void ConnectTreeTR(TTree* tree);
113 virtual void Clean();
93836e1b 114 virtual void InitEvent();
415d9f5c 115 virtual void FinishEvent();
116 virtual Int_t GetParticleAndTR(Int_t i, TParticle*& particle, TClonesArray*& trefs);
117 virtual void DrawCheck(Int_t i, Int_t search);
93836e1b 118 virtual void AddSubsidiaryEvent(AliMCEvent* event);
119 virtual Int_t GetNumberOfPrimaries() {return fNprimaries;}
120 virtual Int_t GetPrimaryOffset() const {return fPrimaryOffset;}
121 virtual Int_t GetSecondaryOffset() const {return fSecondaryOffset;}
122 virtual void SetPrimaryOffset(Int_t ioff) {fPrimaryOffset = ioff;}
123 virtual void SetSecondaryOffset(Int_t ioff) {fSecondaryOffset = ioff;}
124 virtual Bool_t IsPhysicalPrimary(Int_t i);
125 virtual Int_t BgLabelToIndex(Int_t label);
126 static Int_t BgLabelOffset() {return fgkBgLabelOffset;}
7aad0c47 127 // External particle array
128 virtual void SetParticleArray(TClonesArray* mcParticles)
129 {fMCParticles = mcParticles; fNparticles = fMCParticles->GetEntries(); fExternal = kTRUE;}
130
c8fe2783 131 //Following needed only for mixed event
132 virtual Int_t EventIndex(Int_t) const {return 0;}
133 virtual Int_t EventIndexForCaloCluster(Int_t) const {return 0;}
134 virtual Int_t EventIndexForPHOSCell(Int_t) const {return 0;}
135 virtual Int_t EventIndexForEMCALCell(Int_t) const {return 0;}
befa9db4 136 AliCentrality* GetCentrality() {return 0;}
ae2bccf1 137
138 virtual AliVVZERO *GetVZEROData() const {return 0;}
415d9f5c 139private:
140 virtual void ReorderAndExpandTreeTR();
93836e1b 141 virtual Int_t FindIndexAndEvent(Int_t oldidx, AliMCEvent*& event) const;
befa9db4 142
93836e1b 143private:
7aad0c47 144 // Stanndard implementation for ESD production
93836e1b 145 AliStack *fStack; // Current pointer to stack
146 TClonesArray *fMCParticles; // Pointer to list of particles
091fa189 147 TObjArray *fMCParticleMap; // Map of MC Particles
93836e1b 148 AliHeader *fHeader; // Current pointer to header
149 TClonesArray *fTRBuffer; // Track reference buffer
150 TClonesArray *fTrackReferences; // Array of track references
151 TTree *fTreeTR; // Pointer to Track Reference Tree
152 TTree *fTmpTreeTR; // Temporary tree TR to read old format
153 TFile *fTmpFileTR; // Temporary file with TreeTR to read old format
154 Int_t fNprimaries; // Number of primaries
155 Int_t fNparticles; // Number of particles
156 TList *fSubsidiaryEvents; // List of possible subsidiary events (for example merged underlying event)
157 Int_t fPrimaryOffset; // Offset for primaries
158 Int_t fSecondaryOffset; // Offset for secondaries
7aad0c47 159 Bool_t fExternal; // True if external particle array
5df3496b 160 static Int_t fgkBgLabelOffset; // Standard branch name
161 mutable AliVVertex* fVertex; // MC Vertex
e337635e 162 ClassDef(AliMCEvent, 1) // AliVEvent realisation for MC data
415d9f5c 163};
164
165
166#endif
167