6 #include <vdt/vdtMath.h> 18 while(not
v.compare_exchange_weak(old,t)) {
22 mutable std::atomic<int>
v {100};
37 theQuadraticCrossingFromStart(point,direction,curvature,propDir),
51 double px = direction.
x();
52 double py = direction.
y();
53 double pz = direction.
z();
54 double pt2 = px*px+py*py;
55 double p2 = pt2+pz*pz;
56 double pI = 1./
sqrt(p2);
57 double ptI = 1./
sqrt(pt2);
66 std::pair<bool,double>
82 if (
std::abs(dz)<safeMaxDist)
return std::make_pair(
true,0.);
88 if unlikely(!notFail)
return std::make_pair(notFail,dSTotal);
96 if unlikely( newDir!=propDir )
return std::pair<bool,double>(
false,0);
109 LogDebug(
"HelixArbitraryPlaneCrossing") <<
"pathLength : no convergence";
110 return std::pair<bool,double>(
false,0);
122 auto deltaS2 = quadraticCrossing.
pathLength(plane);
125 if unlikely( !deltaS2.first )
return deltaS2;
129 dSTotal += deltaS2.second;
135 if unlikely( newDir!=propDir )
return std::pair<bool,double>(
false,0);
147 return std::make_pair(
true,dSTotal);
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 edm::EventSetup &iSetup)
T z() const
Cartesian z coordinate.
Abs< T >::type abs(const T &t)
PositionTypeDouble positionInDouble(double s) const
PositionType position(double s) const override
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
DirectionType direction(double s) const override
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)
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