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 **************************************************************************/
16 //-------------------------------------------------------------------------
17 // Origin: Marian Ivanov marian.ivanov@cern.ch
18 //-------------------------------------------------------------------------
27 void AliKink::Update()
32 Float_t distance2=1000;
34 AliHelix dhelix1(fParamDaughter);
35 AliHelix mhelix(fParamMother);
37 //find intersection linear
39 Double_t phase[2][2],radius[2];
40 Double_t delta1=10000,delta2=10000;
44 Int_t points = dhelix1.GetRPHIintersections(mhelix, phase, radius,200);
47 dhelix1.LinearDCA(mhelix,phase[0][0],phase[0][1],radius[0],delta1);
50 dhelix1.LinearDCA(mhelix,phase[1][0],phase[1][1],radius[1],delta2);
52 distance1 = TMath::Min(delta1,delta2);
55 //find intersection parabolic
57 points = dhelix1.GetRPHIintersections(mhelix, phase, radius,7);
59 delta1=10000,delta2=10000;
60 Double_t d1=1000.,d2=10000.;
62 dhelix1.ParabolicDCA(mhelix,phase[0][0],phase[0][1],radius[0],delta1,6);
63 // dhelix1.ParabolicDCA(mhelix,phase[0][0],phase[0][1],radius[0],delta1);
65 dhelix1.Evaluate(phase[0][0],xd);
66 mhelix.Evaluate(phase[0][1],xm);
67 d1 = (xd[0]-xm[0])*(xd[0]-xm[0])+(xd[1]-xm[1])*(xd[1]-xm[1])+(xd[2]-xm[2])*(xd[2]-xm[2]);
70 dhelix1.ParabolicDCA(mhelix,phase[1][0],phase[1][1],radius[1],delta2,6);
71 //dhelix1.ParabolicDCA(mhelix,phase[1][0],phase[1][1],radius[1],delta2);
73 dhelix1.Evaluate(phase[1][0],xd);
74 mhelix.Evaluate(phase[1][1],xm);
75 d2 = (xd[0]-xm[0])*(xd[0]-xm[0])+(xd[1]-xm[1])*(xd[1]-xm[1])+(xd[2]-xm[2])*(xd[2]-xm[2]);
78 distance2 = TMath::Min(delta1,delta2);
81 // dhelix1.Evaluate(phase[0][0],fXr);
83 dhelix1.Evaluate(phase[0][0],xd);
84 mhelix.Evaluate(phase[0][1], xm);
85 fXr[0] = 0.5*(xd[0]+xm[0]);
86 fXr[1] = 0.5*(xd[1]+xm[1]);
87 fXr[2] = 0.5*(xd[2]+xm[2]);
89 dhelix1.GetMomentum(phase[0][0],fPdr);
90 mhelix.GetMomentum(phase[0][1],fPm);
91 dhelix1.GetAngle(phase[0][0],mhelix,phase[0][1],fAngle);
92 //fRr = TMath::Sqrt(radius[0]);
93 fRr = TMath::Sqrt(fXr[0]*fXr[0]+fXr[1]*fXr[1]);
96 //dhelix1.Evaluate(phase[1][0],fXr);
98 dhelix1.Evaluate(phase[1][0],xd);
99 mhelix.Evaluate(phase[1][1], xm);
100 fXr[0] = 0.5*(xd[0]+xm[0]);
101 fXr[1] = 0.5*(xd[1]+xm[1]);
102 fXr[2] = 0.5*(xd[2]+xm[2]);
104 dhelix1.GetMomentum(phase[1][0], fPdr);
105 mhelix.GetMomentum(phase[1][1], fPm);
106 dhelix1.GetAngle(phase[1][0],mhelix,phase[1][1],fAngle);
107 // fRr = TMath::Sqrt(radius[1]);
108 fRr = TMath::Sqrt(fXr[0]*fXr[0]+fXr[1]*fXr[1]);
110 fDist1 = TMath::Sqrt(TMath::Min(d1,d2));
111 fDist2 = TMath::Sqrt(distance2);