|
|
Go to the documentation of this file.
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.);
123 if (
d1.mag2() < d2.
mag2()) {
172 double sinPhi, cosPhi;
178 sinPhi = 1. - (
tmp *
tmp);
181 sinPhi = 2. *
tmp *
sqrt(sinPhi);
182 cosPhi = 1. - 2. * (
tmp *
tmp);
Basic2DVector< double > Vector2D
Basic3DVector< float > DirectionType
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Sin< T >::type sin(const T &t)
std::pair< bool, double > pathLength(const Plane &) override
T y() const
Cartesian y coordinate.
Cos< T >::type cos(const T &t)
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
Global3DPoint GlobalPoint
DirectionType direction(double s) const override
DirectionType theStartingDir
float localZ(const GlobalPoint &gp) const
PositionType theStartingPos
HelixBarrelPlaneCrossingByCircle(const PositionType &pos, const DirectionType &dir, double rho, PropagationDirection propDir=alongMomentum)
PositionType position(double s) const override
static const std::string B
bool samesign(T rh, T lh)
bool chooseSolution(const Vector2D &d1, const Vector2D &d2)
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
T x() const
Cartesian x coordinate.
PropagationDirection thePropDir
Abs< T >::type abs(const T &t)
T perp() const
Magnitude of transverse component.
std::pair< bool, double > pathLength(const Plane &plane) const
T z() const
Cartesian z coordinate.
Basic3DVector unit() const
static constexpr float d1
Basic3DVector< float > PositionType
the helix is passed to the constructor and does not appear in the interface
GlobalVector normalVector() const