CMS 3D CMS Logo

RKPropagatorInZ.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 
13  //typedef RK4PreciseSolver<double,5> Solver;
14  //typedef RKAdaptiveSolver<double,RKOne4OrderStep, 5> Solver;
16  typedef Solver::Vector RKVector;
17 
18  GlobalPoint pos(ts.position());
19  GlobalVector mom(ts.momentum());
20 
21  // cout << "RKPropagatorInZ: starting from FTS " << ts << endl;
22 
23  LocalPoint startpos = plane.toLocal(pos);
24  LocalVector startmom = plane.toLocal(mom);
25  double pzSign = startmom.z() > 0 ? 1.0 : -1.0;
26 
27  // cout << "In local plane coordinates: " << startpos << ", momentum " << startmom << endl;
28 
29  RKVector start;
30  start(0) = startpos.x();
31  start(1) = startpos.y();
32  start(2) = startmom.x() / startmom.z();
33  start(3) = startmom.y() / startmom.z();
34  start(4) = pzSign * ts.charge() / startmom.mag();
35 
36  // cout << "RKPropagatorInZ: Solving with par " << startpos.z() << " and state " << start << endl;
37 
38  RKLocalFieldProvider localField(*theVolume, plane);
39 
40  CurvilinearLorentzForce<double, 5> deriv(localField);
42  double eps = 1.e-5;
43  Solver solver;
44  try {
45  RKVector rkresult = solver(startpos.z(), start, -startpos.z(), deriv, dist, eps);
46 
48  LocalTrajectoryParameters(rkresult(4), rkresult(2), rkresult(3), rkresult(0), rkresult(1), pzSign),
49  plane,
50  theVolume);
51  } catch (CurvilinearLorentzForceException& e) {
52  // the propagation failed due to momentum almost parallel to the plane.
53  // This does not mean the propagation is impossible, but it should be done
54  // in a different parametrization (e.g. s)
55  return TrajectoryStateOnSurface();
56  }
57 }
58 
60  return TrajectoryStateOnSurface();
61 }
62 
63 std::pair<TrajectoryStateOnSurface, double> RKPropagatorInZ::propagateWithPath(const FreeTrajectoryState&,
64  const Plane&) const {
65  return std::pair<TrajectoryStateOnSurface, double>();
66 }
67 
68 std::pair<TrajectoryStateOnSurface, double> RKPropagatorInZ::propagateWithPath(const FreeTrajectoryState&,
69  const Cylinder&) const {
70  return std::pair<TrajectoryStateOnSurface, double>();
71 }
72 
73 Propagator* RKPropagatorInZ::clone() const { return new RKPropagatorInZ(*this); }
Vector3DBase
Definition: Vector3DBase.h:8
FreeTrajectoryState::momentum
GlobalVector momentum() const
Definition: FreeTrajectoryState.h:68
TrajectoryStateOnSurface.h
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
RKOne4OrderStep.h
gpuVertexFinder::eps
WorkSpace int float eps
Definition: gpuClusterTracksDBSCAN.h:18
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
Vector
ROOT::Math::Plane3D::Vector Vector
Definition: EcalHitMaker.cc:29
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
RKLocalFieldProvider
Definition: RKLocalFieldProvider.h:10
LocalTrajectoryParameters
Definition: LocalTrajectoryParameters.h:25
RKPropagatorInZ::RKPropagatorInZ
RKPropagatorInZ(const MagVolume &vol, PropagationDirection dir=alongMomentum)
Definition: RKPropagatorInZ.h:9
Propagator
Definition: Propagator.h:44
Plane.h
RKPropagatorInZ::propagateWithPath
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Plane &) const override
Definition: RKPropagatorInZ.cc:63
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
RKLocalFieldProvider.h
Point3DBase< float, GlobalTag >
RKPropagatorInZ.h
RKCurvilinearDistance.h
RKPropagatorInZ::theVolume
const MagVolume * theVolume
Definition: RKPropagatorInZ.h:26
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
RKPropagatorInZ::myPropagate
TrajectoryStateOnSurface myPropagate(const FreeTrajectoryState &, const Plane &) const
Definition: RKPropagatorInZ.cc:12
RKPropagatorInZ::clone
Propagator * clone() const override
Definition: RKPropagatorInZ.cc:73
PV3DBase::mag
T mag() const
Definition: PV3DBase.h:64
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
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
RKCurvilinearDistance
Definition: RKCurvilinearDistance.h:10
CurvilinearLorentzForce
Definition: CurvilinearLorentzForce.h:11
CurvilinearLorentzForce.h
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37