21 inline float f_atan2f(
float y,
float x) {
return unsafe_atan2f<7>(
y,
x); }
23 inline float f_phi(
V v) {
24 return f_atan2f(
v.y(),
v.x());
35 return std::signbit(
t) ? -
T(1.) :
T(1.);
38 inline T clamped_acos(
T x) {
40 return unsafe_acos<5>(
x);
44 inline T clamped_sqrt(
T t) {
69 float orthog = clamped_sqrt(radius2 -
delta2);
71 float rc2 = lcenter.
mag2();
74 phi = f_phi(lcenter) +
sign * clamped_acos(
cos);
85 float orthog = clamped_sqrt(radius2 -
delta2);
113 double tmp1 = lip2 + tip2 - transverseIP2;
115 double tmp3 = 2. *
delta * origin;
116 double tmp4 = tmp1 +
delta2;
123 double u1 = 0,
u2 = 0;
141 double tmp6 = (tmp4 - tmp5) * (tmp4 + tmp5);
147 double tmp8 =
tip * (tmp1 -
delta2) / tmp2;
155 if ((tmp3 < 0) == (
tip < 0))
176 double invDist2 =
sqr(invDist);
178 return sgn(invDist) * curv;
186 double dist = 1.0 / invDist;
196 inline float arc(
float c,
float d) {
227 double halfAngle = (0.5 * maxAngle) * (
z2 - z1) / (z3 - z1);
237 Scalar lip = circle->axis.y() * circle->p1.x() - circle->axis.x() * circle->p1.y();
249 Scalar phi1 = clamped_acos(cos1);
250 Scalar phi2 = clamped_acos(cos2);
257 return z1 + ((
u1 >= seg &&
u1 <
u2) ?
u1 :
u2) * dzdu;
260 #include <vdt/sincos.h> 268 Scalar lip = circle->axis.y() * circle->p1.x() - circle->axis.x() * circle->p1.y();
273 Scalar minR2 = (2. * circle->center - circle->p1).
mag2();
294 vdt::fast_sincosf(
phi,
s,
c);
constexpr float approx_asin_P< 7 >(float z)
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
constexpr T normalizedPhi(T phi)
Sin< T >::type sin(const T &t)
T y() const
Cartesian y coordinate.
Scalar invCenterOnAxis(const Vector2D &thirdPoint) const
void swap(Association< C > &lhs, Association< C > &rhs)
T curvature(T InversePt, const MagneticField &field)
constexpr T proxim(T b, T a)
double transverseIP(const Vector2D &thirdPoint) const
Geom::Phi< T > phi() const
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t V
Scalar rAtZ(Scalar z) const
Cos< T >::type cos(const T &t)
Abs< T >::type abs(const T &t)
ThirdHitPredictionFromCircle::Scalar Scalar
Scalar zAtR(Scalar r) const
ThirdHitPredictionFromCircle(const GlobalPoint &P1, const GlobalPoint &P2, float tolerance)
static double maxCurvature(const ThirdHitPredictionFromCircle *circle, double z1, double z2, double z3)
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
PixelRecoRange< float > Range
Square< F >::type sqr(const F &f)
Basic2DVector< Scalar > Vector2D
float angle(float curvature, float radius) const
const ThirdHitPredictionFromCircle * circle
float phi(float curvature, float radius) const
Range operator()(Range curvature, float radius) const
T x() const
Cartesian x coordinate.
Range curvature(double transverseIP) const