File indexing completed on 2024-04-06 12:31:28
0001 #ifndef HELIXARBITRARYPLANECROSSING2ORDER_H_
0002 #define HELIXARBITRARYPLANECROSSING2ORDER_H_
0003 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h"
0004 #include "TrackingTools/GeomPropagators/interface/HelixPlaneCrossing.h"
0005 #include "FWCore/Utilities/interface/Visibility.h"
0006
0007
0008
0009
0010 class HelixArbitraryPlaneCrossing2Order final : public HelixPlaneCrossing {
0011 public:
0012
0013
0014 HelixArbitraryPlaneCrossing2Order(const PositionType& point,
0015 const DirectionType& direction,
0016 const float curvature,
0017 const PropagationDirection propDir = alongMomentum);
0018
0019
0020 HelixArbitraryPlaneCrossing2Order(const double& x0,
0021 const double& y0,
0022 const double& z0,
0023 const double& cosPhi0,
0024 const double& sinPhi0,
0025 const double& cosTheta,
0026 const double& sinTheta,
0027 const double& rho,
0028 const PropagationDirection propDir = alongMomentum)
0029 : theX0(x0),
0030 theY0(y0),
0031 theZ0(z0),
0032 theCosPhi0(cosPhi0),
0033 theSinPhi0(sinPhi0),
0034 theCosTheta(cosTheta),
0035 theSinThetaI(1. / sinTheta),
0036 theRho(rho),
0037 thePropDir(propDir) {}
0038
0039
0040 ~HelixArbitraryPlaneCrossing2Order() override {}
0041
0042
0043
0044
0045
0046 std::pair<bool, double> pathLength(const Plane&) override;
0047
0048
0049
0050 PositionType position(double s) const override;
0051
0052
0053
0054 DirectionType direction(double s) const override;
0055
0056
0057
0058 typedef Basic3DVector<double> PositionTypeDouble;
0059 typedef Basic3DVector<double> DirectionTypeDouble;
0060
0061
0062
0063 PositionTypeDouble positionInDouble(double s) const;
0064
0065
0066
0067 DirectionTypeDouble directionInDouble(double s) const;
0068
0069
0070
0071 inline double smallestPathLength(const double firstPathLength, const double secondPathLength) const {
0072 return fabs(firstPathLength) < fabs(secondPathLength) ? firstPathLength : secondPathLength;
0073 }
0074
0075 private:
0076
0077
0078 std::pair<bool, double> solutionByDirection(const double dS1, const double dS2) const dso_internal;
0079
0080 private:
0081 const double theX0, theY0, theZ0;
0082 double theCosPhi0, theSinPhi0;
0083 double theCosTheta, theSinThetaI;
0084 const double theRho;
0085 const PropagationDirection thePropDir;
0086 };
0087
0088 #endif