25 using namespace SurfaceSideDefinition;
27 std::pair<TrajectoryStateOnSurface,double>
29 const Plane& plane)
const
40 const float maxDistToPlane(0.1e-4);
41 const float numericalPrecision(5.e-7);
42 float maxDz = numericalPrecision*plane.
position().
mag();
43 if ( fabs(plane.
localZ(fts.
position()))>(maxDistToPlane>maxDz?maxDistToPlane:maxDz) ) {
45 bool parametersOK = this->propagateParametersOnPlane(fts, plane, x, p, s);
52 LogDebug(
"AnalyticalPropagator")<<
"not going anywhere. Already on surface.\n"
53 <<
"plane.localZ(fts.position()): "<<plane.
localZ(fts.
position())<<
"\n"
54 <<
"maxDistToPlane: "<<maxDistToPlane<<
"\n"
55 <<
"maxDz: "<<maxDz<<
"\n"
56 <<
"plane.position().mag(): "<<plane.
position().
mag();
65 if ( fabs(rho)>1.e-10 && fabs((gtp.transverseCurvature()-
rho)/rho)>theMaxDBzRatio )
70 return propagatedStateWithPath(fts,plane,gtp,s);
74 std::pair<TrajectoryStateOnSurface,double>
86 bool parametersOK = this->propagateParametersOnCylinder(fts, cylinder, x, p, s);
95 if ( fabs(rho)>1.e-10 && fabs((gtp.transverseCurvature()-
rho)/rho)>theMaxDBzRatio )
101 return propagatedStateWithPath(fts,*plane,gtp,s);
104 std::pair<TrajectoryStateOnSurface,double>
108 const double&
s)
const
143 if (sp.
x()!=0. || sp.
y()!=0.) {
156 if( fabs(rho)<1.e-10 )
157 return propagateWithLineCrossing(fts.
position(),
p,cylinder,
x,
s);
162 const double tolerance = 1.e-4;
163 double rdiff = x.perp() - cylinder.radius();
164 if ( fabs(rdiff) < tolerance )
return true;
169 propagationDirection(),cylinder);
170 if ( !cylinderCrossing.hasSolution() )
return false;
174 x = cylinderCrossing.position();
197 if( fabs(rho)<1.e-10 )
198 return propagateWithLineCrossing(fts.
position(),
p,plane,
x,
s);
203 const double small = 1.e-6;
211 if (fabs(u.z()) < small) {
215 return propagateWithHelixCrossing(planeCrossing,plane,fts.
momentum().
mag(),
x,
p,
s);
217 if (fabs(u.x()) < small && fabs(u.y()) < small) {
221 return propagateWithHelixCrossing(planeCrossing,plane,fts.
momentum().
mag(),
x,
p,
s);
227 return propagateWithHelixCrossing(planeCrossing,plane,fts.
momentum().
mag(),
x,
p,
s);
248 std::pair<bool,double> propResult = planeCrossing.
pathLength(plane);
249 if ( !propResult.first )
return false;
250 s = propResult.second;
272 std::pair<bool,double> propResult = cylCrossing.
pathLength(cylinder);
273 if ( !propResult.first )
return false;
274 s = propResult.second;
289 std::pair<bool,double> propResult = planeCrossing.
pathLength(plane);
290 if ( !propResult.first )
return false;
291 s = propResult.second;
297 pGen *= pmag/pGen.
mag();
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
virtual ReferenceCountingPointer< TangentPlane > tangentPlane(const GlobalPoint &) const
tangent plane to surface from global point
const GlobalTrajectoryParameters & parameters() const
virtual DirectionType direction(double s) const =0
Global3DPoint GlobalPoint
float localZ(const GlobalPoint &gp) const
Fast access to distance from plane for a point.
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
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &fts, const Plane &plane) const
propagation to plane with path length
GlobalVector momentum() const
bool propagateWithHelixCrossing(HelixPlaneCrossing &, const Plane &, const float, GlobalPoint &, GlobalVector &, double &s) const
helix parameter propagation to a plane using HelixPlaneCrossing
virtual const AlgebraicMatrix55 & jacobian() const
GlobalVector momentum() const
std::pair< bool, double > pathLength(const Plane &plane) const
double pathLength() const
GlobalPoint position() const
PositionType position(double s) 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
GlobalPoint position(const double s) const
virtual std::pair< bool, double > pathLength(const Plane &)=0
double transverseCurvature() const
virtual PositionType position(double s) const =0
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