27 const Plane& plane)
const {
39 bool parametersOK = this->propagateParametersOnPlane(fts, plane, x,
p,
s);
46 LogDebug(
"AnalyticalPropagator") <<
"not going anywhere. Already on surface.\n" 47 <<
"plane.localZ(fts.position()): " << plane.
localZ(fts.
position()) <<
"\n" 48 <<
"plane.position().mag(): " << plane.
position().
mag() <<
"\n" 49 <<
"plane.posPrec: " << plane.
posPrec();
63 return propagatedStateWithPath(fts, plane, gtp,
s);
76 bool parametersOK = this->propagateParametersOnCylinder(fts, cylinder, x,
p,
s);
78 float dphi2 =
s *
rho;
95 return propagatedStateWithPath(fts, *plane, gtp,
s);
110 const double&
s)
const {
156 return propagateWithLineCrossing(fts.
position(),
p, cylinder,
x,
s);
162 auto rdiff =
x.perp() - cylinder.radius();
169 if UNLIKELY (!cylinderCrossing.hasSolution())
172 s = cylinderCrossing.pathLength();
174 x = cylinderCrossing.position();
176 p = cylinderCrossing.direction().unit() * fts.
momentum().
mag();
193 return propagateWithLineCrossing(fts.
position(),
p, plane,
x,
s);
205 if LIKELY (isOldPropagationType) {
207 return propagateWithHelixCrossing(*planeCrossing, plane, fts.
momentum().
mag(),
x,
p,
s);
215 LogDebug(
"AnalyticalPropagator") <<
"In AnaliticalProp, calling HAPC " 217 <<
"plane is centered in xyz: " << plane.position().x() <<
" , " 218 << plane.position().y() <<
" , " << plane.position().z() <<
"\n";
226 LogDebug(
"AnalyticalPropagator") <<
"gp1 before calling planeCrossing1: " << gp1 <<
"\n";
236 bool check1 = propagateWithHelixCrossing(*planeCrossing1, plane, fts.
momentum().
mag(), gp1, gm1, s1);
237 double dphi1 = fabs(fts.
momentum().
phi() - gm1.phi());
238 LogDebug(
"AnalyticalPropagator") <<
"check1, s1, dphi, gp1: " << check1 <<
" , " << s1 <<
" , " << dphi1 <<
" , " 243 xGen = (*planeCrossing1).position(s1 +
tolerance);
244 pGen = (*planeCrossing1).direction(s1 +
tolerance);
262 LogDebug(
"AnalyticalPropagator") <<
"failed also second attempt. No idea what to do, then bailout" 266 pGen *= gm1.
mag() / pGen.
mag();
275 bool check2 = propagateWithHelixCrossing(*planeCrossing2, plane, gm2.
mag(), gp2, gm2, s2);
285 edm::LogError(
"AnalyticalPropagator") <<
"LOGIC ERROR: I should not have entered here!" 290 LogDebug(
"AnalyticalPropagator") <<
"check2, s2, gp2: " << check2 <<
" , " << s2 <<
" , " << gp2 <<
"\n";
292 double dist1 = (plane.position() - gp1).
perp();
293 double dist2 = (plane.position() - gp2).
perp();
295 LogDebug(
"AnalyticalPropagator") <<
"propDir, dist1, dist2: " << propagationDirection() <<
" , " << dist1 <<
" , " 299 if (dist1 < 2 * dist2) {
304 }
else if (dist2 < 2 * dist1) {
310 if (fabs(s1) < fabs(s2)) {
340 std::pair<bool, double> propResult = planeCrossing.pathLength(plane);
341 if (!propResult.first)
343 s = propResult.second;
362 std::pair<bool, double> propResult = cylCrossing.pathLength(cylinder);
363 if (!propResult.first)
365 s = propResult.second;
367 x = cylCrossing.position(
s);
379 std::pair<bool, double> propResult = planeCrossing.
pathLength(plane);
383 s = propResult.second;
387 pGen *= pmag / pGen.
mag();
const CurvilinearTrajectoryError & curvilinearError() const
bool propagateWithLineCrossing(const GlobalPoint &, const GlobalVector &, const Plane &, GlobalPoint &, double &) const
straight line parameter propagation to a plane
GlobalPoint position() const
virtual DirectionType direction(double s) const =0
Geom::Phi< T > phi() const
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Global3DPoint GlobalPoint
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepStd< double, 5, 5 > > AlgebraicMatrix55
ALPAKA_FN_ACC int side(int ieta, int iphi)
Log< level::Error, false > LogError
const GlobalTrajectoryParameters & parameters() const
GlobalPoint position() const
GlobalVector momentum() const
bool propagateWithHelixCrossing(HelixPlaneCrossing &, const Plane &, const float, GlobalPoint &, GlobalVector &, double &s) const
helix parameter propagation to a plane using HelixPlaneCrossing
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &fts, const Plane &plane) const override
propagation to plane with path length
ConstReferenceCountingPointer< TangentPlane > tangentPlane(const GlobalPoint &) const override
tangent plane to surface from global point
std::pair< TrajectoryStateOnSurface, double > propagatedStateWithPath(const FreeTrajectoryState &fts, const Surface &surface, const GlobalTrajectoryParameters >p, const double &s) const
propagation of errors (if needed) and generation of a new TSOS
TrackCharge charge() const
GlobalVector momentum() const
Abs< T >::type abs(const T &t)
virtual std::pair< bool, double > pathLength(const Plane &)=0
bool propagateParametersOnCylinder(const FreeTrajectoryState &fts, const Cylinder &cylinder, GlobalPoint &x, GlobalVector &p, double &s) const
parameter propagation to cylinder (returns position, momentum and path length)
T perp() const
Magnitude of transverse component.
float localZ(const GlobalPoint &gp) const
double transverseCurvature() const
const PositionType & position() const
bool propagateParametersOnPlane(const FreeTrajectoryState &fts, const Plane &plane, GlobalPoint &x, GlobalVector &p, double &s) const
parameter propagation to plane (returns position, momentum and path length)
const AlgebraicSymMatrix55 & matrix() const
std::pair< TrajectoryStateOnSurface, double > TsosWP
virtual PositionType position(double s) const =0
float localZclamped(const GlobalPoint &gp) const
Global3DVector GlobalVector
const AlgebraicMatrix55 & jacobian() const