CMS 3D CMS Logo

RKPropagatorInR.cc
Go to the documentation of this file.
3 // #include "CommonReco/RKPropagators/interface/RK4PreciseSolver.h"
6 #include "RKLocalFieldProvider.h"
8 #include "RKAdaptiveSolver.h"
9 #include "RKOne4OrderStep.h"
10 #include "RKOneCashKarpStep.h"
11 #include "CylindricalState.h"
13 
15  //typedef RK4PreciseSolver<double,5> Solver;
17  //typedef RKAdaptiveSolver<Scalar,RKOneCashKarpStep, 5> Solver;
18  typedef double Scalar;
19  typedef Solver::Vector RKVector;
20 
21  GlobalPoint pos(ts.position());
22  GlobalVector mom(ts.momentum());
23 
24  LocalPoint startpos = cyl.toLocal(pos);
25  LocalVector startmom = cyl.toLocal(mom);
26 
27  CylindricalState startState(startpos, startmom, ts.charge());
28  const RKVector& start = startState.parameters();
29 
30  RKLocalFieldProvider localField(*theVolume, cyl);
31  CylindricalLorentzForce<double, 5> deriv(localField);
33  double eps = 1.e-5;
34  Solver solver;
35  try {
36  Scalar step = cyl.radius() - startState.rho();
37  RKVector rkresult = solver(startState.rho(), start, step, deriv, dist, eps);
38  CylindricalState endState(cyl.radius(), rkresult, startState.prSign());
39  return TrajectoryStateOnSurface(GlobalTrajectoryParameters(cyl.toGlobal(endState.position()),
40  cyl.toGlobal(endState.momentum()),
41  TrackCharge(endState.charge()),
42  theVolume),
43  cyl);
44  } catch (CylindricalLorentzForceException& e) {
45  // the propagation failed due to momentum almost parallel to the plane.
46  // This does not mean the propagation is impossible, but it should be done
47  // in a different parametrization (e.g. s)
48  return TrajectoryStateOnSurface();
49  }
50 }
51 
53  return TrajectoryStateOnSurface();
54 }
55 
56 std::pair<TrajectoryStateOnSurface, double> RKPropagatorInR::propagateWithPath(const FreeTrajectoryState&,
57  const Plane&) const {
58  return std::pair<TrajectoryStateOnSurface, double>();
59 }
60 
61 std::pair<TrajectoryStateOnSurface, double> RKPropagatorInR::propagateWithPath(const FreeTrajectoryState&,
62  const Cylinder&) const {
63  return std::pair<TrajectoryStateOnSurface, double>();
64 }
65 
66 Propagator* RKPropagatorInR::clone() const { return new RKPropagatorInR(*this); }
Vector3DBase
Definition: Vector3DBase.h:8
MagVolume.h
FreeTrajectoryState::momentum
GlobalVector momentum() const
Definition: FreeTrajectoryState.h:68
TrajectoryStateOnSurface.h
start
Definition: start.py:1
Cylinder.h
Cylinder::radius
Scalar radius() const
Radius of the cylinder.
Definition: Cylinder.h:64
TrackCharge
int TrackCharge
Definition: TrackCharge.h:4
step
step
Definition: StallMonitor.cc:94
RKOne4OrderStep.h
pos
Definition: PixelAliasList.h:18
FreeTrajectoryState::charge
TrackCharge charge() const
Definition: FreeTrajectoryState.h:69
RKAdaptiveSolver
Definition: RKAdaptiveSolver.h:11
FreeTrajectoryState::position
GlobalPoint position() const
Definition: FreeTrajectoryState.h:67
RKPropagatorInR.h
align::Scalar
double Scalar
Definition: Definitions.h:25
Vector
ROOT::Math::Plane3D::Vector Vector
Definition: EcalHitMaker.cc:29
RKLocalFieldProvider
Definition: RKLocalFieldProvider.h:10
Propagator
Definition: Propagator.h:44
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
RKLocalFieldProvider.h
CylindricalLorentzForce.h
RKPropagatorInR::theVolume
const MagVolume * theVolume
Definition: RKPropagatorInR.h:26
RKPropagatorInR::myPropagate
TrajectoryStateOnSurface myPropagate(const FreeTrajectoryState &, const Plane &) const
Definition: RKPropagatorInR.cc:52
CylindricalState
Definition: CylindricalState.h:23
Surface::toGlobal
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
GlobalTrajectoryParameters
Definition: GlobalTrajectoryParameters.h:15
RKCylindricalDistance
Definition: RKCylindricalDistance.h:10
Point3DBase< float, GlobalTag >
RKPropagatorInR::clone
Propagator * clone() const override
Definition: RKPropagatorInR.cc:66
RKCylindricalDistance.h
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
RKPropagatorInR::propagateWithPath
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Plane &) const override
Definition: RKPropagatorInR.cc:56
GloballyPositioned::toLocal
LocalPoint toLocal(const GlobalPoint &gp) const
Definition: GloballyPositioned.h:98
Plane
Definition: Plane.h:16
RKAdaptiveSolver.h
Cylinder
Definition: Cylinder.h:19
RKOneCashKarpStep.h
command_line.start
start
Definition: command_line.py:167
CylindricalState.h
RKPropagatorInR::RKPropagatorInR
RKPropagatorInR(const MagVolume &vol, PropagationDirection dir=alongMomentum)
Definition: RKPropagatorInR.h:9
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
CylindricalLorentzForce
Definition: CylindricalLorentzForce.h:10