]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG1/TRD/info/AliTRDv0Info.cxx
Fixed compilation
[u/mrichter/AliRoot.git] / PWG1 / TRD / info / AliTRDv0Info.cxx
1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 *                                                                        *
4 * Author: The ALICE Off-line Project.                                    *
5 * Contributors are mentioned in the code where appropriate.              *
6 *                                                                        *
7 * Permission to use, copy, modify and distribute this software and its   *
8 * documentation strictly for non-commercial purposes is hereby granted   *
9 * without fee, provided that the above copyright notice appears in all   *
10 * copies and that both the copyright notice and this permission notice   *
11 * appear in the supporting documentation. The authors make no claims     *
12 * about the suitability of this software for any purpose. It is          *
13 * provided "as is" without express or implied warranty.                  *
14 **************************************************************************/
15
16 /* $Id: AliTRDv0Info.cxx 27496 2008-07-22 08:35:45Z cblume $ */
17
18 ////////////////////////////////////////////////////////////////////////////
19 //                                                                        //
20 //  Reconstruction QA                                                     //
21 //                                                                        //
22 //  Gathers all information necessary for reference data selection about  //
23 //  the track and (in case) its corresponding V0.                         //
24 //  Carries out the selection of electrons (from gamma conversions),      //
25 //  pions (from K0s decays) and protons (from Lambda and Anti-Lambda      //
26 //  decays) by cuts specific for the respective decay and particle        //
27 //  species.                                                              //
28 //  (M.Heide, 2009/10/06)                                                 //
29 //                                                                        //
30 //  Authors:                                                              //
31 //   Alex Bercuci <A.Bercuci@gsi.de>                                      //
32 //   Alex Wilk    <wilka@uni-muenster.de>                                 //
33 //   Markus Heide <mheide@uni-muenster.de>                                //
34 //                                                                        //
35 ////////////////////////////////////////////////////////////////////////////
36
37 #include "TMath.h"
38 #include "TDatabasePDG.h"
39
40 #include "AliESDtrack.h"
41 #include "AliESDv0.h"
42 #include "AliLog.h"
43 #include "TVector3.h"
44 #include "AliKFParticle.h"
45 #include "AliKFVertex.h"
46
47 #include "AliTRDv0Info.h"
48 #include "AliTRDtrackInfo.h"
49 #include "AliTRDtrackInfo.h"
50
51 ClassImp(AliTRDv0Info)
52
53 //_________________________________________________
54 AliTRDv0Info::AliTRDv0Info()
55   : TObject()
56   ,fQuality(0)
57   ,fDCA(10)
58   ,fPointingAngle(10)
59   ,fOpenAngle(10)
60   ,fPsiPair(99)
61   ,fMagField(0)
62   ,fRadius(0)
63   ,fV0Momentum(0)
64   ,fTrackP(NULL)
65   ,fTrackN(NULL)
66   ,fNindex(0)
67   ,fPindex(0)
68   ,fInputEvent(NULL)
69   ,fPrimaryVertex(NULL)
70 {
71   //
72   // Default constructor
73   //
74
75   memset(fPplus, 0, 2*kNlayer*sizeof(Float_t));
76   memset(fPminus, 0, 2*kNlayer*sizeof(Float_t));
77   memset(fDetPID, 0, 2*kNDaughters*kNDetectors*AliPID::kSPECIES*sizeof(Float_t));
78   memset(fComPID, 0, 2*kNDaughters*AliPID::kSPECIES*sizeof(Float_t));
79   memset(fInvMass, 0, kNMomBins*kNDecays*sizeof(Double_t));
80   memset(fArmenteros, 0, kNDecays*sizeof(Bool_t));
81   memset(fTPCdEdx, 0, kNDecays*sizeof(Float_t));
82   memset(fChi2ndf, 0, kNDecays*sizeof(Double_t));
83
84   /////////////////////////////////////////////////////////////////////////////
85   //Set Cut values: First specify decay in brackets, then the actual cut value!
86   ///////////////////////////////////////////////////////////////////////////// 
87
88   //Upper limit for distance of closest approach of two daughter tracks :
89   fUpDCA[kGamma] = 1000.;
90   fUpDCA[kK0s] = 0.08;
91   fUpDCA[kLambda] = 0.2;
92   fUpDCA[kAntiLambda] = 0.2;
93
94   //Upper limit for pointing angle (= angle between between vector from primary to secondary vertex and reconstructed momentum of V0 mother particle) :
95   fUpPointingAngle[kGamma] = 0.03;
96   fUpPointingAngle[kK0s] = 0.03;
97   fUpPointingAngle[kLambda] = 0.04;
98   fUpPointingAngle[kAntiLambda] = 0.04;
99
100   //Upper limit for invariant mass of V0 mother :
101   fUpInvMass[kGamma][0] = 0.05;// second pair of brackets is for momentum bin: 0: below mother momentm of 2.5 GeV
102   fUpInvMass[kGamma][1] = 0.07;//1: above 2.5 GeV
103   fUpInvMass[kK0s][0] = fUpInvMass[kK0s][1] = 0.50265;
104   fUpInvMass[kLambda][0] = fUpInvMass[kLambda][1] = 1.1207;
105   fUpInvMass[kAntiLambda][0] = fUpInvMass[kAntiLambda][1] = 1.1207;
106
107   //Lower limit for invariant mass of V0 mother :
108   fDownInvMass[kGamma] = -1.;
109   fDownInvMass[kK0s] = 0.49265;
110   fDownInvMass[kLambda] = 1.107;
111   fDownInvMass[kAntiLambda] = 1.107;
112
113   //Upper limit for KF Chi2/NDF value;
114   fUpChi2ndf[kGamma] = 10000.;//7.;
115   fUpChi2ndf[kK0s] = 10000.;//5.;
116   fUpChi2ndf[kLambda] = 10000.;//5.;
117   fUpChi2ndf[kAntiLambda] = 10000.;//5.;
118
119   //Lower limit for distance from secondary vertex to primary vertex in x-y plane :
120   fDownRadius[kGamma] = 6.;
121   fDownRadius[kK0s] = 0.;
122   fDownRadius[kLambda] = 0.;
123   fDownRadius[kAntiLambda] = 0.;
124
125   //Upper limit for distance from secondary vertex to primary vertex in x-y plane :
126   fUpRadius[kGamma] = 1000.;
127   fUpRadius[kK0s] = 20.;
128   fUpRadius[kLambda] = 1000.;
129   fUpRadius[kAntiLambda] = 1000.;
130
131   //Upper limit for opening angle between two daughter tracks (characteristically near zero for conversions) :
132   fUpOpenAngle[kGamma] = 0.1;
133   fUpOpenAngle[kK0s] = 3.15;
134   fUpOpenAngle[kLambda] = 3.15;
135   fUpOpenAngle[kAntiLambda] = 3.15;
136
137   //Upper limit for angle between daughter momentum plane and plane perpendicular to magnetic field (characteristically around zero for conversions) :
138   fUpPsiPair[kGamma] = 0.05;
139   fUpPsiPair[kK0s] = 1.6;
140   fUpPsiPair[kLambda] = 1.6;
141   fUpPsiPair[kAntiLambda] = 1.6;
142
143   //Lower limit for likelihood value of TPC PID :
144   fDownTPCPIDneg[AliPID::kElectron] = 0.;
145   fDownTPCPIDpos[AliPID::kElectron] = 0.;
146
147   fDownTPCPIDneg[AliPID::kMuon] = 0.;
148   fDownTPCPIDpos[AliPID::kMuon] = 0.;
149
150   fDownTPCPIDneg[AliPID::kPion] = 0.;
151   fDownTPCPIDpos[AliPID::kPion] = 0.;
152
153   fDownTPCPIDneg[AliPID::kKaon] = 0.;
154   fDownTPCPIDpos[AliPID::kKaon] = 0.;
155
156   fDownTPCPIDneg[AliPID::kProton] = 0.;
157   fDownTPCPIDpos[AliPID::kProton] = 0.;
158
159  //Lower limit for likelihood value of combined PID :
160   fDownComPIDneg[AliPID::kElectron] = 0.;
161   fDownComPIDpos[AliPID::kElectron] = 0.;
162
163   fDownComPIDneg[AliPID::kMuon] = 0.;
164   fDownComPIDpos[AliPID::kMuon] = 0.;
165
166   fDownComPIDneg[AliPID::kPion] = 0.;
167   fDownComPIDpos[AliPID::kPion] = 0.;
168
169   fDownComPIDneg[AliPID::kKaon] = 0.;
170   fDownComPIDpos[AliPID::kKaon] = 0.;
171
172   fDownComPIDneg[AliPID::kProton] = 0.;
173   fDownComPIDpos[AliPID::kProton] = 0.;
174
175  //Lower limit for likelihood value of combined PID for daughter track which doesn't enter reference data (here: pion daughters from Lambda decays:
176   fDownComPIDnegPart[AliPID::kElectron] = 0.;
177   fDownComPIDposPart[AliPID::kElectron] = 0.;
178
179   fDownComPIDnegPart[AliPID::kMuon] = 0.;
180   fDownComPIDposPart[AliPID::kMuon] = 0.;
181
182   fDownComPIDnegPart[AliPID::kPion] = 0.;
183   fDownComPIDposPart[AliPID::kPion] = 0.;
184
185   fDownComPIDnegPart[AliPID::kKaon] = 0.;
186   fDownComPIDposPart[AliPID::kKaon] = 0.;
187
188   fDownComPIDnegPart[AliPID::kProton] = 0.;
189   fDownComPIDposPart[AliPID::kProton] = 0.;
190
191   //Parameters for data with well-calibrated PID (after usage of tender):
192   /* //Lower limit for likelihood value of TPC PID :
193   fDownTPCPIDneg[AliPID::kElectron] = 0.21;
194   fDownTPCPIDpos[AliPID::kElectron] = 0.21;
195
196   fDownTPCPIDneg[AliPID::kMuon] = 0.21;
197   fDownTPCPIDpos[AliPID::kMuon] = 0.21;
198
199   fDownTPCPIDneg[AliPID::kPion] = 0.21;
200   fDownTPCPIDpos[AliPID::kPion] = 0.21;
201
202   fDownTPCPIDneg[AliPID::kKaon] = 0.21;
203   fDownTPCPIDpos[AliPID::kKaon] = 0.21;
204
205   fDownTPCPIDneg[AliPID::kProton] = 0.21;
206   fDownTPCPIDpos[AliPID::kProton] = 0.21;
207
208   //Lower limit for likelihood value of combined PID :
209   fDownComPIDneg[AliPID::kElectron] = 0.21;
210   fDownComPIDpos[AliPID::kElectron] = 0.21;
211
212   fDownComPIDneg[AliPID::kMuon] = 0.21;
213   fDownComPIDpos[AliPID::kMuon] = 0.21;
214
215   fDownComPIDneg[AliPID::kPion] = 0.9;
216   fDownComPIDpos[AliPID::kPion] = 0.9;
217
218   fDownComPIDneg[AliPID::kKaon] = 0.21;
219   fDownComPIDpos[AliPID::kKaon] = 0.21;
220
221   fDownComPIDneg[AliPID::kProton] = 0.9;
222   fDownComPIDpos[AliPID::kProton] = 0.9;
223
224  //Lower limit for likelihood value of combined PID for daughter track which doesn't enter reference data (here: pion daughters from Lambda decays:
225   fDownComPIDnegPart[AliPID::kElectron] = 0.05;
226   fDownComPIDposPart[AliPID::kElectron] = 0.05;
227
228   fDownComPIDnegPart[AliPID::kMuon] = 0.05;
229   fDownComPIDposPart[AliPID::kMuon] = 0.05;
230
231   fDownComPIDnegPart[AliPID::kPion] = 0.05;
232   fDownComPIDposPart[AliPID::kPion] = 0.05;
233
234   fDownComPIDnegPart[AliPID::kKaon] = 0.05;
235   fDownComPIDposPart[AliPID::kKaon] = 0.05;
236
237   fDownComPIDnegPart[AliPID::kProton] = 0.05;
238   fDownComPIDposPart[AliPID::kProton] = 0.05;*/
239 }
240
241 //_________________________________________________
242 AliTRDv0Info::AliTRDv0Info(const AliTRDv0Info &ref)
243   : TObject()
244   ,fQuality(ref.fQuality)
245   ,fDCA(ref.fDCA)
246   ,fPointingAngle(ref.fPointingAngle)
247   ,fOpenAngle(ref.fOpenAngle)
248   ,fPsiPair(ref.fPsiPair)
249   ,fMagField(ref.fMagField)
250   ,fRadius(ref.fRadius)
251   ,fV0Momentum(ref.fV0Momentum)
252   ,fTrackP(ref.fTrackP)
253   ,fTrackN(ref.fTrackN)
254   ,fNindex(ref.fNindex)
255   ,fPindex(ref.fPindex)
256   ,fInputEvent(ref.fInputEvent)
257   ,fPrimaryVertex(ref.fPrimaryVertex)
258 {
259   //
260   // Copy constructor
261   //
262
263   memcpy(fPplus, ref.fPplus, 2*kNlayer*sizeof(Float_t));
264   memcpy(fPminus, ref.fPminus, 2*kNlayer*sizeof(Float_t));
265   memcpy(fDetPID, ref.fDetPID, 2*kNDaughters*kNDetectors*AliPID::kSPECIES*sizeof(Float_t));
266   memcpy(fComPID, ref.fComPID, 2*kNDaughters*AliPID::kSPECIES*sizeof(Float_t));
267   memcpy(fInvMass, ref.fInvMass, kNMomBins*kNDecays*sizeof(Double_t));
268   memcpy(fArmenteros, ref.fArmenteros, kNDecays*sizeof(Bool_t));
269   memcpy(fChi2ndf, ref.fChi2ndf, kNDecays*sizeof(Double_t));
270   memcpy(fTPCdEdx, ref.fTPCdEdx, kNDaughters*sizeof(Float_t));
271
272   //Upper limit for distance of closest approach of two daughter tracks :
273   memcpy(fUpDCA, ref.fUpDCA, kNDecays*sizeof(Float_t));
274   memcpy(fUpPointingAngle, ref.fUpPointingAngle, kNDecays*sizeof(Float_t));
275   memcpy(fUpOpenAngle, ref.fUpOpenAngle, kNDecays*sizeof(Float_t));
276   memcpy(fDownOpenAngle, ref.fDownOpenAngle, kNDecays*sizeof(Float_t));
277   memcpy(fUpPsiPair, ref.fUpPsiPair, kNDecays*sizeof(Float_t));
278   memcpy(fDownPsiPair, ref.fDownPsiPair, kNDecays*sizeof(Float_t));
279   memcpy(fUpInvMass, ref.fUpInvMass, kNDecays*kNMomBins*sizeof(Double_t));
280   memcpy(fDownInvMass, ref.fDownInvMass, kNDecays*sizeof(Double_t));
281   memcpy(fUpChi2ndf, ref.fUpChi2ndf, kNDecays*sizeof(Double_t));
282   memcpy(fUpRadius, ref.fUpRadius, kNDecays*sizeof(Float_t));
283   memcpy(fDownRadius, ref.fDownRadius, kNDecays*sizeof(Float_t));
284   memcpy(fDownTPCPIDneg, ref.fDownTPCPIDneg, AliPID::kSPECIES*sizeof(Float_t));
285   memcpy(fDownTPCPIDpos, ref.fDownTPCPIDpos, AliPID::kSPECIES*sizeof(Float_t));
286   memcpy(fDownComPIDneg, ref.fDownComPIDneg, AliPID::kSPECIES*sizeof(Float_t));
287   memcpy(fDownComPIDpos, ref.fDownComPIDpos, AliPID::kSPECIES*sizeof(Float_t));
288   memcpy(fDownComPIDnegPart, ref.fDownComPIDnegPart, AliPID::kSPECIES*sizeof(Float_t));
289   memcpy(fDownComPIDposPart, ref.fDownComPIDposPart, AliPID::kSPECIES*sizeof(Float_t));
290 }
291
292 //_________________________________________________
293 void AliTRDv0Info::SetV0Info(AliESDv0 *esdv0)
294 {//Gets values of ESDv0 and daughter track properties
295   //See header file for description of variables
296
297   fQuality = Quality(esdv0);//Attributes an Int_t to the V0 due to quality cuts (= 1 if V0 is accepted, other integers depending on cut which excludes the vertex)    
298
299   fRadius = Radius(esdv0);//distance from secondary vertex to primary vertex in x-y plane
300       
301   fDCA = esdv0->GetDcaV0Daughters();//distance of closest approach of two daughter tracks
302       
303   fPointingAngle = TMath::ACos(esdv0->GetV0CosineOfPointingAngle());// pointing angle (= angle between between vector from primary to secondary vertex and reconstructed momentum of V0 mother particle)
304       
305   fOpenAngle = OpenAngle(esdv0);//Opening angle between two daughter tracks
306       
307   fPsiPair = PsiPair(esdv0);//Angle between daughter momentum plane and plane perpendicular to magnetic field
308
309   fV0Momentum = V0Momentum(esdv0);//Reconstructed momentum of the mother particle
310       
311   //4 decay types : conversions, K0s, Lambda, Anti-Lambda 
312     //five particle types: electrons, muons, pions, kaons, protons (muons and kaons not involved)
313   for(Int_t idecay(0), part1(-1), part2(-1); idecay < kNDecays; idecay++){
314
315     fArmenteros[idecay]=Armenteros(esdv0, idecay);//Attribute the Armenteros yes/no decision for every decay type
316     if(idecay == kLambda){ //protons and pions from Lambda
317       part1 = AliPID::kProton;
318       part2 = AliPID::kPion;
319     } else if(idecay == kAntiLambda) { //antiprotons and pions from Anti-Lambda
320       part1 = AliPID::kPion;
321       part2 = AliPID::kProton;
322     } else if(idecay == kK0s) {//pions from K0s
323       part1 = part2 = AliPID::kPion;
324     } else if(idecay == kGamma) {//electrons from conversions
325       part1 = part2 = AliPID::kElectron;
326     } 
327     fInvMass[idecay] = InvMass(part1, part2, esdv0);//Calculate invariant mass for all of our four supposed decays
328
329     // Comment out until bug fix is provided
330     // A.Bercuci 14. July 2010
331     //fChi2ndf[idecay] = KFChi2ndf(part1, part2,idecay);
332    
333   }
334   //Gets all likelihood values from TPC, TOF and ITS PID for the fDetPID[kNDaughters][kNDetectors][AliPID::kSPECIES] array
335   GetDetectorPID();
336   //Bayesian combination of likelihoods from TPC and TOF
337   CombinePID();
338   //TPC dE/dx values for both tracks
339   GetTPCdEdx();
340
341 }
342 //_________________________________________________
343 Float_t  AliTRDv0Info::V0Momentum(AliESDv0 *esdv0) const
344 {
345   //
346   // Reconstructed momentum of V0 mother particle
347   //
348
349   Double_t mn[3] = {0,0,0};
350   Double_t mp[3] = {0,0,0};
351
352
353   esdv0->GetNPxPyPz(mn[0],mn[1],mn[2]);//reconstructed cartesian momentum components of negative daughter; 
354   esdv0->GetPPxPyPz(mp[0],mp[1],mp[2]);//reconstructed cartesian momentum components of positive daughter;
355   
356   
357   return TMath::Sqrt((mn[0]+mp[0])*(mn[0]+mp[0]) + (mn[1]+mp[1])*(mn[1]+mp[1])+(mn[2]+mp[2])*(mn[2]+mp[2]));
358 }
359
360 //_________________________________________________
361 Double_t AliTRDv0Info::InvMass(Int_t part1, Int_t part2, AliESDv0 *esdv0) const
362 {
363   //
364   // Invariant mass of reconstructed V0 mother
365   //
366
367   const Double_t kpmass[5] = {AliPID::ParticleMass(AliPID::kElectron),AliPID::ParticleMass(AliPID::kMuon),AliPID::ParticleMass(AliPID::kPion),AliPID::ParticleMass(AliPID::kKaon),AliPID::ParticleMass(AliPID::kProton)};
368   //Masses of electrons, muons, pions, kaons and protons, as implemented in ROOT
369
370
371   Double_t mn[3] = {0,0,0};
372   Double_t mp[3] = {0,0,0};  
373
374   esdv0->GetNPxPyPz(mn[0],mn[1],mn[2]);//reconstructed cartesian momentum components of negative daughter;
375   esdv0->GetPPxPyPz(mp[0],mp[1],mp[2]);//reconstructed cartesian momentum components of positive daughter;
376   
377   Double_t mass1 = kpmass[part1];//sets supposed rest masses for both daughters: positive
378   Double_t mass2 = kpmass[part2];//negative   
379
380   //Calculate daughters' energies :
381   Double_t e1    = TMath::Sqrt(mass1*mass1+
382             mp[0]*mp[0]+
383             mp[1]*mp[1]+
384             mp[2]*mp[2]);
385   Double_t e2    = TMath::Sqrt(mass2*mass2+
386             mn[0]*mn[0]+
387             mn[1]*mn[1]+
388             mn[2]*mn[2]);  
389
390   //Sum of daughter momenta :   
391   Double_t momsum =  
392     (mn[0]+mp[0])*(mn[0]+mp[0])+
393     (mn[1]+mp[1])*(mn[1]+mp[1])+
394     (mn[2]+mp[2])*(mn[2]+mp[2]);
395
396   //invariant mass :                 
397   Double_t mInv = TMath::Sqrt((e1+e2)*(e1+e2)-momsum);
398
399   return mInv;
400   
401 }
402 //_________________________________________________
403 Float_t AliTRDv0Info::OpenAngle(AliESDv0 *esdv0)
404 {//Opening angle between two daughter tracks
405   Double_t mn[3] = {0,0,0};
406   Double_t mp[3] = {0,0,0};
407     
408
409   esdv0->GetNPxPyPz(mn[0],mn[1],mn[2]);//reconstructed cartesian momentum components of negative daughter;
410   esdv0->GetPPxPyPz(mp[0],mp[1],mp[2]);//reconstructed cartesian momentum components of positive daughter;
411
412   
413   fOpenAngle = TMath::ACos((mp[0]*mn[0] + mp[1]*mn[1] + mp[2]*mn[2])/(TMath::Sqrt(mp[0]*mp[0] + mp[1]*mp[1] + mp[2]*mp[2])*TMath::Sqrt(mn[0]*mn[0] + mn[1]*mn[1] + mn[2]*mn[2])));
414   
415   return fOpenAngle;
416 }
417
418 //_________________________________________________
419 Float_t AliTRDv0Info::PsiPair(AliESDv0 *esdv0)
420 {//Angle between daughter momentum plane and plane perpendicular to magnetic field
421   Double_t x, y, z;
422   esdv0->GetXYZ(x,y,z);//Reconstructed coordinates of V0; to be replaced by Markus Rammler's method in case of conversions!
423   
424   Double_t mn[3] = {0,0,0};
425   Double_t mp[3] = {0,0,0};
426   
427
428   esdv0->GetNPxPyPz(mn[0],mn[1],mn[2]);//reconstructed cartesian momentum components of negative daughter;
429   esdv0->GetPPxPyPz(mp[0],mp[1],mp[2]);//reconstructed cartesian momentum components of positive daughter; 
430
431
432   Double_t deltat = 1.;
433   deltat = TMath::ATan(mp[2]/(TMath::Sqrt(mp[0]*mp[0] + mp[1]*mp[1])+1.e-13)) -  TMath::ATan(mn[2]/(TMath::Sqrt(mn[0]*mn[0] + mn[1]*mn[1])+1.e-13));//difference of angles of the two daughter tracks with z-axis
434
435   Double_t radiussum = TMath::Sqrt(x*x + y*y) + 50;//radius to which tracks shall be propagated
436
437   Double_t momPosProp[3];
438   Double_t momNegProp[3];
439     
440   AliExternalTrackParam nt(*fTrackN), pt(*fTrackP);
441     
442   fPsiPair = 4.;
443
444   if(nt.PropagateTo(radiussum,fMagField) == 0)//propagate tracks to the outside
445     fPsiPair =  -5.;
446   if(pt.PropagateTo(radiussum,fMagField) == 0)
447     fPsiPair = -5.;
448   pt.GetPxPyPz(momPosProp);//Get momentum vectors of tracks after propagation
449   nt.GetPxPyPz(momNegProp);
450   
451   Double_t pEle =
452     TMath::Sqrt(momNegProp[0]*momNegProp[0]+momNegProp[1]*momNegProp[1]+momNegProp[2]*momNegProp[2]);//absolute momentum value of negative daughter
453   Double_t pPos =
454     TMath::Sqrt(momPosProp[0]*momPosProp[0]+momPosProp[1]*momPosProp[1]+momPosProp[2]*momPosProp[2]);//absolute momentum value of positive daughter
455     
456   Double_t scalarproduct =
457     momPosProp[0]*momNegProp[0]+momPosProp[1]*momNegProp[1]+momPosProp[2]*momNegProp[2];//scalar product of propagated positive and negative daughters' momenta
458     
459   Double_t chipair = TMath::ACos(scalarproduct/(pEle*pPos));//Angle between propagated daughter tracks
460
461   fPsiPair =  TMath::Abs(TMath::ASin(deltat/chipair));  
462
463   return fPsiPair; 
464
465 }
466 //_________________________________________________
467 Double_t AliTRDv0Info::KFChi2ndf(Int_t part1, Int_t part2,Int_t decay){
468   //Calculates Kalman filter Chi2/NDF
469   Int_t mothers[4]={22,310,3122,3122};
470
471   const Double_t partMass=TDatabasePDG::Instance()->GetParticle(mothers[decay])->Mass();
472   const Double_t massWidth[4] = {0.001, 0., 0., 0.};
473  
474   AliKFParticle *kfMother = CreateMotherParticle(fTrackP, fTrackN, part1, part2);
475  
476   // Lambda
477   if(!kfMother) {
478   return kFALSE;
479   }
480   
481   // production vertex is set in the 'CreateMotherParticle' function
482   kfMother->SetMassConstraint(partMass, massWidth[decay]);
483  
484   Double_t chi2ndf = (kfMother->GetChi2()/kfMother->GetNDF());
485  
486   if(kfMother)delete kfMother;
487   return chi2ndf; 
488 }
489 //________________________________________________________________
490 AliKFParticle *AliTRDv0Info::CreateMotherParticle(AliESDtrack *pdaughter, AliESDtrack *ndaughter, Int_t pspec, Int_t nspec){
491   //
492   // Creates a mother particle
493   //
494   AliKFParticle pkfdaughter(*pdaughter, pspec);
495   AliKFParticle nkfdaughter(*ndaughter, nspec);
496   
497  
498   // Create the mother particle 
499   AliKFParticle *m = new AliKFParticle(pkfdaughter, nkfdaughter);
500  
501   AliKFVertex improvedVertex = *fPrimaryVertex;
502   improvedVertex += *m;
503   m->SetProductionVertex(improvedVertex);
504   
505
506   return m;
507 }
508 //_________________________________________________
509 Int_t AliTRDv0Info::HasTrack(AliTRDtrackInfo * const track)
510 {
511 //Checks if track is a secondary vertex daughter (due to V0 finder)
512   
513   Int_t trackID(track->GetTrackId());//index of the track
514   return HasTrack(trackID);
515 }
516
517 //_________________________________________________
518 Int_t AliTRDv0Info::HasTrack(Int_t trackID)
519 {
520   //comparing index of track with indices of pos./neg. V0 daughter :
521   if(fNindex==trackID) return -1;
522   else if(fPindex==trackID) return 1;
523   else return 0;
524 }
525
526 //_________________________________________________
527 void AliTRDv0Info::GetDetectorPID()
528 {//PID likelihoods from TPC, TOF, and ITS, for all particle species
529
530   fTrackN->GetTPCpid(fDetPID[kNeg][kTPC]);
531   fTrackP->GetTPCpid(fDetPID[kPos][kTPC]);
532   fTrackN->GetTOFpid(fDetPID[kNeg][kTOF]);
533   fTrackP->GetTOFpid(fDetPID[kPos][kTOF]);
534   fTrackN->GetITSpid(fDetPID[kNeg][kITS]);
535   fTrackP->GetITSpid(fDetPID[kPos][kITS]);
536
537   Long_t statusN = fTrackN->GetStatus(); 
538   Long_t statusP = fTrackP->GetStatus(); 
539   
540   if(!(statusN & AliESDtrack::kTPCpid)){
541          for(Int_t iPart = 0; iPart < AliPID::kSPECIES; iPart++){
542         fDetPID[kNeg][kTPC][iPart] = 0.2;
543       }    
544   }
545   if(!(statusN & AliESDtrack::kTOFpid)){
546     for(Int_t iPart = 0; iPart < AliPID::kSPECIES; iPart++){
547       fDetPID[kNeg][kTOF][iPart] = 0.2;
548     }    
549     
550   }
551   if(!(statusN & AliESDtrack::kITSpid)){
552     for(Int_t iPart = 0; iPart < AliPID::kSPECIES; iPart++){
553       fDetPID[kNeg][kITS][iPart] = 0.2;
554     }    
555   }
556   if(!(statusP & AliESDtrack::kTPCpid)){
557     for(Int_t iPart = 0; iPart < AliPID::kSPECIES; iPart++){
558       fDetPID[kPos][kTPC][iPart] = 0.2;
559     }    
560   }
561   if(!(statusP & AliESDtrack::kTOFpid)){
562     for(Int_t iPart = 0; iPart < AliPID::kSPECIES; iPart++){
563       fDetPID[kPos][kTOF][iPart] = 0.2;
564     }    
565     
566   }
567   if(!(statusP & AliESDtrack::kITSpid)){
568     for(Int_t iPart = 0; iPart < AliPID::kSPECIES; iPart++){
569       fDetPID[kPos][kITS][iPart] = 0.2;
570     }    
571   }
572
573 }
574 //____________________________________________________________________________________
575 void AliTRDv0Info::CombinePID()
576 {
577   Double_t partrat[AliPID::kSPECIES] = {0.208, 0.010, 0.662, 0.019, 0.101};
578   
579   for(Int_t iSign = 0; iSign < kNDaughters; iSign++)
580     {
581     for(Int_t iPart = 0; iPart < AliPID::kSPECIES; iPart++)
582       {
583       fComPID[iSign][iPart] = (partrat[iPart]*fDetPID[iSign][kTPC][iPart]*fDetPID[iSign][kTOF][iPart])/((partrat[0]*fDetPID[iSign][kTPC][0]*fDetPID[iSign][kTOF][0])+(partrat[1]*fDetPID[iSign][kTPC][1]*fDetPID[iSign][kTOF][1])+(partrat[2]*fDetPID[iSign][kTPC][2]*fDetPID[iSign][kTOF][2])+(partrat[3]*fDetPID[iSign][kTPC][3]*fDetPID[iSign][kTOF][3])+(partrat[4]*fDetPID[iSign][kTPC][4]*fDetPID[iSign][kTOF][4]));
584       
585       }
586     }
587 }
588 //_________________________________________________
589 void AliTRDv0Info::GetTPCdEdx()
590 {
591   fTPCdEdx[kNeg] = fTrackN->GetTPCsignal();
592   fTPCdEdx[kPos] = fTrackP->GetTPCsignal();
593
594 }
595 //_________________________________________________
596 Bool_t AliTRDv0Info::TPCdEdxCuts(Int_t part, AliTRDtrackInfo * const track)
597 {
598   //Bethe-Bloch lines
599   Double_t alephParameters[5];
600   
601   // data
602   alephParameters[0] = 0.0283086;
603   alephParameters[1] = 2.63394e+01;
604   alephParameters[2] = 5.04114e-11;
605   alephParameters[3] = 2.12543e+00;
606   alephParameters[4] = 4.88663e+00;
607   
608
609   Double_t deposit = 0;
610   Float_t x = 0;
611   if(HasTrack(track) == 1){
612     x = fTrackP->P();
613     deposit = fTPCdEdx[kPos];
614   }
615   else if(HasTrack(track) == -1){
616     x = fTrackN->P();
617     deposit = fTPCdEdx[kNeg];
618   }
619   else{
620     printf("No track found");
621     return 0;
622   }
623   if(x < 0.2)return 0;
624
625   Float_t upLimits[5]={85,1000,50*AliExternalTrackParam::BetheBlochAleph(x/0.13957, alephParameters[0], alephParameters[1], alephParameters[2], alephParameters[3],  alephParameters[4])+6,1000,50*AliExternalTrackParam::BetheBlochAleph(x/0.93827, alephParameters[0], alephParameters[1], alephParameters[2], alephParameters[3],  alephParameters[4])+10};
626   Float_t downLimits[5]={62,40,50*AliExternalTrackParam::BetheBlochAleph(x/0.13957, alephParameters[0], alephParameters[1], alephParameters[2], alephParameters[3],  alephParameters[4])-6,40,50*AliExternalTrackParam::BetheBlochAleph(x/0.93827, alephParameters[0], alephParameters[1], alephParameters[2], alephParameters[3],  alephParameters[4])-11};
627   
628   
629   if(x < 0.7){
630     downLimits[4]=90;
631   }
632   if(x < 1.25){
633     upLimits[0] = 85;
634   }
635   else{
636     downLimits[0] = 64;
637   }
638
639
640   if(deposit < downLimits[part])
641     return 0;
642   if(deposit > upLimits[part])
643     return 0;
644
645  
646   return 1;
647
648 }
649 //_________________________________________________
650 Float_t AliTRDv0Info::Radius(AliESDv0 *esdv0)
651 {//distance from secondary vertex to primary vertex in x-y plane
652   Double_t x, y, z;
653   esdv0->GetXYZ(x,y,z); //Reconstructed coordinates of V0
654   fRadius = TMath::Sqrt(x*x + y*y);
655   return fRadius;
656
657 }
658
659 //_________________________________________________
660 Int_t AliTRDv0Info::Quality(AliESDv0 *const esdv0)
661
662   //
663   // Checking track and V0 quality status in order to exclude vertices based on poor information
664   //
665
666   Float_t nClsN;
667   nClsN = fTrackN->GetTPCNcls();//number of found clusters in TPC for negative track
668   Float_t nClsFN;
669   nClsFN = fTrackN->GetTPCNclsF();//number of findable clusters in TPC for negative track
670   Float_t nClsP;
671   nClsP = fTrackP->GetTPCNcls();//number of found clusters in TPC for positive track
672   Float_t nClsFP;
673   nClsFP = fTrackP->GetTPCNclsF();//number of findable clusters in TPC for positive track
674   
675   fQuality = 0;
676
677
678   if (!(esdv0->GetOnFlyStatus()))//accept only vertices from online V0 finder
679     return -1;
680
681   Float_t clsRatioN; 
682   Float_t clsRatioP;
683
684   if((nClsFN < 80) || (nClsFP < 80)) return -2;//reject all V0s where at least one track has less than 80 TPC clusters
685
686  // Chi2 per TPC cluster
687   Int_t nTPCclustersP = fTrackP->GetTPCclusters(0);
688   Int_t nTPCclustersN = fTrackN->GetTPCclusters(0);
689   Float_t chi2perTPCclusterP = fTrackP->GetTPCchi2()/Float_t(nTPCclustersP);
690   Float_t chi2perTPCclusterN = fTrackN->GetTPCchi2()/Float_t(nTPCclustersN);
691  
692   if((chi2perTPCclusterN > 3.5)||(chi2perTPCclusterP > 3.5)) return -3;//reject all V0s where at least one track has a chi2 above 3.5
693     
694   clsRatioN = nClsN/nClsFN; //ratios of found to findable clusters in TPC 
695   clsRatioP = nClsP/nClsFP;
696   
697   if((clsRatioN < 0.6)||(clsRatioP < 0.6))//exclude tracks with low ratio of found to findable TPC clusters
698     return -4;
699  
700   if (!((fTrackP->GetStatus() &
701   AliESDtrack::kTPCrefit)))//accept only vertices in which both tracks have TPC refit
702     return -5;
703   if (!((fTrackN->GetStatus() &
704   AliESDtrack::kTPCrefit)))
705     return -6;  
706   if (fTrackP->GetKinkIndex(0)>0  ||
707       fTrackN->GetKinkIndex(0)>0 )//exclude tracks with kinks
708     return -7;
709  
710   if(!(V0SignCheck()))
711        return -8;
712   fQuality = 1;
713   return fQuality;
714 }
715 //________________________________________________________________
716 Bool_t AliTRDv0Info::V0SignCheck(){
717   //
718   // Check if v0 daughters really carry opposite charges
719   //
720  
721   Int_t qP = fTrackP->Charge();
722   Int_t qN = fTrackN->Charge();
723
724   if((qP*qN) != -1) return kFALSE;
725
726   return kTRUE;
727 }
728 //___________________________________________________________________
729 Bool_t AliTRDv0Info::Armenteros(AliESDv0 *esdv0, Int_t decay){
730   //
731   // computes the Armenteros variables for given V0
732   //
733   Double_t mn[3] = {0,0,0};
734   Double_t mp[3] = {0,0,0};  
735   Double_t mm[3] = {0,0,0};  
736  
737   if(V0SignCheck()){
738     esdv0->GetNPxPyPz(mn[0],mn[1],mn[2]); //reconstructed cartesian momentum components of negative daughter
739     esdv0->GetPPxPyPz(mp[0],mp[1],mp[2]); //reconstructed cartesian momentum components of positive daughter
740   }
741   else{
742     esdv0->GetPPxPyPz(mn[0],mn[1],mn[2]); //reconstructed cartesian momentum components of negative daughter
743     esdv0->GetNPxPyPz(mp[0],mp[1],mp[2]); //reconstructed cartesian momentum components of positive daughter
744   }
745   esdv0->GetPxPyPz(mm[0],mm[1],mm[2]); //reconstructed cartesian momentum components of mother
746
747   TVector3 vecN(mn[0],mn[1],mn[2]);
748   TVector3 vecP(mp[0],mp[1],mp[2]);
749   TVector3 vecM(mm[0],mm[1],mm[2]);
750   
751   Double_t thetaP = acos((vecP * vecM)/(vecP.Mag() * vecM.Mag()));
752   Double_t thetaN = acos((vecN * vecM)/(vecN.Mag() * vecM.Mag()));
753   
754   Double_t alfa = ((vecP.Mag())*cos(thetaP)-(vecN.Mag())*cos(thetaN))/
755     ((vecP.Mag())*cos(thetaP)+(vecN.Mag())*cos(thetaN)) ;
756   Double_t qt = vecP.Mag()*sin(thetaP);
757
758   Float_t ap[2];
759   ap[0] = alfa;
760   ap[1] = qt;
761
762   Double_t LcutAP[2];//Lambda/Anti-Lambda cuts
763   if(decay == 0){
764     // armenteros cuts
765     const Double_t cutAlpha[2] = {0.35, 0.45};   // [0.35, 0.45]
766     const Double_t cutQT = 0.015;
767     if(TMath::Abs(ap[0]) > cutAlpha[0] && TMath::Abs(ap[0]) < cutAlpha[1]) return kFALSE;
768    
769     if(ap[1] > cutQT) return kFALSE;
770   }
771   
772   else if(decay == 1){
773     const Double_t cutQT = 0.1075;
774     const Double_t cutAP = 0.22 * TMath::Sqrt( TMath::Abs( (1-ap[0]*ap[0]/(0.92*0.92)) ) );
775     if(ap[1] < cutQT) return kFALSE;
776     if(ap[1] > cutAP) return kFALSE;
777   }
778   else if(decay == 2){
779     const Double_t cutQT = 0.03;
780     const Double_t cutAlpha = 0.7;  // VERY strong - should supress the overlap with K0
781     LcutAP[0] = 1.0 - (ap[0]-0.7 * ap[0]-0.7)*1.1 - 0.87;
782     if(TMath::Abs(ap[0]) > cutAlpha) return kFALSE;
783     if(ap[1] < cutQT) return kFALSE;
784     if(ap[1] > LcutAP[0]) return kFALSE;
785
786   }
787   else if(decay == 3){
788     const Double_t cutQT = 0.03;
789     const Double_t cutAlpha = 0.7;  // VERY strong - should supress the overlap with K0
790     LcutAP[1] = 1.0 - (ap[0]+0.7 * ap[0]+0.7)*1.1 - 0.87;
791     if(TMath::Abs(ap[0]) > cutAlpha) return kFALSE;
792     if(ap[1] < cutQT) return kFALSE;
793     if(ap[1] > LcutAP[1]) return kFALSE;
794   }
795   return kTRUE;
796 }
797 //_________________________________________________
798 Int_t AliTRDv0Info::GetPID(Int_t ipart, AliTRDtrackInfo *track)
799 {
800   // Decides if track is accepted for one of the reference data samples
801   Int_t cutCode = -99;
802   if(!(track)) {
803     AliError("No track info");
804     return -1;
805   }
806   if(!HasTrack(track)){
807     AliDebug(2, "Track not attached to v0.");
808     return -2;
809   }
810
811   //translate ipart to decay (Anti-Lambda will be treated separately)
812   Int_t iDecay = -1;
813   switch(ipart){
814   case AliPID::kElectron: iDecay = kGamma; break;
815   case AliPID::kPion: iDecay = kK0s; break;
816   case AliPID::kProton: iDecay = kLambda; break;
817   default:
818     AliWarning(Form("Hypothesis \"ipart=%d\" not handled", ipart));
819     return -3;
820   }
821
822   //... it fulfills our quality criteria
823   if(!(fQuality == 1)) return -4;
824   //... distance of closest approach between daughters is reasonably small
825   if((fDCA > fUpDCA[iDecay])) return -5;
826   //... pointing angle between momentum of mother particle and vector from prim. to sec. vertex is small
827   if((fPointingAngle > fUpPointingAngle[iDecay])) return -6;
828   //... x-y plane distance of decay point to prim. vertex is bigger than a certain minimum value (for conversions)
829   if((fRadius < fDownRadius[iDecay])) return -7;
830   //...or smaller than a maximum value (for K0s)
831   if((fRadius > fUpRadius[iDecay])) return -8;
832   //... opening angle is close enough to zero (for conversions)
833   if((fOpenAngle > fUpOpenAngle[iDecay])) return -9;
834   //... Psi-pair angle is close enough to zero(for conversions)
835   if((TMath::Abs(fPsiPair) > fUpPsiPair[iDecay])) return -10;
836  
837
838
839   //Mother momentum slots above/below 2.5 GeV
840   Int_t iPSlot(fV0Momentum > 2.5);
841   Int_t trackID(track->GetTrackId());
842
843   //specific cut criteria :
844   if(ipart == AliPID::kProton) {
845     if((fInvMass[kK0s] < fUpInvMass[kK0s][iPSlot]) && (fInvMass[kK0s] > fDownInvMass[kK0s])) return -11;//explicit exclusion of K0s decays
846
847     if(fOpenAngle < (0.3 - 0.2*fV0Momentum))return -9;
848
849  
850
851     //for proton sample: separate treatment of Lamba and Anti-Lambda decays:
852     //for Anti-Lambda:
853     //Combined PID likelihoods high enough for pi+ and anti-proton ; invariant mass calculated postulating these two particle species...
854     //if((fComPID[kNeg][AliPID::kProton] > fDownComPIDneg[AliPID::kProton]) && (fComPID[kPos][AliPID::kPion] > fDownComPIDposPart[AliPID::kPion])) {
855     //if((fDetPID[kNeg][kTPC][AliPID::kProton] > fDownTPCPIDneg[AliPID::kProton]) && (fDetPID[kPos][kTPC][AliPID::kPion] > fDownTPCPIDpos[AliPID::kPion])){
856     if((TPCdEdxCuts(ipart, track))){//momentary solution: direct cut on TPC dE/dx
857       if(fNindex == trackID) {//we're only interested in the anti-proton
858         if(fArmenteros[kAntiLambda]){//Armenteros condition has to be fulfilled   
859           if(fChi2ndf[kAntiLambda] < fUpChi2ndf[kAntiLambda]){//Kalman filter Chi2/NDF not allowed to be too large
860             if((fInvMass[kAntiLambda] < fUpInvMass[kAntiLambda][iPSlot]) && (fInvMass[kAntiLambda] > fDownInvMass[kAntiLambda])){  
861         return 1;
862             } else cutCode = -15;
863           }
864           else cutCode =-14;
865         }
866         else cutCode = -13;
867       }
868     }
869     else cutCode = -12;
870     //for Lambda:
871     //TPC PID likelihoods high enough for pi- and proton ; invariant mass calculated accordingly
872     //if((fComPID[kNeg][AliPID::kPion] > fDownComPIDnegPart[AliPID::kPion]) && (fComPID[kPos][AliPID::kProton] > fDownComPIDpos[AliPID::kProton])) {
873     //if((fDetPID[kNeg][kTPC][AliPID::kPion] > fDownTPCPIDneg[AliPID::kPion]) && (fDetPID[kPos][kTPC][AliPID::kProton] > fDownTPCPIDpos[AliPID::kProton])){
874     if((TPCdEdxCuts(ipart, track))){//momentary solution: direct TPC dE/dx cuts
875       if(fPindex == trackID) {
876         if(fArmenteros[kLambda]){
877           if(fChi2ndf[kLambda] < fUpChi2ndf[kLambda]){
878             if((fInvMass[kLambda] < fUpInvMass[kLambda][iPSlot]) && (fInvMass[kLambda] > fDownInvMass[kLambda])){ 
879         return 1;
880             } else cutCode = -15;
881           }
882           else cutCode = -14;
883         }
884         else cutCode = -13;
885       }
886     }
887     else cutCode = -12;
888     return cutCode;
889   }
890  
891   //for K0s decays: equal TPC PID likelihood criteria for both daughters ; invariant mass calculated postulating two pions
892   if(ipart == AliPID::kPion) {
893     
894     if(fOpenAngle < (1.0/(fV0Momentum + 0.3) - 0.1))
895       return -9;
896     
897     //explicit exclusion of Lambda decays
898     if((fInvMass[kLambda] < fUpInvMass[kLambda][iPSlot]) && (fInvMass[kLambda] > fDownInvMass[kLambda])) return -11;
899     //explicit exclusion of Anti-Lambda decays
900     if((fInvMass[kAntiLambda] < fUpInvMass[kAntiLambda][iPSlot]) && (fInvMass[kAntiLambda] > fDownInvMass[kAntiLambda])) return -11;
901     
902     //if((fDetPID[kNeg][kTPC][ipart] < fDownTPCPIDneg[ipart]) || (fDetPID[kPos][kTPC][ipart] < fDownTPCPIDpos[ipart])) return -12;
903     if(!(TPCdEdxCuts(ipart, track))){//momentary solution: direct TPC dE/dx cuts
904       return -12;
905     }
906   }
907   
908   
909   //for photon conversions: equal combined PID likelihood criteria for both daughters ; invariant mass calculated postulating two electrons
910   //No Lambda/K0s exclusion is provided, since these contributions hardly ever interfere with gamma invariant mass!
911   //Float_t momentum(track->GetESDinfo()->GetOuterParam()->P());
912   if(ipart == AliPID::kElectron) {
913     //if(momentum > 1.75) {//since combined PID performs a little worse in simulations than TPC standalone for higher momenta, ONLY TPC PID is used here
914     //if((fDetPID[kNeg][kTPC][ipart] < fDownTPCPIDneg[ipart]) || (fDetPID[kPos][kTPC][ipart] < fDownTPCPIDpos[ipart])) return -12;
915     //} else {//for low momenta, combined PID from TOF and TPC is used to get rid of proton contamination
916     //if((fComPID[kNeg][ipart] > fDownComPIDneg[ipart]) && (fComPID[kPos][ipart] > fDownComPIDpos[ipart])) return 1;
917     //}
918     if(!(TPCdEdxCuts(ipart, track))){//momentary solution for direct TPC dE/dx cut
919       return -12;
920     }
921     
922   }
923   
924  
925   //Armenteros-Polanski cut
926   if(!(fArmenteros[iDecay])) return -13;
927   
928   //Kalman filter Chi2/NDF cut
929   if(fChi2ndf[iDecay] > fUpChi2ndf[iDecay]) return -14;
930
931   //Invariant mass cut for K0s and photons, assuming two pions/two electrons as daughters:
932  
933   if((fInvMass[iDecay] > fUpInvMass[iDecay][iPSlot]) || (fInvMass[iDecay] < fDownInvMass[iDecay])) {
934     return -15;
935     
936   }
937    
938   return 1;
939 }
940
941
942 //_________________________________________________
943 void AliTRDv0Info::Print(Option_t *opt) const
944 {
945   printf("V0 P[%d] N[%d]\n", fPindex, fNindex);
946   printf("  DCA[%5.3f] Radius[%5.3f]\n", fDCA, fRadius);
947   printf("  Angles : Pointing[%5.3f] Open[%5.3f] Psi[%5.3f]\n", fPointingAngle, fOpenAngle, fPsiPair);
948   if(strcmp(opt, "a")!=0) return;
949   printf("  Reconstructed PID\n"
950          "  sgn spec   ITS   TPC   TOF   COM\n");
951   for(Int_t idt=0; idt<kNDaughters; idt++){
952     printf("   %c", idt?'-':'+');
953     for(Int_t is(0); is<AliPID::kSPECIES; is++){ 
954       printf("%s%s%s", is==0?"   ":"       ", AliPID::ParticleShortName(is), (is==1||is==2)?"  ":"   ");
955       for(Int_t id(0); id<kNDetectors; id++){
956         printf("%5.1f ", 1.e2*fDetPID[idt][id][is]);
957       }
958       printf("%5.1f\n", 1.e2*fComPID[idt][is]);
959     }
960   }
961 }
962
963 //_________________________________________________
964 void AliTRDv0Info::SetV0tracks(AliESDtrack *p, AliESDtrack *n) 
965 {
966   fTrackP = p; fPindex = p->GetID();
967   fTrackN = n; fNindex = n->GetID();
968 }
969
970