File indexing completed on 2024-04-06 12:31:28
0001 #ifndef HelixExtrapolatorToLine2Order_h_
0002 #define HelixExtrapolatorToLine2Order_h_
0003
0004 #include "TrackingTools/GeomPropagators/interface/HelixLineExtrapolation.h"
0005 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h"
0006 #include "FWCore/Utilities/interface/Visibility.h"
0007
0008
0009
0010
0011 class HelixExtrapolatorToLine2Order final : public HelixLineExtrapolation {
0012 public:
0013
0014 HelixExtrapolatorToLine2Order(const PositionType& point,
0015 const DirectionType& direction,
0016 const float curvature,
0017 const PropagationDirection propDir = alongMomentum);
0018
0019
0020 HelixExtrapolatorToLine2Order(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 : thePosition(x0, y0, z0),
0030 theDirection(cosPhi0, sinPhi0, cosTheta / sinTheta),
0031 theSinTheta(sinTheta),
0032 theRho(rho),
0033 thePropDir(propDir) {}
0034
0035
0036 ~HelixExtrapolatorToLine2Order() override {}
0037
0038
0039
0040
0041
0042 std::pair<bool, double> pathLength(const GlobalPoint& point) const override;
0043
0044
0045
0046
0047
0048 std::pair<bool, double> pathLength(const Line& line) const override;
0049
0050
0051 PositionType position(double s) const override;
0052
0053
0054 DirectionType direction(double s) const override;
0055
0056
0057 PositionTypeDouble positionInDouble(double s) const;
0058
0059
0060 DirectionTypeDouble directionInDouble(double s) const;
0061
0062 private:
0063
0064 virtual std::pair<bool, double> pathLengthFromCoefficients(const double ceq[4]) const dso_internal;
0065
0066 int solve3rdOrder(const double ceq[], double sol[]) const dso_internal;
0067
0068 int solve2ndOrder(const double ceq[], double sol[]) const dso_internal;
0069
0070 private:
0071 const PositionTypeDouble thePosition;
0072 DirectionTypeDouble theDirection;
0073 double theSinTheta;
0074 const double theRho;
0075 const PropagationDirection thePropDir;
0076 };
0077
0078 #endif