]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG1/TPC/AliRecInfoMaker.h
bug fix and small changed in the macros
[u/mrichter/AliRoot.git] / PWG1 / TPC / AliRecInfoMaker.h
1 #ifndef ALIRECINFOMAKER_H
2 #define ALIRECINFOMAKER_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 AliRecInfoMaker                           //
10 //   collect together MC info and Rec info for comparison purposes 
11 //                                           - effieciency studies and so on//                                                                 //
12 //   marian.ivanov@cern.ch                                                  //
13 //////////////////////////////////////////////////////////////////////////////
14
15
16 #include "TObject.h"
17 #include "AliESD.h"
18 #include "AliESDEvent.h"
19
20 #include "AliESDtrack.h"
21 #include "AliV0.h"
22 #include "AliESDfriendTrack.h"
23 #include "AliITStrackMI.h"
24 #include "AliTRDtrack.h"
25 class AliTPCseed;
26 class AliTPCParam;
27 class AliMCInfo;
28 class AliGenKinkInfo;
29 class AliGenV0Info;
30 class AliESDRecInfo;
31 class AliESDRecKinkInfo;
32 class AliESDRecV0Info;
33
34
35 ////////////////////////////////////////////////////////////////////////
36 // 
37 // Start of implementation of the class AliRecInfoMaker
38 //
39 ////////////////////////////////////////////////////////////////////////
40
41 class AliRecInfoMaker {
42
43 public:
44   AliRecInfoMaker(const char* fnGenTracks,
45            const char* fnCmpRes      ="cmpTracks.root", 
46            const char* fnGalice      ="galice.root",
47            Int_t nEvents=1, Int_t firstEvent=0);
48   static void MakeAliases(TTree *tree); 
49   virtual ~AliRecInfoMaker();
50   void Reset();
51   Int_t Exec();
52   Int_t Exec(Int_t nEvents, Int_t firstEventNr);
53   Int_t SetIO();
54   Int_t SetIO(Int_t eventNr );
55   void CreateTreeCmp();
56   void CloseOutputFile();
57   Bool_t ConnectGenTree();
58   Int_t TreeGenLoop(Int_t eventNr);
59   Int_t TreeTLoop();
60   Int_t BuildKinkInfo0(Int_t eventNr); // build kink info 0
61   Int_t BuildV0Info(Int_t eventNr); // build kink info 0
62   void SetFirstEventNr(Int_t i) {fFirstEventNr = i;}
63   void SetNEvents(Int_t i) {fNEvents = i;}
64   void SetDebug(Int_t level) {fDebug = level;}
65
66 // tmp method, should go to TrackReferenceESD
67   static TVector3 TR2Local(AliTrackReference *trackRef,
68                     AliTPCParam *paramTPC);
69   static AliTPCParam * GetTPCParam();
70 private:
71   AliRecInfoMaker(const AliRecInfoMaker& /*info*/);
72   AliRecInfoMaker& operator=(const AliRecInfoMaker& /*info*/) {return *this;}
73
74   Int_t fEventNr;                 //! current event number
75   Int_t fNEvents;                 //! number of events to process
76   Int_t fFirstEventNr;            //! first event to process
77   //
78   char  fFnCmp[1000];                   //! output file name with cmp tracks
79   TFile *fFileCmp;                //! output file with cmp tracks
80   TTree *fTreeCmp;                //! output tree with cmp tracks
81   TTree *fTreeCmpKinks;                //! output tree with cmp Kinks
82   TTree *fTreeCmpV0;                //! output tree with cmp V0
83   //
84   char  fFnGenTracks[1000];             //! input file name with gen tracks
85   TFile *fFileGenTracks;                //! input files with generated tracks   
86   TTree *fTreeGenTracks;           //! tree with generated tracks
87   TTree *fTreeGenKinks;            // tree with gen kinks
88   TTree *fTreeGenV0;            // tree with gen V0
89   //
90   //
91   //
92   AliRunLoader * fLoader;         //! pointer to the run loader
93   //TTree *fTreeRecTracks;          //! tree with reconstructed tracks
94   //
95   Short_t *fIndexRecTracks;         //! index of particle label in the TreeT_ESD
96   Short_t *fFakeRecTracks;          //! number of fake tracks
97   Short_t *fMultiRecTracks;         //! number of multiple reconstructions
98   //
99   Short_t *fIndexRecKinks;         //! index of particle label in treeesd
100   Short_t *fMultiRecKinks;         //! number of multiple reconstructions
101   Short_t *fSignedKinks;           //! indicator that kink was not fake
102   //
103   Short_t *fIndexRecV0;         //! index of particle label in treeesd
104   Short_t *fMultiRecV0;         //! number of multiple reconstructions
105   Short_t *fSignedV0;                //! indicator that kink was not fake
106   //
107   TObjArray *fRecArray;           // container with rec infos
108   AliESDEvent *fEvent;             //!event
109   AliESDfriend *fESDfriend;              //!event friend
110   //
111   AliTPCParam* fParamTPC;         //! AliTPCParam
112   Int_t fNParticles;              //! number of particles in the input tree genTracks
113   Int_t fDebug;                   //! debug flag  
114   Int_t fNextTreeGenEntryToRead;    //! last entry already read from genTracks tree
115   Int_t fNextKinkToRead;            //! last entry already read from genKinks tree
116   Int_t fNextV0ToRead;            //! last entry already read from genV0 tree
117   //
118   AliMCInfo*  fMCInfo;           //! MC information writen per particle
119   AliGenKinkInfo* fGenKinkInfo;      //! MC information writen per Kink
120   AliGenV0Info* fGenV0Info;      //! MC information writen per Kink
121   AliESDRecInfo*  fRecInfo;          //! Rec. information writen per particle
122   AliESDfriendTrack*  fFriend;          //! friend track
123   AliESDRecKinkInfo* fRecKinkInfo;    //! reconstructed kink info
124   AliESDRecV0Info* fRecV0Info;    //! reconstructed kink info
125   //
126
127   ClassDef(AliRecInfoMaker,1)    // class which creates and fills tree with ESDGenTrack objects
128 };
129
130
131 #endif