]>
Commit | Line | Data |
---|---|---|
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" | |
20 | class TFile; | |
21 | class TTree; | |
22 | class TParticle; | |
23 | class TClonesArray; | |
24 | class AliHeader; | |
25 | class AliStack; | |
26 | ||
27 | ||
5fe09262 | 28 | class AliMCEventHandler : public AliVirtualEventHandler |
033693d3 | 29 | { |
30 | public: | |
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 | 50 | private: |
51 | void ReorderAndExpandTreeTR(); | |
52 | ||
033693d3 | 53 | private: |
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 |