CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members | Public Member Functions | Private Attributes
RKPropagatorInR Class Referencefinal

#include <RKPropagatorInR.h>

Inheritance diagram for RKPropagatorInR:
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
 
 RKPropagatorInR (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 RKPropagatorInR.h.

Constructor & Destructor Documentation

◆ RKPropagatorInR()

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

Definition at line 9 of file RKPropagatorInR.h.

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

Referenced by clone().

Member Function Documentation

◆ clone()

Propagator * RKPropagatorInR::clone ( void  ) const
overridevirtual

Implements Propagator.

Definition at line 66 of file RKPropagatorInR.cc.

66 { return new RKPropagatorInR(*this); }

References RKPropagatorInR().

◆ magneticField()

const MagneticField* RKPropagatorInR::magneticField ( ) const
inlineoverridevirtual

Implements Propagator.

Definition at line 23 of file RKPropagatorInR.h.

23 { return theVolume; }

References theVolume.

◆ myPropagate() [1/2]

TrajectoryStateOnSurface RKPropagatorInR::myPropagate ( const FreeTrajectoryState ts,
const Cylinder cyl 
) const

Definition at line 14 of file RKPropagatorInR.cc.

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

References FreeTrajectoryState::charge(), MillePedeFileConverter_cfg::e, gpuVertexFinder::eps, FreeTrajectoryState::momentum(), FreeTrajectoryState::position(), Cylinder::radius(), command_line::start, theVolume, Surface::toGlobal(), and GloballyPositioned< T >::toLocal().

◆ myPropagate() [2/2]

TrajectoryStateOnSurface RKPropagatorInR::myPropagate ( const FreeTrajectoryState ,
const Plane  
) const

Definition at line 52 of file RKPropagatorInR.cc.

52  {
53  return TrajectoryStateOnSurface();
54 }

◆ propagateWithPath() [1/2]

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

Implements Propagator.

Definition at line 61 of file RKPropagatorInR.cc.

62  {
63  return std::pair<TrajectoryStateOnSurface, double>();
64 }

◆ propagateWithPath() [2/2]

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

Implements Propagator.

Definition at line 56 of file RKPropagatorInR.cc.

57  {
58  return std::pair<TrajectoryStateOnSurface, double>();
59 }

Member Data Documentation

◆ theVolume

const MagVolume* RKPropagatorInR::theVolume
private

Definition at line 26 of file RKPropagatorInR.h.

Referenced by magneticField(), and myPropagate().

Vector3DBase
Definition: Vector3DBase.h:8
FreeTrajectoryState::momentum
GlobalVector momentum() const
Definition: FreeTrajectoryState.h:68
start
Definition: start.py:1
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
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
align::Scalar
double Scalar
Definition: Definitions.h:25
Vector
ROOT::Math::Plane3D::Vector Vector
Definition: EcalHitMaker.cc:29
RKLocalFieldProvider
Definition: RKLocalFieldProvider.h:10
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
RKPropagatorInR::theVolume
const MagVolume * theVolume
Definition: RKPropagatorInR.h:26
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 >
GloballyPositioned::toLocal
LocalPoint toLocal(const GlobalPoint &gp) const
Definition: GloballyPositioned.h:98
command_line.start
start
Definition: command_line.py:167
RKPropagatorInR::RKPropagatorInR
RKPropagatorInR(const MagVolume &vol, PropagationDirection dir=alongMomentum)
Definition: RKPropagatorInR.h:9
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
CylindricalLorentzForce
Definition: CylindricalLorentzForce.h:10
Propagator::Propagator
Propagator(PropagationDirection dir=alongMomentum)
Definition: Propagator.h:46