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();
51 Int_t BuildKinkInfo(); // build information about MC kinks
52 Int_t BuildV0Info(); // build information about MC kinks
53 Int_t BuildHitLines(); // build information about MC kinks
54 void SetFirstEventNr(Int_t i) {fFirstEventNr = i;}
55 void SetNEvents(Int_t i) {fNEvents = i;}
56 void SetDebug(Int_t level) {fDebug = level;}
57 Int_t SetIO(Int_t eventNr);
61 Float_t TR2LocalX(AliTrackReference *trackRef,
62 AliTPCParam *paramTPC) const;
63 AliMCInfo * GetInfo(UInt_t i) const {return (i<fNParticles)? fGenInfo[i]:0;}
64 AliMCInfo * MakeInfo(UInt_t i);
67 AliTPCParam * GetTPCParam();
68 Float_t TPCBetheBloch(Float_t bg);
69 Int_t fDebug; //! debug flag
70 Int_t fEventNr; //! current event number
71 Int_t fLabel; //! track label
72 Int_t fNEvents; //! number of events to process
73 Int_t fFirstEventNr; //! first event to process
74 UInt_t fNParticles; //! number of particles in TreeK
75 TTree *fTreeGenTracks; //! output tree with generated tracks
76 TTree *fTreeKinks; //! output tree with Kinks
77 TTree *fTreeV0; //! output tree with V0
78 TTree *fTreeHitLines; //! tree with hit lines
79 char fFnRes[1000]; //! output file name with stored tracks
80 TFile *fFileGenTracks; //! output file with stored fTreeGenTracks
82 AliRunLoader * fLoader; //! pointer to the run loader
83 TTree * fTreeD; //! current tree with digits
84 TTree * fTreeTR; //! current tree with TR
85 AliStack *fStack; //! current stack
87 AliMCInfo ** fGenInfo; //! array with pointers to gen info
88 Int_t fNInfos; //! number of tracks with infos
90 AliTPCParam* fParamTPC; //! AliTPCParam
91 Float_t fVPrim[3]; //! primary vertex position
92 // the fVDist[3] contains size of the 3-vector
95 Double_t fTPCPtCut; // do not store particles with generated pT less than this
96 Double_t fITSPtCut; // do not store particles with generated pT less than this
97 Double_t fTRDPtCut; // do not store particles with generated pT less than this
98 Double_t fTOFPtCut; // do not store particles with generated pT less than this
100 ClassDef(AliGenInfoMaker,0) // class which creates and fills tree with TPCGenTrack objects