42 float dir = (points[1].x() - points[0].x()) * (points[2].
y() - points[1].y()) -
43 (points[1].
y() - points[0].y()) * (points[2].
x() - points[1].x());
53 return (
dir > 0) ? -1 : 1;
62 inline float phi(
float xC,
float yC,
int charge) {
return (
charge > 0) ? std::atan2(xC, -yC) :
std::atan2(-xC, yC); }
73 float rho2 = curv * curv;
74 float r1s = (pinner - pca).
perp2();
75 double phi1 =
std::sqrt(r1s) * (curv * 0.5f) * (1.
f + r1s * (rho2 * o24));
76 float r2s = (pouter - pca).
perp2();
77 double phi2 =
std::sqrt(r2s) * (curv * 0.5f) * (1.
f + r2s * (rho2 * o24));
78 double z1 = pinner.
z();
79 double z2 = pouter.
z();
81 if (fabs(curv) > 1.
e-5)
82 return z1 - phi1 / (phi1 - phi2) * (z1 -
z2);
98 std::unique_ptr<reco::Track>
ret;
118 float valPhi, valTip, valPt;
120 int iCharge =
charge(points);
125 valPt = (invPt > 1.e-4
f) ? 1.
f / invPt : 1.e4f;
128 valPhi =
phi(center.
x(), center.
y(), iCharge);
133 valTip = -points[0].x() *
sin(valPhi) + points[0].y() *
cos(valPhi);
136 float valCotTheta = cotTheta(points[0], points[1]);
137 float valEta = std::asinh(valCotTheta);
138 float valZip =
zip(valTip, valPhi,
curvature, points[0], points[1]);
145 float errFactor = 1.;
151 float errValPt = errFactor * param.
errPt();
152 float errValCot = errFactor * param.
errCot();
153 float errValTip = errFactor * param.
errTip();
154 float errValPhi = errFactor * param.
errPhi();
155 float errValZip = errFactor * param.
errZip();
const MagneticField * theField
std::unique_ptr< reco::Track > run(const std::vector< const TrackingRecHit *> &hits, const TrackingRegion ®ion) const override
unsigned int pxbLayer(const DetId &id) const
ret
prodAgent to be discontinued
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE constexpr float zip(ConstView const &tracks, int32_t i)
Sin< T >::type sin(const T &t)
Global3DPoint GlobalPoint
T y() const
Cartesian y coordinate.
T curvature(T InversePt, const MagneticField &field)
T perp2() const
Squared magnitude of transverse component.
reco::Track * build(const Measurement1D &pt, const Measurement1D &phi, const Measurement1D &cotTheta, const Measurement1D &tip, const Measurement1D &zip, float chi2, int charge, const std::vector< const TrackingRecHit *> &hits, const MagneticField *mf, const GlobalPoint &reference=GlobalPoint(0, 0, 0)) const
float inverseBzAtOriginInGeV() const
The inverse of field z component for this map in GeV.
Cos< T >::type cos(const T &t)
Abs< T >::type abs(const T &t)
constexpr G4double scaleFactor
T inversePt(T curvature, const MagneticField &field)
constexpr float fhalfPi()
static constexpr float d0
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
const TrackerTopology * theTopo
#define declareDynArray(T, n, x)
const bool thescaleErrorsForBPix1
PixelFitterByHelixProjections(const TrackerTopology *ttopo, const MagneticField *field, bool scaleErrorsForBPix1, float scaleFactor)
T x() const
Cartesian x coordinate.
const float thescaleFactor