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();
188 double x1,
y1, x2,
y2;
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)) {
246 x2 = d_ab +
sign * rb;
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;
GlobalPoint position() const
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
ret
prodAgent to be discontinued
Geom::Phi< T > phi() const
Sin< T >::type sin(const T &t)
const GlobalTrajectoryParameters & globalParameters() const
Global3DPoint GlobalPoint
TrackCharge charge() const
const GlobalTrajectoryParameters & parameters() const
float distance() const override
GlobalPoint position() const
GlobalVector momentum() const
GlobalPoint globalPosition() const
TrackCharge charge() const
Cos< T >::type cos(const T &t)
std::pair< GlobalPoint, GlobalPoint > points() const override
GlobalVector momentum() const
Abs< T >::type abs(const T &t)
std::pair< GlobalTrajectoryParameters, GlobalTrajectoryParameters > trajectoryParameters() const
TrackCharge charge() const
bool calculate(const TrajectoryStateOnSurface &sta, const TrajectoryStateOnSurface &stb) override
T perp() const
Magnitude of transverse component.
const MagneticField & magneticField() const
GlobalVector globalMomentum() const
int transverseCoord(double cxa, double cya, double ra, double cxb, double cyb, double rb, double &xg1, double &yg1, double &xg2, double &yg2) const
static int position[264][3]
FreeTrajectoryState const * freeState(bool withErrors=true) const
double zCoord(const GlobalVector &mom, const GlobalPoint &pos, double r, double xc, double yc, double xg, double yg) const
void circleParameters(const TrackCharge &charge, const GlobalVector &momemtum, const GlobalPoint &position, double &xc, double &yc, double &r, const MagneticField &magField) const
GlobalPoint crossingPoint() const override