79 std::vector<unsigned> retv;
80 for (
auto elem : elems)
82 retv.push_back(invec[elem]);
89 if (subvecelems.size()!=subvecidx.size()) {
90 return StatusCode::FAILURE;
92 for (
unsigned i = 0;
i < subvecelems.size();
i++)
94 if (subvecelems[
i] >=
idx.size()) {
95 return StatusCode::FAILURE;
97 idx[subvecelems[
i]] = subvecidx[
i];
99 return StatusCode::SUCCESS;
106 std::vector<ParSet> retv;
107 for (
unsigned corners = 0; corners <
unsigned((1 << scanpars.size())); corners++)
111 for (
auto &
par : scanpars)
113 newidx[
par] =
idx[
par] + ((corners >> scanDimCnt) & 1);
133 slicevarmin =
std::min(slicevarmin, slicevarhit);
134 slicevarmax =
std::max(slicevarmax, slicevarhit);
137 return ( slicevar > slicevarmin) && (slicevar < slicevarmax);
153 rowparmin =
std::min(rowparmin, rowparhit);
154 rowparmax =
std::max(rowparmax, rowparhit);
161 return {lowbin, highbin};
190 if (std::abs(
pars.qOverPt) > 0)
206 double r = hit->
getR();
207 double phi_hit = hit->
getGPhi();
225 double dr12x = xy2.first - xy1.first;
226 double dr12y = xy2.second - xy1.second;
227 double dr12mag = std::hypot(dr12x, dr12y);
228 double cos_rot = dr12y / dr12mag;
229 double sin_rot = -dr12x / dr12mag;
230 return std::pair<double, double>(cos_rot, sin_rot);
235 return std::pair<double, double>(xy.first * ang.first + xy.second * ang.second,
236 -xy.first * ang.second + xy.second * ang.first);
274 double ysqr = (xy2.first - xy1.first) * (xy2.first - xy1.first) + (xy2.second - xy1.second) * (xy2.second - xy1.second);
275 double sign = (
R > 0) - (
R < 0);
276 retv.
xm = -1 *
sign * (std::abs(
R) - sqrt(
R *
R - ysqr / 4.0));
296 double xm = keypars.
xm;
299 auto xy1p = rotated_coords.xy1p;
300 auto rotang = rotated_coords.rotang;
301 auto y = rotated_coords.y;
304 auto revang = rotang;
305 revang.second = -rotang.second;
309 double Rinv = 2 * xm / (xm * xm + (
y / 2) * (
y / 2));
310 double d = (
y *
y / 4.0 - xm * xm) / (2.0 * xm);
311 double sign = (xm > 0) - (xm < 0);
315 std::pair<double, double> xycp(-
d + xy1p.first,
y / 2.0 + xy1p.second);
342 auto xy1p = rotated_coords.xy1p;
343 auto rotang = rotated_coords.rotang;
344 auto y = rotated_coords.y;
347 double xh = xyhp.first - xy1p.first;
348 double yh = xyhp.second - xy1p.second;
351 double sign = ((yh > 0) && (yh <
y)) ? 1 : -1;
352 if ((std::abs(yh) < std::abs(xh)) || (std::abs(
y - yh) < std::abs(xh)))
354 return ((xh > 0) ? 1 : -1) * 100000;
357 double xm_taylor =
sign *
y *
y / (
y *
y - 4 * xh * xh - 4 * (yh -
y / 2.0) * (yh -
y / 2.0)) * xh;
367 auto rotang = rotated_coords.rotang;
371 double xh = xyhp.first-rotated_coords.xy1p.first;
381 auto rotang = rotated_coords.rotang;
382 auto y = rotated_coords.y;
386 double yh = xyhp.second-rotated_coords.xy1p.second;
388 return keypars.
xm * (keypars.
xm * keypars.
xm + yh * (
y - yh)) / (keypars.
xm * keypars.
xm + (
y / 2) * (
y / 2));