CMS 3D CMS Logo

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
Likely.h
HelixForwardPlaneCrossing::theX0
const double theX0
Definition: HelixForwardPlaneCrossing.h:58
edm::isNotFinite
constexpr bool isNotFinite(T x)
Definition: isFinite.h:9
min
T min(T a, T b)
Definition: MathUtil.h:58
HelixPlaneCrossing::DirectionType
Basic3DVector< float > DirectionType
Definition: HelixPlaneCrossing.h:23
oppositeToMomentum
Definition: PropagationDirection.h:4
HelixForwardPlaneCrossing::theSinPhi0
double theSinPhi0
Definition: HelixForwardPlaneCrossing.h:59
HelixForwardPlaneCrossing::direction
DirectionType direction(double s) const override
Definition: HelixForwardPlaneCrossing.cc:68
HelixForwardPlaneCrossing::theZ0
const double theZ0
Definition: HelixForwardPlaneCrossing.h:58
PixelRecoUtilities::curvature
T curvature(T InversePt, const edm::EventSetup &iSetup)
Definition: PixelRecoUtilities.h:42
Plane.h
UNLIKELY
#define UNLIKELY(x)
Definition: Likely.h:21
alignCSCRings.s
s
Definition: alignCSCRings.py:92
HelixForwardPlaneCrossing::theCachedCDPhi
double theCachedCDPhi
Definition: HelixForwardPlaneCrossing.h:68
HelixForwardPlaneCrossing::HelixForwardPlaneCrossing
HelixForwardPlaneCrossing(const PositionType &point, const DirectionType &direction, const float curvature, const PropagationDirection propDir=alongMomentum)
Definition: HelixForwardPlaneCrossing.cc:6
HelixForwardPlaneCrossing::theCosTheta
double theCosTheta
Definition: HelixForwardPlaneCrossing.h:60
HelixForwardPlaneCrossing::PositionTypeDouble
Basic3DVector< double > PositionTypeDouble
Definition: HelixForwardPlaneCrossing.h:55
HelixForwardPlaneCrossing::theCachedDPhi
double theCachedDPhi
Definition: HelixForwardPlaneCrossing.h:66
HelixForwardPlaneCrossing::theSinTheta
double theSinTheta
Definition: HelixForwardPlaneCrossing.h:60
HelixForwardPlaneCrossing::theCosPhi0
double theCosPhi0
Definition: HelixForwardPlaneCrossing.h:59
PropagationDirection.h
HelixForwardPlaneCrossing::position
PositionType position(double s) const override
Definition: HelixForwardPlaneCrossing.cc:38
HelixPlaneCrossing
Definition: HelixPlaneCrossing.h:13
GloballyPositioned::position
const PositionType & position() const
Definition: GloballyPositioned.h:36
HelixForwardPlaneCrossing::theY0
const double theY0
Definition: HelixForwardPlaneCrossing.h:58
isFinite.h
HelixForwardPlaneCrossing::theCachedSDPhi
double theCachedSDPhi
Definition: HelixForwardPlaneCrossing.h:67
HelixForwardPlaneCrossing::theCachedS
double theCachedS
Definition: HelixForwardPlaneCrossing.h:65
HelixForwardPlaneCrossing::theRho
const double theRho
Definition: HelixForwardPlaneCrossing.h:61
HelixForwardPlaneCrossing::pathLength
std::pair< bool, double > pathLength(const Plane &plane) override
Definition: HelixForwardPlaneCrossing.h:28
PropagationDirection
PropagationDirection
Definition: PropagationDirection.h:4
HelixForwardPlaneCrossing::DirectionTypeDouble
Basic3DVector< double > DirectionTypeDouble
Definition: HelixForwardPlaneCrossing.h:56
HelixForwardPlaneCrossing::~HelixForwardPlaneCrossing
~HelixForwardPlaneCrossing() override
Definition: HelixForwardPlaneCrossing.h:23
Plane
Definition: Plane.h:16
HelixForwardPlaneCrossing
Definition: HelixForwardPlaneCrossing.h:14
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
point
*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
HelixForwardPlaneCrossing::theNumericalPrecision
static const float theNumericalPrecision
Definition: HelixForwardPlaneCrossing.h:70
Basic3DVector::z
T z() const
Cartesian z coordinate.
Definition: extBasic3DVector.h:100
alongMomentum
Definition: PropagationDirection.h:4
Basic3DVector< float >
HelixPlaneCrossing.h
HelixPlaneCrossing::PositionType
Basic3DVector< float > PositionType
the helix is passed to the constructor and does not appear in the interface
Definition: HelixPlaneCrossing.h:22
HelixForwardPlaneCrossing::thePropDir
const PropagationDirection thePropDir
Definition: HelixForwardPlaneCrossing.h:63