13 return std::pair<double, double>(
r * cos(
phi),
r * sin(
phi));
18 double dr12x = xy2.first - xy1.first;
19 double dr12y = xy2.second - xy1.second;
20 double dr12mag = std::hypot(dr12x, dr12y);
21 double cos_rot = dr12y / dr12mag;
22 double sin_rot = -dr12x / dr12mag;
23 return std::pair<double, double>(cos_rot, sin_rot);
28 return std::pair<double, double>(xy.first * ang.first + xy.second * ang.second,
29 -xy.first * ang.second + xy.second * ang.first);
49 auto xyh =
getXY(rHit, phiHit);
67 double ysqr = (xy2.first - xy1.first) * (xy2.first - xy1.first) + (xy2.second - xy1.second) * (xy2.second - xy1.second);
68 double sign = (R > 0) - (R < 0);
69 retv.
xm = -1 *
sign * (std::abs(R) - sqrt(R * R - ysqr / 4.0));
89 double xm = keypars.
xm;
92 auto xy1p = rotated_coords.xy1p;
93 auto rotang = rotated_coords.rotang;
94 auto y = rotated_coords.y;
98 revang.second = -rotang.second;
102 double Rinv = 2 * xm / (xm * xm + (
y / 2) * (
y / 2));
103 double d = (
y *
y / 4.0 - xm * xm) / (2.0 * xm);
104 double sign = (xm > 0) - (xm < 0);
109 std::pair<double, double> xycp(-d + xy1p.first,
y / 2.0 + xy1p.second);
136 auto xy1p = rotated_coords.xy1p;
137 auto rotang = rotated_coords.rotang;
138 auto y = rotated_coords.y;
141 double xh = xyhp.first - xy1p.first;
142 double yh = xyhp.second - xy1p.second;
145 double sign = ((yh > 0) && (yh <
y)) ? 1 : -1;
146 if ((std::abs(yh) < std::abs(xh)) || (std::abs(
y - yh) < std::abs(xh)))
148 return ((xh > 0) ? 1 : -1) * 100000;
151 double xm_taylor =
sign *
y *
y / (
y *
y - 4 * xh * xh - 4 * (yh -
y / 2.0) * (yh -
y / 2.0)) * xh;
161 auto rotang = rotated_coords.rotang;
165 double xh = xyhp.first-rotated_coords.xy1p.first;
167 return xh -
xExpected(keypars,rHit, phiHit);
175 auto rotang = rotated_coords.rotang;
176 auto y = rotated_coords.y;
180 double yh = xyhp.second-rotated_coords.xy1p.second;
182 return keypars.
xm * (keypars.
xm * keypars.
xm + yh * (
y - yh)) / (keypars.
xm * keypars.
xm + (
y / 2) * (
y / 2));
Scalar phi() const
phi method
static double phiFromPars(double r, const FPGATrackSimTrackPars &pars)
static constexpr double CurvatureConstant
static double zFromPars(double r, const FPGATrackSimTrackPars &pars)
static double EtaFromTheta(double theta)