1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
17 ///////////////////////////////////////////////////////////////////////////////
19 // Time Projection Chamber //
20 // Comparison macro for reconstructed tracks - ESDs V0s //
22 // marian.ivanov@cern.ch //
37 #include "AliESDtrack.h"
38 #include "AliTPCParam.h"
39 #include "AliTrackReference.h"
40 #include "AliTPCParamSR.h"
42 #include "AliESDfriend.h"
43 #include "AliESDtrack.h"
44 #include "AliTPCseed.h"
45 #include "AliITStrackMI.h"
46 #include "AliTRDtrack.h"
48 #include "AliESDVertex.h"
49 #include "AliExternalTrackParam.h"
50 #include "AliESDkink.h"
54 #include "AliTreeDraw.h"
55 #include "AliMCInfo.h"
56 #include "AliGenKinkInfo.h"
57 #include "AliGenV0Info.h"
58 #include "AliESDRecKinkInfo.h"
62 ClassImp(AliESDRecKinkInfo)
69 void AliESDRecKinkInfo::Update()
72 if ( (fT1.fTPCOn)&& (fT2.fTPCOn)){
74 // IF BOTH RECONSTRUCTED
75 Float_t distance1,distance2;
78 Double_t xd[3],pd[3],signd;
79 Double_t xm[3],pm[3],signm;
80 for (Int_t i=0;i<3;i++){
81 xd[i] = fT2.fTPCinR1[i];
82 pd[i] = fT2.fTPCinP1[i];
83 xm[i] = fT1.fTPCinR1[i];
84 pm[i] = fT1.fTPCinP1[i];
86 signd = fT2.fSign<0 ? -1:1;
87 signm = fT1.fSign<0 ? -1:1;
89 AliHelix dhelix1(xd,pd,signd);
90 dhelix1.GetMomentum(0,pp,0);
91 dhelix1.Evaluate(0,xx);
93 // Double_t x2[3],p2[3];
95 AliHelix mhelix(xm,pm,signm);
97 //find intersection linear
99 Double_t phase[2][2],radius[2];
100 Int_t points = dhelix1.GetRPHIintersections(mhelix, phase, radius,200);
101 Double_t delta1=10000,delta2=10000;
104 fMinR = TMath::Sqrt(radius[0]);
107 fMinR =TMath::Min(TMath::Sqrt(radius[0]),TMath::Sqrt(radius[1]));
111 dhelix1.LinearDCA(mhelix,phase[0][0],phase[0][1],radius[0],delta1);
112 dhelix1.LinearDCA(mhelix,phase[0][0],phase[0][1],radius[0],delta1);
113 dhelix1.LinearDCA(mhelix,phase[0][0],phase[0][1],radius[0],delta1);
116 dhelix1.LinearDCA(mhelix,phase[1][0],phase[1][1],radius[1],delta2);
117 dhelix1.LinearDCA(mhelix,phase[1][0],phase[1][1],radius[1],delta2);
118 dhelix1.LinearDCA(mhelix,phase[1][0],phase[1][1],radius[1],delta2);
121 fMinR = TMath::Sqrt(radius[0]);
125 if (radius[0]<radius[1]){
126 fMinR = TMath::Sqrt(radius[0]);
130 fMinR = TMath::Sqrt(radius[1]);
136 distance1 = TMath::Min(delta1,delta2);
138 //find intersection parabolic
140 points = dhelix1.GetRPHIintersections(mhelix, phase, radius);
141 delta1=10000,delta2=10000;
144 dhelix1.ParabolicDCA(mhelix,phase[0][0],phase[0][1],radius[0],delta1);
147 dhelix1.ParabolicDCA(mhelix,phase[1][0],phase[1][1],radius[1],delta2);
150 distance2 = TMath::Min(delta1,delta2);
153 dhelix1.Evaluate(phase[0][0],fXr);
154 dhelix1.GetMomentum(phase[0][0],fPdr);
155 mhelix.GetMomentum(phase[0][1],fPm);
156 dhelix1.GetAngle(phase[0][0],mhelix,phase[0][1],fAngle);
157 fRr = TMath::Sqrt(radius[0]);
160 dhelix1.Evaluate(phase[1][0],fXr);
161 dhelix1.GetMomentum(phase[1][0], fPdr);
162 mhelix.GetMomentum(phase[1][1], fPm);
163 dhelix1.GetAngle(phase[1][0],mhelix,phase[1][1],fAngle);
164 fRr = TMath::Sqrt(radius[1]);
166 fDist1 = TMath::Sqrt(distance1);
167 fDist2 = TMath::Sqrt(distance2);
170 Double_t x,alpha,param[5],cov[15];
172 fT1.GetESDtrack()->GetInnerExternalParameters(alpha,x,param);
173 fT1.GetESDtrack()->GetInnerExternalCovariance(cov);
174 AliExternalTrackParam paramm(x,alpha,param,cov);
176 fT2.GetESDtrack()->GetInnerExternalParameters(alpha,x,param);
177 fT2.GetESDtrack()->GetInnerExternalCovariance(cov);
178 AliExternalTrackParam paramd(x,alpha,param,cov);
181 kink.Update(¶mm,¶md);
183 Double_t diff = kink.fRr-fRr;
184 Double_t diff2 = kink.fDist2-fDist2;
185 printf("Diff\t%f\t%f\n",diff,diff2);