2 #ifndef ALIMCEVENTHANDLER_H
3 #define ALIMCEVENTHANDLER_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 //-------------------------------------------------------------------------
12 // This class gives access to MC truth during the analysis.
13 // Monte Carlo truth is containe in the kinematics tree (produced particles) and
14 // the tree of reference hits.
16 // Origin: Andreas Morsch, CERN, andreas.morsch@cern.ch
17 //-------------------------------------------------------------------------
19 #include "AliVirtualEventHandler.h"
28 class AliMCEventHandler : public AliVirtualEventHandler
32 AliMCEventHandler(const char* name, const char* title);
33 virtual ~AliMCEventHandler();
34 virtual void SetOutputFileName(char* /* fname */) {;}
35 virtual char* GetOutputFileName() {return 0;}
36 virtual void SetInputPath(char* fname) {fPathName = fname;}
37 virtual char* GetInputPath() {return fPathName;}
38 virtual Bool_t InitIO(Option_t* opt);
39 virtual Bool_t BeginEvent();
40 virtual Bool_t Notify();
41 virtual Bool_t FinishEvent();
42 virtual Bool_t Terminate();
43 virtual Bool_t TerminateIO();
44 virtual void ResetIO();
46 AliStack* Stack() {return fStack;}
47 TTree* TreeTR() {return fTreeTR;}
48 Int_t GetParticleAndTR(Int_t i, TParticle*& particle, TClonesArray*& trefs);
49 void DrawCheck(Int_t i);
51 void ReorderAndExpandTreeTR();
54 TFile *fFileE; //! File with TreeE
55 TFile *fFileK; //! File with TreeK
56 TFile *fFileTR; //! File with TreeTR
57 TFile *fTmpFileTR; //! Temporary file with TreeTR to read old format
58 TTree *fTreeE; //! TreeE (Event Headers)
59 TTree *fTreeK; //! TreeK (kinematics tree)
60 TTree *fTreeTR; //! TreeTR (track references tree)
61 TTree *fTmpTreeTR; //! Temporary tree TR to read old format
62 AliStack *fStack; //! Current pointer to stack
63 AliHeader *fHeader; //! Current pointer to header
64 TClonesArray *fTrackReferences; //! Current list of track references
65 Int_t fNEvent; //! Number of events
66 Int_t fEvent; //! Current event
67 Int_t fNprimaries; //! Number of primaries
68 Int_t fNparticles; //! Number of particles
69 char *fPathName; //! Input file path
70 ClassDef(AliMCEventHandler,1) //MC Truth EventHandler class