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();
75 TObjArray *fGenTracksArray; //clones array with filtered particles
76 TObjArray *fGenKinkArray; //clones array with filtered Kinks
77 TObjArray *fGenV0Array; //clones array with filtered V0s
79 Int_t fDebug; //! debug flag
80 Int_t fEventNr; //! current event number
81 Int_t fLabel; //! track label
82 Int_t fNEvents; //! number of events to process
83 Int_t fFirstEventNr; //! first event to process
84 UInt_t fNParticles; //! number of particles in TreeK
85 TTree *fTreeGenTracks; //! output tree with generated tracks
86 TTree *fTreeKinks; //! output tree with Kinks
87 TTree *fTreeV0; //! output tree with V0
88 char fFnRes[1000]; //! output file name with stored tracks
89 TFile *fFileGenTracks; //! output file with stored fTreeGenTracks
91 AliRunLoader * fLoader; //! pointer to the run loader
92 TTree * fTreeD; //! current tree with digits
93 TTree * fTreeTR; //! current tree with TR
94 AliStack *fStack; //! current stack
96 AliMCInfo ** fGenInfo; //! array with pointers to gen info
97 Int_t fNInfos; //! number of tracks with infos
99 AliTPCParam* fParamTPC; //! AliTPCParam
100 Float_t fVPrim[3]; //! primary vertex position // the fVDist[3] contains size of the 3-vector
103 Double_t fTPCPtCut; // do not store particles with generated pT less than this
104 Double_t fITSPtCut; // do not store particles with generated pT less than this
105 Double_t fTRDPtCut; // do not store particles with generated pT less than this
106 Double_t fTOFPtCut; // do not store particles with generated pT less than this
108 ClassDef(AliGenInfoMaker,0) // class which creates and fills tree with TPCGenTrack objects