24 using namespace SurfaceSideDefinition;
27 const Plane& plane)
const {
39 bool parametersOK = this->propagateParametersOnPlane(fts, plane, x, p, s);
41 float dphi2 = float(s) * rho;
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();
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();
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
const GlobalTrajectoryParameters & parameters() const
const AlgebraicMatrix55 & jacobian() const
virtual DirectionType direction(double s) const =0
Geom::Phi< T > phi() const
Global3DPoint GlobalPoint
float localZ(const GlobalPoint &gp) const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepStd< double, 5, 5 > > AlgebraicMatrix55
bool propagateWithLineCrossing(const GlobalPoint &, const GlobalVector &, const Plane &, GlobalPoint &, double &) const
straight line parameter propagation to a plane
TrackCharge charge() const
Log< level::Error, false > LogError
const CurvilinearTrajectoryError & curvilinearError() 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)
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
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
GlobalVector momentum() const
bool propagateWithHelixCrossing(HelixPlaneCrossing &, const Plane &, const float, GlobalPoint &, GlobalVector &, double &s) const
helix parameter propagation to a plane using HelixPlaneCrossing
Abs< T >::type abs(const T &t)
uint16_t const *__restrict__ x
virtual std::pair< bool, double > pathLength(const Plane &)=0
GlobalVector momentum() const
GlobalPoint position() const
Vector3DBase unit() const
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)
GlobalPoint position() const
float localZclamped(const GlobalPoint &gp) const
std::pair< TrajectoryStateOnSurface, double > TsosWP
double transverseCurvature() const
virtual PositionType position(double s) const =0
T perp() const
Magnitude of transverse component.
const AlgebraicSymMatrix55 & matrix() const
const PositionType & position() const
Global3DVector GlobalVector