31 return calculate(chargeA, momentumA, positionA, chargeB, momentumB, positionB, sta.
parameters().
magneticField());
37 "TrackingTools/PatternTools",
38 "TangentApproachInRPhi::could not compute track crossing. Check status before calling this method!");
39 return pair<GlobalPoint, GlobalPoint>(posA, posB);
45 "TrackingTools/PatternTools",
46 "TangentApproachInRPhi::could not compute track crossing. Check status before calling this method!");
47 return GlobalPoint((posA.x() + posB.x()) / 2., (posA.y() + posB.y()) / 2., (posA.z() + posB.z()) / 2.);
53 "TrackingTools/PatternTools",
54 "TangentApproachInRPhi::could not compute track crossing. Check status before calling this method!");
55 return (posB - posA).mag();
61 "TrackingTools/PatternTools",
62 "TangentApproachInRPhi::could not compute track crossing. Check status before calling this method!");
64 float perpdist = (posB - posA).
perp();
82 circleParameters(chargeA, momentumA, positionA, xca, yca, ra, magField);
84 circleParameters(chargeB, momentumB, positionB, xcb, ycb, rb, magField);
87 double xg1, yg1, xg2, yg2;
88 int flag = transverseCoord(xca, yca, ra, xcb, ycb, rb, xg1, yg1, xg2, yg2);
94 double xga, yga, zga, xgb, ygb, zgb;
99 intersection_ =
false;
105 zga = zCoord(momentumA, positionA, ra, xca, yca, xga, yga);
108 zgb = zCoord(momentumB, positionB, rb, xcb, ycb, xgb, ygb);
119 "TrackingTools/PatternTools",
120 "TangentApproachInRPhi::could not compute track crossing. Check status before calling this method!");
121 pair<GlobalTrajectoryParameters, GlobalTrajectoryParameters>
ret(trajectoryParameters(posA, paramA),
122 trajectoryParameters(posB, paramB));
135 double dx2 = newpt.
x() - xc;
136 double dy2 = newpt.
y() - yc;
139 double cosphi = (dx1 * dx2 + dy1 * dy2) / (
sqrt(dx1 * dx1 + dy1 * dy1) *
sqrt(dx2 * dx2 + dy2 * dy2));
140 double sinphi = -oldgtp.
charge() *
sqrt(1 - cosphi * cosphi);
172 double phi = momentum.
phi();
193 double d_ab =
sqrt((cxb - cxa) * (cxb - cxa) + (cyb - cya) * (cyb - cya));
198 double u = (cxb - cxa) / d_ab;
199 double v = (cyb - cya) / d_ab;
202 if (d_ab <= ra + rb && d_ab >=
abs(rb - ra)) {
225 }
else if (d_ab > ra + rb) {
235 }
else if (d_ab <
abs(rb - ra)) {
253 xg1 = u *
x1 -
v *
y1 + cxa;
254 yg1 =
v *
x1 + u *
y1 + cya;
255 xg2 = u *
x2 -
v *
y2 + cxa;
256 yg2 =
v *
x2 + u *
y2 + cya;
276 double sinHalfPhi =
sqrt((x - xg) * (x - xg) + (y - yg) * (y - yg)) / (2 *
r);
277 if (sinHalfPhi < 0.383) {
278 phi = 2 * asin(sinHalfPhi);
280 double cosPhi = ((x - xc) * (xg - xc) + (y - yc) * (yg - yc)) / (
r *
r);
286 double signPhi = ((x - xc) * (yg - yc) - (xg - xc) * (y - yc) > 0) ? 1. : -1.;
290 double signOmega = ((x - xc) *
py - (y - yc) *
px > 0) ? 1. : -1.;
295 double dz = signPhi * signOmega * (pz / mom.
transverse()) * phi *
r;