]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliGenInfo.h
Enabling process with CINT
[u/mrichter/AliRoot.git] / STEER / AliGenInfo.h
CommitLineData
ae7d73d2 1
2
3
4////////////////////////////////////////////////////////////////////////
5//
6// Start of implementation of the class digitRow
7//
8////////////////////////////////////////////////////////////////////////
9const Int_t kgRowBytes = 32;
10
11class digitRow: public TObject {
12
13public:
14 digitRow();
15 virtual ~digitRow(){;}
16 void SetRow(Int_t row);
17 Bool_t TestRow(Int_t row);
18 digitRow & operator=(const digitRow &digOld);
19 Int_t RowsOn(Int_t upto=8*kgRowBytes);
20 Int_t Last();
21 Int_t First();
22 void Reset();
23
24//private:
25 UChar_t fDig[kgRowBytes];
26 ClassDef(digitRow,1) // container for digit pattern
27};
28ClassImp(digitRow)
29
30
31////////////////////////////////////////////////////////////////////////
32//
33// Start of implementation of the class AliMCInfo
34//
35////////////////////////////////////////////////////////////////////////
36
37class AliMCInfo: public TObject {
38
39public:
40 AliMCInfo();
41 ~AliMCInfo();
42 void Update();
43
44 AliTrackReference fTrackRef; // track reference saved in the output tree
45 AliTrackReference fTrackRefOut; // decay track reference saved in the output tree
46 AliTrackReference fTRdecay; // track reference at decay point
47 //
51ad6848 48 Int_t fPrimPart; // index of primary particle in TreeH
ae7d73d2 49 TParticle fParticle; // generated particle
50 Float_t fMass; // mass of the particle
51 Float_t fCharge; //
52 Int_t fLabel; // track label
53 Int_t fEventNr; // event number
54 Int_t fMCtracks; // indication of how many times the track is retuturned back
55 Int_t fPdg; //pdg code
56 Float_t fDecayCoord[3]; // position of particle decay
57 Double_t fVDist[4]; //distance of the particle vertex from primary vertex
58 Bool_t fTPCdecay; //indicates decay in TPC
59 Int_t fRowsWithDigitsInn; // number of rows with digits in the inner sectors
60 Int_t fRowsWithDigits; // number of rows with digits in the outer sectors
61 Int_t fRowsTrackLength; // last - first row with digit
62 Float_t fPrim; // theoretical dedx in tpc according particle momenta and mass
63 digitRow fTPCRow; // information about digits row pattern
64 Int_t fNTPCRef; // tpc references counter
51ad6848 65 Int_t fNITSRef; // ITS references counter
66 Int_t fNTRDRef; // TRD references counter
67 Int_t fNTOFRef; // TOF references counter
ae7d73d2 68 TClonesArray * fTPCReferences; //containner with all track references -in the TPC
69 TClonesArray * fITSReferences; //container with ITS references
70 TClonesArray * fTRDReferences; //container with TRD references
51ad6848 71 TClonesArray * fTOFReferences; //container with TRD references
ae7d73d2 72 //
73 ClassDef(AliMCInfo,3) // container for
74};
75ClassImp(AliMCInfo)
76
77
78
79class AliGenV0Info: public TObject {
80public:
51ad6848 81 AliMCInfo fMCd; //info about daughter particle - second particle for V0
82 AliMCInfo fMCm; //info about mother particle - first particle for V0
81e97e0d 83 TParticle fMotherP; //particle info about mother particle
51ad6848 84 void Update(Float_t vertex[3]); // put some derived info to special field
ae7d73d2 85 Double_t fMCDist1; //info about closest distance according closest MC - linear DCA
86 Double_t fMCDist2; //info about closest distance parabolic DCA
87 //
88 Double_t fMCPdr[3]; //momentum at vertex daughter - according approx at DCA
89 Double_t fMCPd[4]; //exact momentum from MC info
90 Double_t fMCX[3]; //exact position of the vertex
91 Double_t fMCXr[3]; //rec. position according helix
92 //
93 Double_t fMCPm[3]; //momentum at the vertex mother
94 Double_t fMCAngle[3]; //three angels
95 Double_t fMCRr; // rec position of the vertex
96 Double_t fMCR; //exact r position of the vertex
97 Int_t fPdg[2]; //pdg code of mother and daugter particles
d6355c8c 98 Int_t fLab[2]; //MC label of the partecle
51ad6848 99 //
100 Double_t fInvMass; //reconstructed invariant mass -
101 Float_t fPointAngleFi; //point angle fi
102 Float_t fPointAngleTh; //point angle theta
103 Float_t fPointAngle; //point angle full
104 //
ae7d73d2 105 ClassDef(AliGenV0Info,1) // container for
106};
107ClassImp(AliGenV0Info)
108
109
110
111
51ad6848 112class AliGenKinkInfo: public TObject {
113public:
114 AliMCInfo fMCd; //info about daughter particle - second particle for V0
115 AliMCInfo fMCm; //info about mother particle - first particle for V0
116 void Update(); // put some derived info to special field
117 Float_t GetQt(); //
118 Double_t fMCDist1; //info about closest distance according closest MC - linear DCA
119 Double_t fMCDist2; //info about closest distance parabolic DCA
120 //
121 Double_t fMCPdr[3]; //momentum at vertex daughter - according approx at DCA
122 Double_t fMCPd[4]; //exact momentum from MC info
123 Double_t fMCX[3]; //exact position of the vertex
124 Double_t fMCXr[3]; //rec. position according helix
125 //
126 Double_t fMCPm[3]; //momentum at the vertex mother
127 Double_t fMCAngle[3]; //three angels
128 Double_t fMCRr; // rec position of the vertex
129 Double_t fMCR; //exact r position of the vertex
130 Int_t fPdg[2]; //pdg code of mother and daugter particles
131 Int_t fLab[2]; //MC label of the partecle
132 ClassDef(AliGenKinkInfo,1) // container for
133};
134ClassImp(AliGenKinkInfo)
135
136
137
138
ae7d73d2 139////////////////////////////////////////////////////////////////////////
140//
141// Start of implementation of the class AliGenInfoMaker
142//
143////////////////////////////////////////////////////////////////////////
144
145class AliGenInfoMaker {
146
147public:
148 AliGenInfoMaker();
149 AliGenInfoMaker(const char * fnGalice, const char* fnRes ="genTracks.root",
150 Int_t nEvents=1, Int_t firstEvent=0);
151 virtual ~AliGenInfoMaker();
152 void Reset();
153 Int_t Exec();
154 Int_t Exec(Int_t nEvents, Int_t firstEventNr);
155 void CreateTreeGenTracks();
156 void CloseOutputFile();
157 Int_t TreeKLoop();
158 Int_t TreeTRLoop();
159 Int_t TreeDLoop();
51ad6848 160 Int_t BuildKinkInfo(); // build information about MC kinks
161 Int_t BuildV0Info(); // build information about MC kinks
162 Int_t BuildHitLines(); // build information about MC kinks
ae7d73d2 163 //void FillInfo(Int_t iParticle);
164 void SetFirstEventNr(Int_t i) {fFirstEventNr = i;}
165 void SetNEvents(Int_t i) {fNEvents = i;}
166 void SetDebug(Int_t level) {fDebug = level;}
167 Int_t SetIO(Int_t eventNr);
168 Int_t CloseIOEvent();
169 Int_t CloseIO();
170 Int_t SetIO();
171 Float_t TR2LocalX(AliTrackReference *trackRef,
172 AliTPCParam *paramTPC);
173 AliMCInfo * GetInfo(UInt_t i){return (i<fNParticles)? fGenInfo[i]:0;}
174 AliMCInfo * MakeInfo(UInt_t i);
175
176public:
177 Int_t fDebug; //! debug flag
178 Int_t fEventNr; //! current event number
179 Int_t fLabel; //! track label
180 Int_t fNEvents; //! number of events to process
181 Int_t fFirstEventNr; //! first event to process
182 UInt_t fNParticles; //! number of particles in TreeK
51ad6848 183 TTree * fTreeGenTracks; //! output tree with generated tracks
184 TTree * fTreeKinks; //! output tree with Kinks
185 TTree * fTreeV0; //! output tree with V0
186 TTree * fTreeHitLines; //! tree with hit lines
187 char fFnRes[1000]; //! output file name with stored tracks
ae7d73d2 188 TFile *fFileGenTracks; //! output file with stored fTreeGenTracks
189 //
190 AliRunLoader * fLoader; //! pointer to the run loader
191 TTree * fTreeD; //! current tree with digits
192 TTree * fTreeTR; //! current tree with TR
193 AliStack *fStack; //! current stack
194 //
195 AliMCInfo ** fGenInfo; //! array with pointers to gen info
196 Int_t fNInfos; //! number of tracks with infos
197 //
198 AliTPCParam* fParamTPC; //! AliTPCParam
51ad6848 199 Float_t fVPrim[3]; //! primary vertex position
ae7d73d2 200 // the fVDist[3] contains size of the 3-vector
201
202private:
203
204// some constants for the original non-pareller tracking (by Y.Belikov)
205 static const Int_t seedRow11 = 158; // nRowUp - 1
206 static const Int_t seedRow12 = 139; // nRowUp - 1 - (Int_t) 0.125*nRowUp
207 static const Int_t seedRow21 = 149; // seedRow11 - shift
208 static const Int_t seedRow22 = 130; // seedRow12 - shift
209 static const Double_t kRaddeg = 180./3.14159265358979312;
210 //
51ad6848 211 static const Double_t fgTPCPtCut = 0.03; // do not store particles with generated pT less than this
ae7d73d2 212 static const Double_t fgITSPtCut = 0.2; // do not store particles with generated pT less than this
213 static const Double_t fgTRDPtCut = 0.2; // do not store particles with generated pT less than this
51ad6848 214 static const Double_t fgTOFPtCut = 0.15; // do not store particles with generated pT less than this
ae7d73d2 215
216 ClassDef(AliGenInfoMaker,1) // class which creates and fills tree with TPCGenTrack objects
217};
218ClassImp(AliGenInfoMaker)
219
220
221
222class AliComparisonDraw: public TObject{
223public:
51ad6848 224 AliComparisonDraw(){fPoints=0; fView=0;}
225 void InitView();
ae7d73d2 226 TH1F * DrawXY(const char * chx, const char *chy, const char* selection,
227 const char * quality,Int_t nbins, Float_t minx, Float_t maxx,
f007cb5f 228 Float_t miny, Float_t maxy, Int_t nBinsRes=30);
ae7d73d2 229 TH1F * DrawLogXY(const char * chx, const char *chy, const char* selection,
230 const char * quality, Int_t nbins,Float_t minx, Float_t maxx,
d6355c8c 231 Float_t miny, Float_t maxy, Int_t nBinsRes=30);
ae7d73d2 232 TH1F * Eff(const char *variable, const char* selection, const char * quality,
233 Int_t nbins,Float_t min, Float_t max);
234 TH1F * EffLog(const char *variable, const char* selection, const char * quality,
235 Int_t nbins,Float_t min, Float_t max);
236 //
237 static void AliLabelAxes(TH1* histo, const char* xAxisTitle, const char* yAxisTitle);
238 static Double_t* CreateLogBins(Int_t nBins, Double_t xMin, Double_t xMax);
239 //
240 static TH1F* CreateEffHisto(TH1F* hGen, TH1F* hRec);
241 static TH1F* CreateResHisto(TH2F* hRes2, TH1F **phMean,
242 Bool_t drawBinFits = kTRUE,Bool_t overflowBinFits = kFALSE);
51ad6848 243 void DrawFriend2D(const char * chx, const char *chy, const char* selection, TTree * tfriend);
244 void GetPoints3D(const char * label, const char * chpoints, const char* selection, TTree * tpoints, Int_t color=6, Float_t rmin=4.);
245 void Draw3D(Int_t min=0, Int_t max = 10000);
246 void SavePoints(const char* name);
ae7d73d2 247 public:
248 TTree * fTree;
249 TH1F * fRes; //temporary file
250 TH1F * fMean; //temporary file
51ad6848 251 TView * fView; //3D view
252 TCanvas *fCanvas; //canvas
253 TObjArray *fPoints;
ae7d73d2 254 ClassDef(AliComparisonDraw,1)
255};
256ClassImp(AliComparisonDraw)
257
258
51ad6848 259class AliPointsMI: public TObject{
260 public:
261 AliPointsMI();
262 AliPointsMI(Int_t n, Float_t *x,Float_t *y, Float_t *z);
263 void Reset();
264 void Reset(AliDetector * det, Int_t particle); //load points for given particle
265 ~AliPointsMI();
266 Int_t fN; //number of points;
267 Float_t *fX; //[fN] pointer to x
268 Float_t *fY; //[fN] pointer to y
269 Float_t *fZ; //[fN] pointer to Z
270 Int_t fCapacity; //!allocated size of the x,y,x
271 Int_t fLabel0; //label
272 Int_t fLabel1; //label
273 ClassDef(AliPointsMI,1)
274};
275ClassImp(AliPointsMI)
276
ae7d73d2 277
278AliTPCParam * GetTPCParam();
279Float_t TPCBetheBloch(Float_t bg);