Add new abstract base classes (Markus)
[u/mrichter/AliRoot.git] / STEER / AliMCEventHandler.h
CommitLineData
033693d3 1// -*- mode: C++ -*-
5fe09262 2#ifndef ALIMCEVENTHANDLER_H
3#define ALIMCEVENTHANDLER_H
033693d3 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// 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.
15//
16// Origin: Andreas Morsch, CERN, andreas.morsch@cern.ch
17//-------------------------------------------------------------------------
18
19#include "AliVirtualEventHandler.h"
20class TFile;
21class TTree;
22class TParticle;
23class TClonesArray;
24class AliHeader;
25class AliStack;
26
27
5fe09262 28class AliMCEventHandler : public AliVirtualEventHandler
033693d3 29{
30public:
5fe09262 31 AliMCEventHandler();
32 AliMCEventHandler(const char* name, const char* title);
33 virtual ~AliMCEventHandler();
033693d3 34 virtual void SetOutputFileName(char* /* fname */) {;}
35 virtual char* GetOutputFileName() {return 0;}
5fe09262 36 virtual void SetInputPath(char* fname) {fPathName = fname;}
37 virtual char* GetInputPath() {return fPathName;}
033693d3 38 virtual Bool_t InitIO(Option_t* opt);
39 virtual Bool_t BeginEvent();
890126ab 40 virtual Bool_t Notify(const char* path);
033693d3 41 virtual Bool_t FinishEvent();
42 virtual Bool_t Terminate();
43 virtual Bool_t TerminateIO();
5fe09262 44 virtual void ResetIO();
9aea8469 45 virtual Bool_t GetEvent(Int_t iev);
46
033693d3 47 //
48 AliStack* Stack() {return fStack;}
49 TTree* TreeTR() {return fTreeTR;}
50 Int_t GetParticleAndTR(Int_t i, TParticle*& particle, TClonesArray*& trefs);
36e4cfbb 51 void DrawCheck(Int_t i, Bool_t search=kFALSE);
5fe09262 52private:
9aea8469 53 Bool_t OpenFile(Int_t i);
5fe09262 54 void ReorderAndExpandTreeTR();
55
033693d3 56private:
57 TFile *fFileE; //! File with TreeE
58 TFile *fFileK; //! File with TreeK
59 TFile *fFileTR; //! File with TreeTR
5fe09262 60 TFile *fTmpFileTR; //! Temporary file with TreeTR to read old format
033693d3 61 TTree *fTreeE; //! TreeE (Event Headers)
62 TTree *fTreeK; //! TreeK (kinematics tree)
63 TTree *fTreeTR; //! TreeTR (track references tree)
5fe09262 64 TTree *fTmpTreeTR; //! Temporary tree TR to read old format
033693d3 65 AliStack *fStack; //! Current pointer to stack
66 AliHeader *fHeader; //! Current pointer to header
5fe09262 67 TClonesArray *fTrackReferences; //! Current list of track references
033693d3 68 Int_t fNEvent; //! Number of events
69 Int_t fEvent; //! Current event
70 Int_t fNprimaries; //! Number of primaries
5fe09262 71 Int_t fNparticles; //! Number of particles
72 char *fPathName; //! Input file path
9aea8469 73 char *fExtension; //! File name extension
74 Int_t fFileNumber; //! Input file number
75 Int_t fEventsPerFile; //! Number of events per file
5fe09262 76 ClassDef(AliMCEventHandler,1) //MC Truth EventHandler class
033693d3 77};
78#endif
79