1 #ifndef ALIGENINFOMAKER_H
2 #define ALIGENINFOMAKER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 //////////////////////////////////////////////////////////////////////////////
10 // collect together MC info for comparison purposes - effieciency studies and so on// //
11 // marian.ivanov@cern.ch //
12 //////////////////////////////////////////////////////////////////////////////
16 ////////////////////////////////////////////////////////////////////////
18 // Start of implementation of the class AliTPCdigitRow
20 ////////////////////////////////////////////////////////////////////////
22 #include <TParticle.h>
23 #include "AliTrackReference.h"
31 ////////////////////////////////////////////////////////////////////////
33 // Start of implementation of the class AliGenInfoMaker
35 ////////////////////////////////////////////////////////////////////////
37 class AliGenInfoMaker {
41 AliGenInfoMaker(const char * fnGalice, const char* fnRes ="genTracks.root",
42 Int_t nEvents=1, Int_t firstEvent=0);
43 virtual ~AliGenInfoMaker();
45 Int_t Exec(Int_t nEvents, Int_t firstEventNr);
46 void CreateTreeGenTracks();
47 void CloseOutputFile();
50 Int_t TreeTRLoopNew();
52 Int_t BuildKinkInfo(); // build information about MC kinks
53 Int_t BuildV0Info(); // build information about MC kinks
54 Int_t BuildHitLines(); // build information about MC kinks
55 void SetFirstEventNr(Int_t i) {fFirstEventNr = i;}
56 void SetNEvents(Int_t i) {fNEvents = i;}
57 void SetDebug(Int_t level) {fDebug = level;}
58 Int_t SetIO(Int_t eventNr);
62 Float_t TR2LocalX(AliTrackReference *trackRef,
63 AliTPCParam *paramTPC) const;
64 AliMCInfo * GetInfo(UInt_t i) const {return (i<fNParticles)? fGenInfo[i]:0;}
65 AliMCInfo * MakeInfo(UInt_t i);
68 AliTPCParam * GetTPCParam();
69 Float_t TPCBetheBloch(Float_t bg);
70 Int_t fDebug; //! debug flag
71 Int_t fEventNr; //! current event number
72 Int_t fLabel; //! track label
73 Int_t fNEvents; //! number of events to process
74 Int_t fFirstEventNr; //! first event to process
75 UInt_t fNParticles; //! number of particles in TreeK
76 TTree *fTreeGenTracks; //! output tree with generated tracks
77 TTree *fTreeKinks; //! output tree with Kinks
78 TTree *fTreeV0; //! output tree with V0
79 TTree *fTreeHitLines; //! tree with hit lines
80 char fFnRes[1000]; //! output file name with stored tracks
81 TFile *fFileGenTracks; //! output file with stored fTreeGenTracks
83 AliRunLoader * fLoader; //! pointer to the run loader
84 TTree * fTreeD; //! current tree with digits
85 TTree * fTreeTR; //! current tree with TR
86 AliStack *fStack; //! current stack
88 AliMCInfo ** fGenInfo; //! array with pointers to gen info
89 Int_t fNInfos; //! number of tracks with infos
91 AliTPCParam* fParamTPC; //! AliTPCParam
92 Float_t fVPrim[3]; //! primary vertex position
93 // the fVDist[3] contains size of the 3-vector
96 Double_t fTPCPtCut; // do not store particles with generated pT less than this
97 Double_t fITSPtCut; // do not store particles with generated pT less than this
98 Double_t fTRDPtCut; // do not store particles with generated pT less than this
99 Double_t fTOFPtCut; // do not store particles with generated pT less than this
101 ClassDef(AliGenInfoMaker,0) // class which creates and fills tree with TPCGenTrack objects