some coding convention fixies (Marian)
[u/mrichter/AliRoot.git] / PWG1 / AliGenInfo.h
CommitLineData
c92725b7 1#ifndef ALIGENINFO_H
2#define ALIGENINFO_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
25class TFile;
26class AliRunLoader;
27class AliStack;
28class AliTPCParam;
29
30const Int_t kgRowBytes = 32;
31
32class AliTPCdigitRow: public TObject {
33public:
34 AliTPCdigitRow();
35 virtual ~AliTPCdigitRow(){;}
36 void SetRow(Int_t row);
022044bf 37 Bool_t TestRow(Int_t row) const ;
c92725b7 38 AliTPCdigitRow & operator=(const AliTPCdigitRow &digOld);
022044bf 39 Int_t RowsOn(Int_t upto=8*kgRowBytes) const;
40 Int_t Last() const;
41 Int_t First() const ;
c92725b7 42 void Reset();
43
44//private:
45 UChar_t fDig[kgRowBytes];
46 ClassDef(AliTPCdigitRow,1) // container for digit pattern
47};
48
49
50////////////////////////////////////////////////////////////////////////
51//
52// Start of implementation of the class AliMCInfo
53//
54////////////////////////////////////////////////////////////////////////
55
56class AliMCInfo: public TObject {
57
58public:
59 AliMCInfo();
022044bf 60 ~AliMCInfo();
61 AliMCInfo(const AliMCInfo& info);
c92725b7 62 void Update();
022044bf 63
64
c92725b7 65 AliTrackReference fTrackRef; // track reference saved in the output tree
66 AliTrackReference fTrackRefOut; // decay track reference saved in the output tree
67 AliTrackReference fTRdecay; // track reference at decay point
68 //
69 Int_t fPrimPart; // index of primary particle in TreeH
70 TParticle fParticle; // generated particle
71 Float_t fMass; // mass of the particle
72 Float_t fCharge; //
73 Int_t fLabel; // track label
74 Int_t fEventNr; // event number
75 Int_t fMCtracks; // indication of how many times the track is retuturned back
76 Int_t fPdg; //pdg code
77 Float_t fDecayCoord[3]; // position of particle decay
78 Double_t fVDist[4]; //distance of the particle vertex from primary vertex
79 Bool_t fTPCdecay; //indicates decay in TPC
80 Int_t fRowsWithDigitsInn; // number of rows with digits in the inner sectors
81 Int_t fRowsWithDigits; // number of rows with digits in the outer sectors
82 Int_t fRowsTrackLength; // last - first row with digit
83 Float_t fPrim; // theoretical dedx in tpc according particle momenta and mass
84 AliTPCdigitRow fTPCRow; // information about digits row pattern
85 Int_t fNTPCRef; // tpc references counter
86 Int_t fNITSRef; // ITS references counter
87 Int_t fNTRDRef; // TRD references counter
88 Int_t fNTOFRef; // TOF references counter
89 TClonesArray * fTPCReferences; //containner with all track references -in the TPC
90 TClonesArray * fITSReferences; //container with ITS references
91 TClonesArray * fTRDReferences; //container with TRD references
92 TClonesArray * fTOFReferences; //container with TRD references
93 //
94 ClassDef(AliMCInfo,1) // container for
95};
96
97
98
99class AliGenV0Info: public TObject {
100public:
022044bf 101 AliGenV0Info(); //
102 AliMCInfo fMCd; //info about daughter particle - second particle for V0
103 AliMCInfo fMCm; //info about mother particle - first particle for V0
c92725b7 104 TParticle fMotherP; //particle info about mother particle
105 void Update(Float_t vertex[3]); // put some derived info to special field
106 Double_t fMCDist1; //info about closest distance according closest MC - linear DCA
107 Double_t fMCDist2; //info about closest distance parabolic DCA
108 //
109 Double_t fMCPdr[3]; //momentum at vertex daughter - according approx at DCA
110 Double_t fMCPd[4]; //exact momentum from MC info
111 Double_t fMCX[3]; //exact position of the vertex
112 Double_t fMCXr[3]; //rec. position according helix
113 //
114 Double_t fMCPm[3]; //momentum at the vertex mother
115 Double_t fMCAngle[3]; //three angels
116 Double_t fMCRr; // rec position of the vertex
117 Double_t fMCR; //exact r position of the vertex
118 Int_t fPdg[2]; //pdg code of mother and daugter particles
119 Int_t fLab[2]; //MC label of the partecle
120 //
121 Double_t fInvMass; //reconstructed invariant mass -
122 Float_t fPointAngleFi; //point angle fi
123 Float_t fPointAngleTh; //point angle theta
124 Float_t fPointAngle; //point angle full
125 //
126 ClassDef(AliGenV0Info,1) // container for
127};
128
129
130
131class AliGenKinkInfo: public TObject {
132public:
022044bf 133 AliGenKinkInfo(); //default cosntructor
134 void Update(); // put some derived info to special field
c92725b7 135 Float_t GetQt(); //
022044bf 136
137 AliMCInfo fMCd; //info about daughter particle - second particle for V0
138 AliMCInfo fMCm; //info about mother particle - first particle for V0
c92725b7 139 Double_t fMCDist1; //info about closest distance according closest MC - linear DCA
140 Double_t fMCDist2; //info about closest distance parabolic DCA
141 //
142 Double_t fMCPdr[3]; //momentum at vertex daughter - according approx at DCA
143 Double_t fMCPd[4]; //exact momentum from MC info
144 Double_t fMCX[3]; //exact position of the vertex
145 Double_t fMCXr[3]; //rec. position according helix
146 //
147 Double_t fMCPm[3]; //momentum at the vertex mother
148 Double_t fMCAngle[3]; //three angels
149 Double_t fMCRr; // rec position of the vertex
150 Double_t fMCR; //exact r position of the vertex
151 Int_t fPdg[2]; //pdg code of mother and daugter particles
152 Int_t fLab[2]; //MC label of the partecle
153 ClassDef(AliGenKinkInfo,1) // container for
154};
155
156
157
158////////////////////////////////////////////////////////////////////////
159//
160// Start of implementation of the class AliGenInfoMaker
161//
162////////////////////////////////////////////////////////////////////////
163
164class AliGenInfoMaker {
165
166public:
167 AliGenInfoMaker();
168 AliGenInfoMaker(const char * fnGalice, const char* fnRes ="genTracks.root",
169 Int_t nEvents=1, Int_t firstEvent=0);
170 virtual ~AliGenInfoMaker();
c92725b7 171 Int_t Exec();
172 Int_t Exec(Int_t nEvents, Int_t firstEventNr);
173 void CreateTreeGenTracks();
174 void CloseOutputFile();
175 Int_t TreeKLoop();
176 Int_t TreeTRLoop();
177 Int_t TreeDLoop();
178 Int_t BuildKinkInfo(); // build information about MC kinks
179 Int_t BuildV0Info(); // build information about MC kinks
180 Int_t BuildHitLines(); // build information about MC kinks
c92725b7 181 void SetFirstEventNr(Int_t i) {fFirstEventNr = i;}
182 void SetNEvents(Int_t i) {fNEvents = i;}
183 void SetDebug(Int_t level) {fDebug = level;}
184 Int_t SetIO(Int_t eventNr);
185 Int_t CloseIOEvent();
186 Int_t CloseIO();
187 Int_t SetIO();
188 Float_t TR2LocalX(AliTrackReference *trackRef,
022044bf 189 AliTPCParam *paramTPC) const;
190 AliMCInfo * GetInfo(UInt_t i) const {return (i<fNParticles)? fGenInfo[i]:0;}
c92725b7 191 AliMCInfo * MakeInfo(UInt_t i);
192
022044bf 193private:
194 Int_t fDebug; //! debug flag
195 Int_t fEventNr; //! current event number
196 Int_t fLabel; //! track label
197 Int_t fNEvents; //! number of events to process
198 Int_t fFirstEventNr; //! first event to process
c92725b7 199 UInt_t fNParticles; //! number of particles in TreeK
022044bf 200 TTree *fTreeGenTracks; //! output tree with generated tracks
201 TTree *fTreeKinks; //! output tree with Kinks
202 TTree *fTreeV0; //! output tree with V0
203 TTree *fTreeHitLines; //! tree with hit lines
204 char fFnRes[1000]; //! output file name with stored tracks
c92725b7 205 TFile *fFileGenTracks; //! output file with stored fTreeGenTracks
206 //
207 AliRunLoader * fLoader; //! pointer to the run loader
208 TTree * fTreeD; //! current tree with digits
209 TTree * fTreeTR; //! current tree with TR
210 AliStack *fStack; //! current stack
211 //
212 AliMCInfo ** fGenInfo; //! array with pointers to gen info
022044bf 213 Int_t fNInfos; //! number of tracks with infos
c92725b7 214 //
215 AliTPCParam* fParamTPC; //! AliTPCParam
022044bf 216 Float_t fVPrim[3]; //! primary vertex position
c92725b7 217 // the fVDist[3] contains size of the 3-vector
022044bf 218 // cuts
219 //
220 Double_t fTPCPtCut; // do not store particles with generated pT less than this
221 Double_t fITSPtCut; // do not store particles with generated pT less than this
222 Double_t fTRDPtCut; // do not store particles with generated pT less than this
223 Double_t fTOFPtCut; // do not store particles with generated pT less than this
c92725b7 224
022044bf 225 ClassDef(AliGenInfoMaker,0) // class which creates and fills tree with TPCGenTrack objects
c92725b7 226};
227
228
229
230
231
232AliTPCParam * GetTPCParam();
233Float_t TPCBetheBloch(Float_t bg);
234
235#endif