]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG1/AliGenInfoMaker.h
Due to developments in the Off-line code there is an impact on the HLT DA algorithms...
[u/mrichter/AliRoot.git] / PWG1 / AliGenInfoMaker.h
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                               */
5
6
7
8 //////////////////////////////////////////////////////////////////////////////
9 //                          Class AliGenInfo                               //
10 //   collect together MC info for comparison purposes - effieciency studies and so on//                                                                 //
11 //   marian.ivanov@cern.ch                                                  //
12 //////////////////////////////////////////////////////////////////////////////
13
14
15
16 ////////////////////////////////////////////////////////////////////////
17 //
18 // Start of implementation of the class AliTPCdigitRow
19 //
20 ////////////////////////////////////////////////////////////////////////
21
22 #include <TParticle.h>
23 #include "AliTrackReference.h"
24
25 class TFile;
26 class AliRunLoader;
27 class AliStack;
28 class AliTPCParam;
29
30
31 ////////////////////////////////////////////////////////////////////////
32 // 
33 // Start of implementation of the class AliGenInfoMaker
34 //
35 ////////////////////////////////////////////////////////////////////////
36
37 class AliGenInfoMaker {
38
39 public:
40   AliGenInfoMaker();
41   AliGenInfoMaker(const char * fnGalice, const char* fnRes    ="genTracks.root",
42                    Int_t nEvents=1, Int_t firstEvent=0);
43   virtual ~AliGenInfoMaker();
44   Int_t Exec();
45   Int_t Exec(Int_t nEvents, Int_t firstEventNr);
46   void CreateTreeGenTracks();
47   void CloseOutputFile();
48   Int_t TreeKLoop();
49   Int_t TreeTRLoop();
50   Int_t TreeDLoop();
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);
58   Int_t CloseIOEvent();
59   Int_t CloseIO();
60   Int_t SetIO();
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);
65
66 private:
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
81   //
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
86   // 
87   AliMCInfo **   fGenInfo;    //! array with pointers to gen info
88   Int_t   fNInfos;                  //! number of tracks with infos
89   //
90   AliTPCParam* fParamTPC;         //! AliTPCParam
91   Float_t  fVPrim[3];             //! primary vertex position
92                                   // the fVDist[3] contains size of the 3-vector
93   // cuts
94   //
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
99  
100   ClassDef(AliGenInfoMaker,0)    // class which creates and fills tree with TPCGenTrack objects
101 };
102
103
104
105
106
107
108 #endif