26 std::pair<TrajectoryStateOnSurface,double>
28 const Plane& plane)
const 41 bool parametersOK = this->propagateParametersOnPlane(fts, plane, x, p, s);
43 float dphi2 =
float(s)*rho;
48 LogDebug(
"AnalyticalPropagator")<<
"not going anywhere. Already on surface.\n" 49 <<
"plane.localZ(fts.position()): "<<plane.
localZ(fts.
position())<<
"\n" 50 <<
"plane.position().mag(): "<<plane.
position().
mag() <<
"\n" 51 <<
"plane.posPrec: "<<plane.
posPrec();
65 return propagatedStateWithPath(fts,plane,gtp,s);
69 std::pair<TrajectoryStateOnSurface,double>
81 bool parametersOK = this->propagateParametersOnCylinder(fts, cylinder, x, p, s);
98 return propagatedStateWithPath(fts,*plane,gtp,s);
109 std::pair<TrajectoryStateOnSurface,double>
113 const double& s)
const 164 return propagateWithLineCrossing(fts.
position(),
p,cylinder,x,
s);
170 auto rdiff = x.perp() - cylinder.radius();
171 if (
std::abs(rdiff) < tolerance )
return true;
176 propagationDirection(),cylinder);
177 if UNLIKELY( !cylinderCrossing.hasSolution() )
return false;
179 s = cylinderCrossing.pathLength();
181 x = cylinderCrossing.position();
205 return propagateWithLineCrossing(fts.
position(),
p,plane,x,
s);
217 if LIKELY(isOldPropagationType) {
219 return propagateWithHelixCrossing(*planeCrossing,plane,fts.
momentum().
mag(),x,
p,
s);
230 LogDebug(
"AnalyticalPropagator") <<
"In AnaliticalProp, calling HAPC " <<
"\n" 231 <<
"plane is centered in xyz: " 232 << plane.position().x() <<
" , " 233 << plane.position().y() <<
" , " 234 << plane.position().z() <<
"\n";
243 LogDebug(
"AnalyticalPropagator") <<
"gp1 before calling planeCrossing1: " << gp1 <<
"\n";
253 bool check1 = propagateWithHelixCrossing(*planeCrossing1,plane,fts.
momentum().
mag(),gp1,gm1,s1);
254 double dphi1 = fabs(fts.
momentum().
phi()-gm1.phi());
255 LogDebug(
"AnalyticalPropagator") <<
"check1, s1, dphi, gp1: " 263 xGen = (*planeCrossing1).position(s1+tolerance);
264 pGen = (*planeCrossing1).direction(s1+tolerance);
282 LogDebug(
"AnalyticalPropagator") <<
"failed also second attempt. No idea what to do, then bailout" <<
"\n";
286 pGen *= gm1.
mag()/pGen.
mag();
295 bool check2 = propagateWithHelixCrossing(*planeCrossing2,plane,gm2.
mag(),gp2,gm2,
s2);
305 edm::LogError(
"AnalyticalPropagator") <<
"LOGIC ERROR: I should not have entered here!" <<
"\n";
310 LogDebug(
"AnalyticalPropagator") <<
"check2, s2, gp2: " 312 << s2 <<
" , " << gp2 <<
"\n";
315 double dist1 = (plane.position()-gp1).
perp();
316 double dist2 = (plane.position()-gp2).
perp();
319 LogDebug(
"AnalyticalPropagator") <<
"propDir, dist1, dist2: " 320 << propagationDirection() <<
" , " 330 }
else if(dist2<2*dist1){
336 if(fabs(s1)<fabs(s2)){
370 std::pair<bool,double> propResult = planeCrossing.
pathLength(plane);
371 if ( !propResult.first )
return false;
372 s = propResult.second;
394 std::pair<bool,double> propResult = cylCrossing.
pathLength(cylinder);
395 if ( !propResult.first )
return false;
396 s = propResult.second;
411 std::pair<bool,double> propResult = planeCrossing.
pathLength(plane);
412 if UNLIKELY( !propResult.first )
return false;
414 s = propResult.second;
418 pGen *= pmag/pGen.
mag();
ConstReferenceCountingPointer< TangentPlane > tangentPlane(const GlobalPoint &) const override
tangent plane to surface from global point
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
const GlobalTrajectoryParameters & parameters() const
const AlgebraicMatrix55 & jacobian() const
virtual PositionType position(double s) const =0
Geom::Phi< T > phi() const
Global3DPoint GlobalPoint
float localZ(const GlobalPoint &gp) const
bool propagateWithLineCrossing(const GlobalPoint &, const GlobalVector &, const Plane &, GlobalPoint &, double &) const
straight line parameter propagation to a plane
TrackCharge charge() const
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
GlobalVector momentum() const
virtual DirectionType direction(double s) const =0
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)
PositionType position(float s) const
GlobalVector momentum() const
std::pair< bool, double > pathLength(const Plane &plane) 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
GlobalPoint position(const double s) const
virtual std::pair< bool, double > pathLength(const Plane &)=0
double transverseCurvature() const
T perp() const
Magnitude of transverse component.
const AlgebraicSymMatrix55 & matrix() const
std::pair< TrajectoryStateOnSurface, double > TsosWP
std::pair< bool, double > pathLength(const Cylinder &cyl) const
const PositionType & position() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepStd< double, 5, 5 > > AlgebraicMatrix55
Global3DVector GlobalVector
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &fts, const Plane &plane) const override
propagation to plane with path length