CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HelixForwardPlaneCrossing.h
Go to the documentation of this file.
1 #ifndef HelixForwardPlaneCrossing_H_
2 #define HelixForwardPlaneCrossing_H_
3 
9 #include <limits>
10 
15 public:
19  const DirectionType& direction,
20  const float curvature,
21  const PropagationDirection propDir = alongMomentum);
22  // destructor
24 
28  std::pair<bool, double> pathLength(const Plane& plane) override {
29  //
30  // Protect against p_z=0 and calculate path length
31  //
33  return std::pair<bool, double>(false, 0);
34 
35  double dS = (plane.position().z() - theZ0) / theCosTheta;
36 
37  // negative logic to avoid checking for anyDirection...
38  return std::make_pair(!(((thePropDir == alongMomentum) & (dS < 0.)) |
39  ((thePropDir == oppositeToMomentum) & (dS > 0.)) | edm::isNotFinite(dS)),
40  dS);
41  }
42 
45  PositionType position(double s) const override;
46 
49  DirectionType direction(double s) const override;
50 
51 private:
52  //
53  // double precision vectors for internal use
54  //
57 
58  const double theX0, theY0, theZ0;
61  const double theRho;
62 
64 
65  mutable double theCachedS;
66  mutable double theCachedDPhi;
67  mutable double theCachedSDPhi;
68  mutable double theCachedCDPhi;
69 
70  static const float theNumericalPrecision;
71 };
72 
73 #endif
constexpr bool isNotFinite(T x)
Definition: isFinite.h:9
PropagationDirection
Definition: Plane.h:16
T curvature(T InversePt, const MagneticField &field)
std::pair< bool, double > pathLength(const Plane &plane) override
static const float theNumericalPrecision
DirectionType direction(double s) const override
T z() const
Cartesian z coordinate.
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HelixForwardPlaneCrossing(const PositionType &point, const DirectionType &direction, const float curvature, const PropagationDirection propDir=alongMomentum)
T min(T a, T b)
Definition: MathUtil.h:58
Basic3DVector< float > PositionType
the helix is passed to the constructor and does not appear in the interface
Basic3DVector< float > DirectionType
Basic3DVector< double > PositionTypeDouble
const PropagationDirection thePropDir
Basic3DVector< double > DirectionTypeDouble
PositionType position(double s) const override
#define UNLIKELY(x)
Definition: Likely.h:21
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
Definition: invegas.h:5