CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RKPropagatorInR.cc
Go to the documentation of this file.
3 // #include "CommonReco/RKPropagators/interface/RK4PreciseSolver.h"
13 
16 {
17  //typedef RK4PreciseSolver<double,5> Solver;
19  //typedef RKAdaptiveSolver<Scalar,RKOneCashKarpStep, 5> Solver;
20  typedef double Scalar;
21  typedef Solver::Vector RKVector;
22 
23  GlobalPoint pos( ts.position());
24  GlobalVector mom( ts.momentum());
25 
26  LocalPoint startpos = cyl.toLocal(pos);
27  LocalVector startmom = cyl.toLocal(mom);
28 
29  CylindricalState startState( startpos, startmom, ts.charge());
30  RKVector start = startState.parameters();
31 
32  RKLocalFieldProvider localField( *theVolume, cyl);
33  CylindricalLorentzForce<double,5> deriv(localField);
35  double eps = 1.e-5;
36  Solver solver;
37  try {
38  Scalar step = cyl.radius() - startState.rho();
39  RKVector rkresult = solver( startState.rho(), start, step, deriv, dist, eps);
40  CylindricalState endState( cyl.radius(), rkresult, startState.prSign());
41  return TrajectoryStateOnSurface( GlobalTrajectoryParameters( cyl.toGlobal( endState.position()),
42  cyl.toGlobal( endState.momentum()),
43  TrackCharge(endState.charge()),
44  theVolume),
45  cyl);
46  }
47  catch (CylindricalLorentzForceException& e) {
48  // the propagation failed due to momentum almost parallel to the plane.
49  // This does not mean the propagation is impossible, but it should be done
50  // in a different parametrization (e.g. s)
51  return TrajectoryStateOnSurface();
52  }
53 }
54 
57 {
58  return TrajectoryStateOnSurface();
59 }
60 
61 std::pair< TrajectoryStateOnSurface, double>
63 {
64  return std::pair< TrajectoryStateOnSurface, double>();
65 }
66 
67 std::pair< TrajectoryStateOnSurface, double>
69 {
70  return std::pair< TrajectoryStateOnSurface, double>();
71 }
72 
74 {
75  return new RKPropagatorInR(*this);
76 }
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:78
const Vector & parameters() const
double Scalar
Definition: Definitions.h:27
list step
Definition: launcher.py:15
ROOT::Math::Plane3D::Vector Vector
Definition: EcalHitMaker.cc:28
TrackCharge charge() const
RKPropagatorInR(const MagVolume &vol, PropagationDirection dir=alongMomentum)
virtual TrajectoryStateOnSurface propagate(const FreeTrajectoryState &, const Plane &) const
Definition: Plane.h:17
virtual Propagator * clone() const
int TrackCharge
Definition: TrackCharge.h:4
Scalar radius() const
Radius of the cylinder.
Definition: Cylinder.h:55
LocalPoint toLocal(const GlobalPoint &gp) const
const MagVolume * theVolume
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Plane &) const
GlobalVector momentum() const
GlobalPoint position() const