CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
RKPropagatorInZ Class Referencefinal

#include <RKPropagatorInZ.h>

Inheritance diagram for RKPropagatorInZ:
Propagator

Public Member Functions

Propagatorclone () const override
 
const MagneticFieldmagneticField () const override
 
TrajectoryStateOnSurface myPropagate (const FreeTrajectoryState &, const Cylinder &) const
 
TrajectoryStateOnSurface myPropagate (const FreeTrajectoryState &, const Plane &) const
 
std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const FreeTrajectoryState &, const Cylinder &) const override
 
std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const FreeTrajectoryState &, const Plane &) const override
 
 RKPropagatorInZ (const MagVolume &vol, PropagationDirection dir=alongMomentum)
 
- Public Member Functions inherited from Propagator
virtual FreeTrajectoryState propagate (const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest) const final
 
virtual FreeTrajectoryState propagate (const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest1, const GlobalPoint &pDest2) const final
 
virtual FreeTrajectoryState propagate (const FreeTrajectoryState &ftsStart, const reco::BeamSpot &beamSpot) const final
 
template<typename STA , typename SUR >
TrajectoryStateOnSurface propagate (STA const &state, SUR const &surface) const
 
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const FreeTrajectoryState &, const Surface &) const final
 
virtual std::pair< FreeTrajectoryState, double > propagateWithPath (const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest) const
 
virtual std::pair< FreeTrajectoryState, double > propagateWithPath (const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest1, const GlobalPoint &pDest2) const
 Propagate to PCA to a line (given by 2 points) given a starting point. More...
 
virtual std::pair< FreeTrajectoryState, double > propagateWithPath (const FreeTrajectoryState &ftsStart, const reco::BeamSpot &beamSpot) const
 Propagate to PCA to a line (given by beamSpot position and slope) given a starting point. More...
 
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const TrajectoryStateOnSurface &tsos, const Cylinder &sur) const
 
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const TrajectoryStateOnSurface &tsos, const Plane &sur) const
 
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const TrajectoryStateOnSurface &tsos, const Surface &sur) const final
 
virtual PropagationDirection propagationDirection () const final
 
 Propagator (PropagationDirection dir=alongMomentum)
 
virtual bool setMaxDirectionChange (float phiMax)
 
virtual void setPropagationDirection (PropagationDirection dir)
 
virtual ~Propagator ()
 

Private Attributes

const MagVolumetheVolume
 

Detailed Description

Definition at line 7 of file RKPropagatorInZ.h.

Constructor & Destructor Documentation

◆ RKPropagatorInZ()

RKPropagatorInZ::RKPropagatorInZ ( const MagVolume vol,
PropagationDirection  dir = alongMomentum 
)
inline

Definition at line 9 of file RKPropagatorInZ.h.

9 : Propagator(dir), theVolume(&vol) {}

Referenced by clone().

Member Function Documentation

◆ clone()

Propagator * RKPropagatorInZ::clone ( void  ) const
overridevirtual

Implements Propagator.

Definition at line 73 of file RKPropagatorInZ.cc.

73 { return new RKPropagatorInZ(*this); }

References RKPropagatorInZ().

◆ magneticField()

const MagneticField* RKPropagatorInZ::magneticField ( ) const
inlineoverridevirtual

Implements Propagator.

Definition at line 23 of file RKPropagatorInZ.h.

23 { return theVolume; }

References theVolume.

◆ myPropagate() [1/2]

TrajectoryStateOnSurface RKPropagatorInZ::myPropagate ( const FreeTrajectoryState ,
const Cylinder  
) const

Definition at line 59 of file RKPropagatorInZ.cc.

59  {
60  return TrajectoryStateOnSurface();
61 }

◆ myPropagate() [2/2]

TrajectoryStateOnSurface RKPropagatorInZ::myPropagate ( const FreeTrajectoryState ts,
const Plane plane 
) const

Definition at line 12 of file RKPropagatorInZ.cc.

12  {
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 }

References FreeTrajectoryState::charge(), MillePedeFileConverter_cfg::e, gpuVertexFinder::eps, PV3DBase< T, PVType, FrameType >::mag(), FreeTrajectoryState::momentum(), FreeTrajectoryState::position(), command_line::start, theVolume, GloballyPositioned< T >::toLocal(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

◆ propagateWithPath() [1/2]

std::pair< TrajectoryStateOnSurface, double > RKPropagatorInZ::propagateWithPath ( const FreeTrajectoryState ,
const Cylinder  
) const
overridevirtual

Implements Propagator.

Definition at line 68 of file RKPropagatorInZ.cc.

69  {
70  return std::pair<TrajectoryStateOnSurface, double>();
71 }

◆ propagateWithPath() [2/2]

std::pair< TrajectoryStateOnSurface, double > RKPropagatorInZ::propagateWithPath ( const FreeTrajectoryState ,
const Plane  
) const
overridevirtual

Implements Propagator.

Definition at line 63 of file RKPropagatorInZ.cc.

64  {
65  return std::pair<TrajectoryStateOnSurface, double>();
66 }

Member Data Documentation

◆ theVolume

const MagVolume* RKPropagatorInZ::theVolume
private

Definition at line 26 of file RKPropagatorInZ.h.

Referenced by magneticField(), and myPropagate().

Vector3DBase
Definition: Vector3DBase.h:8
FreeTrajectoryState::momentum
GlobalVector momentum() const
Definition: FreeTrajectoryState.h:68
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
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
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
Point3DBase< float, GlobalTag >
RKPropagatorInZ::theVolume
const MagVolume * theVolume
Definition: RKPropagatorInZ.h:26
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
PV3DBase::mag
T mag() const
Definition: PV3DBase.h:64
GloballyPositioned::toLocal
LocalPoint toLocal(const GlobalPoint &gp) const
Definition: GloballyPositioned.h:98
command_line.start
start
Definition: command_line.py:167
RKCurvilinearDistance
Definition: RKCurvilinearDistance.h:10
CurvilinearLorentzForce
Definition: CurvilinearLorentzForce.h:11
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
Propagator::Propagator
Propagator(PropagationDirection dir=alongMomentum)
Definition: Propagator.h:46