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 //////////////////////////////////////////////////////////////////////////////
9 // Class AliGenInfoMaker //
10 // collect together MC info for comparison purposes - effieciency studies and so on// //
11 // marian.ivanov@cern.ch //
12 //////////////////////////////////////////////////////////////////////////////
17 #include <TParticle.h>
18 #include "AliAnalysisTask.h"
19 #include "AliTrackReference.h"
25 class AliMCEventHandler;
28 ////////////////////////////////////////////////////////////////////////
30 // Start of implementation of the class AliGenInfoMaker
32 ////////////////////////////////////////////////////////////////////////
34 class AliGenInfoMaker : public TObject {
38 virtual ~AliGenInfoMaker();
41 AliGenInfoMaker(const char * fnGalice, const char* fnRes,
42 Int_t nEvents=1, Int_t firstEvent=0);
43 //event by event function - used in the analysis task
44 Int_t ProcessEvent(AliMCEventHandler* mcinfo);
46 Int_t ProcessEvent(); // process event
47 Int_t TreeKLoop(); // process kinamatics
48 Int_t TreeTRLoop(); // process track refereces
49 Int_t TreeDLoop(); // process digits tree
50 Int_t BuildKinkInfo(); // build information about MC kinks
51 Int_t BuildV0Info(); // build information about MC kinks
55 void CreateTreeGenTracks();
56 void CloseOutputFile();
57 void SetFirstEventNr(Int_t i) {fFirstEventNr = i;}
58 void SetNEvents(Int_t i) {fNEvents = i;}
59 void SetDebug(Int_t level) {fDebug = level;}
60 Int_t SetIO(Int_t eventNr);
66 AliGenInfoMaker(const AliGenInfoMaker& /*info*/);
67 AliGenInfoMaker& operator=(const AliGenInfoMaker& /*info*/) { return *this;}
69 AliMCInfo * MakeInfo(UInt_t i);
70 AliMCInfo * GetInfo(UInt_t i) const {return (i<fNParticles)? fGenInfo[i]:0;}
71 Float_t TR2LocalX(AliTrackReference *trackRef,
72 AliTPCParam *paramTPC) const;
73 AliTPCParam * GetTPCParam();
74 Float_t TPCBetheBloch(Float_t bg);
76 TObjArray *fGenTracksArray; //clones array with filtered particles
77 TObjArray *fGenKinkArray; //clones array with filtered Kinks
78 TObjArray *fGenV0Array; //clones array with filtered V0s
80 Int_t fDebug; //! debug flag
81 Int_t fEventNr; //! current event number
82 Int_t fLabel; //! track label
83 Int_t fNEvents; //! number of events to process
84 Int_t fFirstEventNr; //! first event to process
85 UInt_t fNParticles; //! number of particles in TreeK
86 TTree *fTreeGenTracks; //! output tree with generated tracks
87 TTree *fTreeKinks; //! output tree with Kinks
88 TTree *fTreeV0; //! output tree with V0
89 char fFnRes[1000]; //! output file name with stored tracks
90 TFile *fFileGenTracks; //! output file with stored fTreeGenTracks
92 AliRunLoader * fLoader; //! pointer to the run loader
93 TTree * fTreeD; //! current tree with digits
94 TTree * fTreeTR; //! current tree with TR
95 AliStack *fStack; //! current stack
97 AliMCInfo ** fGenInfo; //! array with pointers to gen info
98 Int_t fNInfos; //! number of tracks with infos
100 AliTPCParam* fParamTPC; //! AliTPCParam
101 Float_t fVPrim[3]; //! primary vertex position // the fVDist[3] contains size of the 3-vector
104 Double_t fTPCPtCut; // do not store particles with generated pT less than this
105 Double_t fITSPtCut; // do not store particles with generated pT less than this
106 Double_t fTRDPtCut; // do not store particles with generated pT less than this
107 Double_t fTOFPtCut; // do not store particles with generated pT less than this
109 ClassDef(AliGenInfoMaker,0) // class which creates and fills tree with TPCGenTrack objects