14 : theStartingPos(pos), theStartingDir(dir), theRho(rho), thePropDir(propDir) {
22 : theStartingPos(pos.basicVector()), theStartingDir(dir.basicVector()), theRho(rho), thePropDir(propDir) {
33 const double sraightLineCutoff = 1.e-7;
48 typedef std::pair<bool, double> ResultType;
69 if (fabs(nx) > fabs(ny)) {
72 dfac = distToPlane / nx;
73 B = distCy - nfac * distCx;
74 C = (2. * distCx + dfac) * dfac;
78 dfac = distToPlane / ny;
79 B = distCx - nfac * distCy;
80 C = (2. * distCy + dfac) * dfac;
86 double dx1, dx2, dy1, dy2;
89 return ResultType(
false,
theS = 0.);
94 dy1 = dfac - nfac * dx1;
95 dy2 = dfac - nfac * dx2;
99 dx1 = dfac - nfac * dy1;
100 dx2 = dfac - nfac * dy2;
109 sinAlpha = std::copysign(1., sinAlpha);
111 return ResultType(
true,
theS);
113 return ResultType(
false,
theS = 0.);
178 sinPhi = 1. - (tmp *
tmp);
181 sinPhi = 2. * tmp *
sqrt(sinPhi);
182 cosPhi = 1. - 2. * (tmp *
tmp);
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
PositionType theStartingPos
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
GlobalVector normalVector() const
Sin< T >::type sin(const T &t)
Basic3DVector unit() const
Global3DPoint GlobalPoint
float localZ(const GlobalPoint &gp) const
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
DirectionType theStartingDir
bool chooseSolution(const Vector2D &d1, const Vector2D &d2)
T z() const
Cartesian z coordinate.
DirectionType direction(double s) const override
Cos< T >::type cos(const T &t)
Abs< T >::type abs(const T &t)
static const std::string B
T perp() const
Magnitude of transverse component.
Basic3DVector< float > PositionType
the helix is passed to the constructor and does not appear in the interface
Basic3DVector< float > DirectionType
T y() const
Cartesian y coordinate.
std::pair< bool, double > pathLength(const Plane &plane) const
std::pair< bool, double > pathLength(const Plane &) override
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
Basic2DVector< double > Vector2D
PropagationDirection thePropDir
bool samesign(T rh, T lh)
HelixBarrelPlaneCrossingByCircle(const PositionType &pos, const DirectionType &dir, double rho, PropagationDirection propDir=alongMomentum)
static constexpr float d1
PositionType position(double s) const override
T x() const
Cartesian x coordinate.