CMS 3D CMS Logo

HelixForwardPlaneCrossing.h
Go to the documentation of this file.
1 #ifndef HelixForwardPlaneCrossing_H_
2 #define HelixForwardPlaneCrossing_H_
3 
8 #include <limits>
9 
14 public:
18  const DirectionType& direction,
19  const float curvature,
20  const PropagationDirection propDir = alongMomentum);
21  // destructor
23 
27  std::pair<bool, double> pathLength(const Plane& plane) override {
28  //
29  // Protect against p_z=0 and calculate path length
30  //
31  if
32  UNLIKELY(std::abs(theCosTheta) < std::numeric_limits<float>::min()) return std::pair<bool, double>(false, 0);
33 
34  double dS = (plane.position().z() - theZ0) / theCosTheta;
35 
36  // negative logic to avoid checking for anyDirection...
37  return std::make_pair(
38  !(((thePropDir == alongMomentum) & (dS < 0.)) | ((thePropDir == oppositeToMomentum) & (dS > 0.))), dS);
39  }
40 
43  PositionType position(double s) const override;
44 
47  DirectionType direction(double s) const override;
48 
49 private:
50  //
51  // double precision vectors for internal use
52  //
55 
56  const double theX0, theY0, theZ0;
59  const double theRho;
60 
62 
63  mutable double theCachedS;
64  mutable double theCachedDPhi;
65  mutable double theCachedSDPhi;
66  mutable double theCachedCDPhi;
67 
68  static const float theNumericalPrecision;
69 };
70 
71 #endif
Likely.h
HelixForwardPlaneCrossing::theX0
const double theX0
Definition: HelixForwardPlaneCrossing.h:56
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:57
HelixForwardPlaneCrossing::direction
DirectionType direction(double s) const override
Definition: HelixForwardPlaneCrossing.cc:68
HelixForwardPlaneCrossing::theZ0
const double theZ0
Definition: HelixForwardPlaneCrossing.h:56
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:66
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:58
HelixForwardPlaneCrossing::PositionTypeDouble
Basic3DVector< double > PositionTypeDouble
Definition: HelixForwardPlaneCrossing.h:53
HelixForwardPlaneCrossing::theCachedDPhi
double theCachedDPhi
Definition: HelixForwardPlaneCrossing.h:64
HelixForwardPlaneCrossing::theSinTheta
double theSinTheta
Definition: HelixForwardPlaneCrossing.h:58
HelixForwardPlaneCrossing::theCosPhi0
double theCosPhi0
Definition: HelixForwardPlaneCrossing.h:57
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:56
HelixForwardPlaneCrossing::theCachedSDPhi
double theCachedSDPhi
Definition: HelixForwardPlaneCrossing.h:65
HelixForwardPlaneCrossing::theCachedS
double theCachedS
Definition: HelixForwardPlaneCrossing.h:63
HelixForwardPlaneCrossing::theRho
const double theRho
Definition: HelixForwardPlaneCrossing.h:59
HelixForwardPlaneCrossing::pathLength
std::pair< bool, double > pathLength(const Plane &plane) override
Definition: HelixForwardPlaneCrossing.h:27
PropagationDirection
PropagationDirection
Definition: PropagationDirection.h:4
HelixForwardPlaneCrossing::DirectionTypeDouble
Basic3DVector< double > DirectionTypeDouble
Definition: HelixForwardPlaneCrossing.h:54
HelixForwardPlaneCrossing::~HelixForwardPlaneCrossing
~HelixForwardPlaneCrossing() override
Definition: HelixForwardPlaneCrossing.h:22
Plane
Definition: Plane.h:16
HelixForwardPlaneCrossing
Definition: HelixForwardPlaneCrossing.h:13
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:68
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:61