]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG1/AliGenInfoMaker.h
New branches with run number and OCDB file ITS/Align/Data in spTree
[u/mrichter/AliRoot.git] / PWG1 / AliGenInfoMaker.h
CommitLineData
d92975ba 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//////////////////////////////////////////////////////////////////////////////
d390cc7e 9// Class AliGenInfoMaker //
d92975ba 10// collect together MC info for comparison purposes - effieciency studies and so on// //
11// marian.ivanov@cern.ch //
12//////////////////////////////////////////////////////////////////////////////
13
14
15
d92975ba 16
17#include <TParticle.h>
d390cc7e 18#include "AliAnalysisTask.h"
d92975ba 19#include "AliTrackReference.h"
20
21class TFile;
22class AliRunLoader;
23class AliStack;
24class AliTPCParam;
d390cc7e 25class AliMCEventHandler;
26class AliMCInfo;
d92975ba 27
28////////////////////////////////////////////////////////////////////////
29//
30// Start of implementation of the class AliGenInfoMaker
31//
32////////////////////////////////////////////////////////////////////////
33
d390cc7e 34class AliGenInfoMaker : public TObject {
d92975ba 35
36public:
37 AliGenInfoMaker();
d92975ba 38 virtual ~AliGenInfoMaker();
d390cc7e 39 //
40 //
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);
45
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
52 //
53 //
54 Int_t Exec();
d92975ba 55 void CreateTreeGenTracks();
56 void CloseOutputFile();
d92975ba 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);
61 Int_t CloseIOEvent();
62 Int_t CloseIO();
63 Int_t SetIO();
d390cc7e 64
65protected:
cd875161 66 AliGenInfoMaker(const AliGenInfoMaker& /*info*/);
67 AliGenInfoMaker& operator=(const AliGenInfoMaker& /*info*/) { return *this;}
68
d390cc7e 69 AliMCInfo * MakeInfo(UInt_t i);
70 AliMCInfo * GetInfo(UInt_t i) const {return (i<fNParticles)? fGenInfo[i]:0;}
d92975ba 71 Float_t TR2LocalX(AliTrackReference *trackRef,
72 AliTPCParam *paramTPC) const;
d92975ba 73 AliTPCParam * GetTPCParam();
d390cc7e 74 //
75 TObjArray *fGenTracksArray; //clones array with filtered particles
76 TObjArray *fGenKinkArray; //clones array with filtered Kinks
77 TObjArray *fGenV0Array; //clones array with filtered V0s
78 //
d92975ba 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
d92975ba 88 char fFnRes[1000]; //! output file name with stored tracks
89 TFile *fFileGenTracks; //! output file with stored fTreeGenTracks
90 //
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
95 //
96 AliMCInfo ** fGenInfo; //! array with pointers to gen info
97 Int_t fNInfos; //! number of tracks with infos
98 //
99 AliTPCParam* fParamTPC; //! AliTPCParam
d390cc7e 100 Float_t fVPrim[3]; //! primary vertex position // the fVDist[3] contains size of the 3-vector
d92975ba 101 // cuts
102 //
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
107
108 ClassDef(AliGenInfoMaker,0) // class which creates and fills tree with TPCGenTrack objects
109};
110
111
112
113
114
115
116#endif