Cleanup.
[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();
5fe09262 40 virtual Bool_t Notify();
033693d3 41 virtual Bool_t FinishEvent();
42 virtual Bool_t Terminate();
43 virtual Bool_t TerminateIO();
5fe09262 44 virtual void ResetIO();
033693d3 45 //
46 AliStack* Stack() {return fStack;}
47 TTree* TreeTR() {return fTreeTR;}
48 Int_t GetParticleAndTR(Int_t i, TParticle*& particle, TClonesArray*& trefs);
36e4cfbb 49 void DrawCheck(Int_t i, Bool_t search=kFALSE);
5fe09262 50private:
51 void ReorderAndExpandTreeTR();
52
033693d3 53private:
54 TFile *fFileE; //! File with TreeE
55 TFile *fFileK; //! File with TreeK
56 TFile *fFileTR; //! File with TreeTR
5fe09262 57 TFile *fTmpFileTR; //! Temporary file with TreeTR to read old format
033693d3 58 TTree *fTreeE; //! TreeE (Event Headers)
59 TTree *fTreeK; //! TreeK (kinematics tree)
60 TTree *fTreeTR; //! TreeTR (track references tree)
5fe09262 61 TTree *fTmpTreeTR; //! Temporary tree TR to read old format
033693d3 62 AliStack *fStack; //! Current pointer to stack
63 AliHeader *fHeader; //! Current pointer to header
5fe09262 64 TClonesArray *fTrackReferences; //! Current list of track references
033693d3 65 Int_t fNEvent; //! Number of events
66 Int_t fEvent; //! Current event
67 Int_t fNprimaries; //! Number of primaries
5fe09262 68 Int_t fNparticles; //! Number of particles
69 char *fPathName; //! Input file path
70 ClassDef(AliMCEventHandler,1) //MC Truth EventHandler class
033693d3 71};
72#endif
73