6 #include <vdt/vdtMath.h>
18 while (not
v.compare_exchange_weak(old, t)) {
22 mutable std::atomic<int>
v{100};
36 : theQuadraticCrossingFromStart(point, direction, curvature, propDir),
49 double px = direction.
x();
50 double py = direction.
y();
51 double pz = direction.
z();
52 double pt2 = px * px + py * py;
53 double p2 = pt2 + pz * pz;
54 double pI = 1. /
sqrt(p2);
55 double ptI = 1. /
sqrt(pt2);
68 constexpr
int maxIterations = 20;
80 return std::make_pair(
true, 0.);
87 return std::make_pair(notFail, dSTotal);
96 return std::pair<bool, double>(
false, 0);
108 LogDebug(
"HelixArbitraryPlaneCrossing") <<
"pathLength : no convergence";
109 return std::pair<bool, double>(
false, 0);
118 auto deltaS2 = quadraticCrossing.
pathLength(plane);
125 dSTotal += deltaS2.second;
131 return std::pair<bool, double>(
false, 0);
143 return std::make_pair(
true, dSTotal);
225 const float maxDist)
const {
DirectionTypeDouble directionInDouble(double s) const
std::pair< bool, double > pathLength(const Plane &plane) override
HelixArbitraryPlaneCrossing2Order theQuadraticCrossingFromStart
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
DirectionTypeDouble directionInDouble(double s) const
static const float theNumericalPrecision
Basic3DVector< double > PositionTypeDouble
float localZ(const GlobalPoint &gp) const
const PropagationDirection thePropDir
static const float theMaxDistToPlane
T curvature(T InversePt, const MagneticField &field)
PositionType position(double s) const override
T z() const
Cartesian z coordinate.
Abs< T >::type abs(const T &t)
PositionTypeDouble positionInDouble(double s) const
static const MaxIter maxiter
PositionTypeDouble positionInDouble(double s) const
Basic3DVector< float > PositionType
the helix is passed to the constructor and does not appear in the interface
Basic3DVector< float > DirectionType
std::pair< bool, double > pathLength(const Plane &) override
Basic3DVector< double > DirectionTypeDouble
void operator()(int) const
bool notAtSurface(const Plane &, const PositionTypeDouble &, const float) const
HelixArbitraryPlaneCrossing(const PositionType &point, const DirectionType &direction, const float curvature, const PropagationDirection propDir=alongMomentum)
DirectionType direction(double s) const override
const PositionType & position() const
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point