26 std::pair<TrajectoryStateOnSurface,double>
28 const Plane& plane)
const 38 std::pair< TrajectoryStateOnSurface, double>
52 const Plane& plane)
const 57 double startZ = plane.
localZ(gpos);
71 LogDebug(
"RKPropagatorInS")<<
" startZ = "<<startZ;
74 LogDebug(
"RKPropagatorInS")<<
"Propagation is not performed: state is already on final surface.";
86 std::pair<bool,double> propResult = planeCrossing.
pathLength(plane);
88 double s = propResult.second;
95 LogDebug(
"RKPropagatorInS")<<
"Straight line propgation to plane failed !!";
106 LogDebug(
"RKPropagatorInS") <<
"The starting position is " << ts.
position() <<
" (global) " 111 LogDebug(
"RKPropagatorInS") <<
"The plane position is " << plane.
position() <<
" (global) " 112 << localPlane.position() <<
" (local) " ;
117 std::pair<bool,double> res3 =
cross.pathLength(plane);
118 LogDebug(
"RKPropagatorInS") <<
"straight line distance " << res3.first <<
" " << res3.second ;
138 while (safeGuard++<100) {
141 std::pair<bool,double>
path = pathLength( plane, startState.
position(),
143 (double) ts.
charge(), currentDirection);
145 LogDebug(
"RKPropagatorInS") <<
"RKPropagatorInS: Path length calculation to plane failed!" 147 <<
"...Local starting position in volume " << startState.
position()
154 LogDebug(
"RKPropagatorInS") <<
"RKPropagatorInS: Path lenght to plane is " << path.second ;
157 double sstep = path.second;
159 LogDebug(
"RKPropagatorInS") <<
"On-surface accuracy not reached, but pathLength calculation says we are there! " 160 <<
"path " << path.second <<
" distance to plane is " << startZ ;
165 LogDebug(
"RKPropagatorInS") <<
"RKPropagatorInS: Solving for " << sstep
166 <<
" current distance to plane is " << startZ ;
168 RKVector rkresult = solver( 0, start, sstep, deriv, dist, eps);
173 if ( fabs(remainingZ) < eps) {
174 LogDebug(
"RKPropagatorInS") <<
"On-surface accuracy reached! " << remainingZ ;
181 if (remainingZ * startZ > 0) {
182 LogDebug(
"RKPropagatorInS") <<
"Accuracy not reached yet, trying in same direction again " 186 LogDebug(
"RKPropagatorInS") <<
"Accuracy not reached yet, trying in opposite direction " 193 edm::LogError(
"FailedPropagation") <<
" too many iterations trying to reach plane ";
214 double startR = cyl.
radius() -
pos.perp();
238 std::pair<bool,double> propResult = cylCrossing.
pathLength(cyl);
240 double s = propResult.second;
244 LogDebug(
"RKPropagatorInS") <<
"Straight line propagation to cylinder succeeded !!";
249 edm::LogError(
"RKPropagatorInS") <<
"Straight line propagation to cylinder failed !!";
267 while (safeGuard++<100) {
271 currentDirection, eps);
275 LogDebug(
"RKPropagatorInS") <<
"RKPropagatorInS: Path length calculation to cylinder failed!" 280 LogDebug(
"RKPropagatorInS") <<
"RKPropagatorInS: Path lenght to cylinder is " << path.second
283 <<
" to R " << cyl.
radius()
287 double sstep = path.second;
289 LogDebug(
"RKPropagatorInS") <<
"accuracy not reached, but pathLength calculation says we are there! " 298 LogDebug(
"RKPropagatorInS") <<
"RKPropagatorInS: Solving for " << sstep
299 <<
" current distance to cylinder is " << startR ;
301 RKVector rkresult = solver( 0, start, sstep, deriv, dist, eps);
306 if ( fabs(remainingR) < eps) {
307 LogDebug(
"RKPropagatorInS") <<
"Accuracy reached! " << remainingR ;
315 if (remainingR * startR > 0) {
316 LogDebug(
"RKPropagatorInS") <<
"Accuracy not reached yet, trying in same direction again " 320 LogDebug(
"RKPropagatorInS") <<
"Accuracy not reached yet, trying in opposite direction " 327 edm::LogError(
"FailedPropagation") <<
" too many iterations trying to reach cylinder ";
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Plane &) const override
Local3DVector LocalVector
Point3DBase< Scalar, LocalTag > LocalPoint
GlobalTrajectoryParameters gtpFromVolumeLocal(const CartesianStateAdaptor &state, TrackCharge charge) const
ROOT::Math::Plane3D::Vector Vector
GlobalParametersWithPath propagateParametersOnCylinder(const FreeTrajectoryState &ts, const Cylinder &cyl) const
RKLocalFieldProvider fieldProvider() const
std::pair< bool, double > pathLength(const Cylinder &cyl) const
Global3DPoint GlobalPoint
GlobalPoint globalPosition(const Basic3DVector< float > &pos) const
float localZ(const GlobalPoint &gp) const
const GlobalTrajectoryParameters & parameters() const
TrackCharge charge() const
Basic3DVector< double > rkMomentum(const GlobalVector &mom) const
std::pair< TrajectoryStateOnSurface, double > TsosWP
virtual PropagationDirection propagationDirection() const final
Estimator of the distance between two state vectors, e.g. for convergence test.
Scalar radius() const
Radius of the cylinder.
T z() const
Cartesian z coordinate.
PropagationDirection invertDirection(PropagationDirection dir) const
LocalPoint toLocal(const GlobalPoint &gp) const
GlobalTrajectoryParameters gtpFromLocal(const Basic3DVector< float > &lpos, const Basic3DVector< float > &lmom, TrackCharge ch, const Surface &surf) const
Derivative calculation for the 6D cartesian case.
static RKSmallVector< double, 6 > rkstate(const Vector3D &pos, const Vector3D &mom)
Abs< T >::type abs(const T &t)
const Vector3D & momentum() const
PositionType position(float s) const
const MagVolume * theVolume
T perp() const
Magnitude of transverse component.
GlobalVector momentum() const
std::pair< bool, double > pathLength(const Plane &plane) const
GlobalVector globalMomentum(const Basic3DVector< float > &mom) const
GlobalPoint toGlobal(const LocalPoint &lp) const
GlobalPoint position() const
const Frame & frame() const
The reference frame in which the field is defined.
static Plane transformPlane(const Plane &plane, const GloballyPositioned< T > &frame)
GlobalPoint position(const double s) const
double transverseCurvature() const
std::pair< TrajectoryStateOnSurface, double > analyticalErrorPropagation(const FreeTrajectoryState &startingState, const Surface &surface, SurfaceSideDefinition::SurfaceSide side, const GlobalTrajectoryParameters &destParameters, const double &s)
T perp() const
Magnitude of transverse component.
GlobalParametersWithPath propagateParametersOnPlane(const FreeTrajectoryState &ts, const Plane &plane) const
RKPropagatorInS(const MagVolume &vol, PropagationDirection dir=alongMomentum, double tolerance=5.e-5)
const Vector3D & position() const
std::pair< bool, double > pathLength(const Cylinder &cyl) const
const BasicVectorType & basicVector() const
const PositionType & position() const
Basic3DVector< double > rkPosition(const GlobalPoint &pos) const
Propagator * clone() const override
Global3DVector GlobalVector
Vector inTesla(const LocalPoint &lp) const
the argument lp is in the local frame specified in the constructor
Basic3DVector cross(const Basic3DVector &v) const
Vector product, or "cross" product, with a vector of same type.