CMS 3D CMS Logo

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 Plane &) const
 
TrajectoryStateOnSurface myPropagate (const FreeTrajectoryState &, const Cylinder &) const
 
std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const FreeTrajectoryState &, const Plane &) const override
 
std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const FreeTrajectoryState &, const Cylinder &) const override
 
 RKPropagatorInR (const MagVolume &vol, PropagationDirection dir=alongMomentum)
 
- Public Member Functions inherited from Propagator
template<typename STA , typename SUR >
TrajectoryStateOnSurface propagate (STA const &state, SUR const &surface) const
 
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
 
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const FreeTrajectoryState &, const Surface &) const final
 
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const TrajectoryStateOnSurface &tsos, const Surface &sur) const final
 
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const TrajectoryStateOnSurface &tsos, const Plane &sur) const
 
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const TrajectoryStateOnSurface &tsos, const Cylinder &sur) const
 
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 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.

Referenced by clone().

9 : Propagator(dir), theVolume(&vol) {}
Propagator(PropagationDirection dir=alongMomentum)
Definition: Propagator.h:46
const MagVolume * theVolume

Member Function Documentation

◆ clone()

Propagator * RKPropagatorInR::clone ( void  ) const
overridevirtual

Implements Propagator.

Definition at line 66 of file RKPropagatorInR.cc.

References RKPropagatorInR().

66 { return new RKPropagatorInR(*this); }
RKPropagatorInR(const MagVolume &vol, PropagationDirection dir=alongMomentum)

◆ magneticField()

const MagneticField* RKPropagatorInR::magneticField ( ) const
inlineoverridevirtual

Implements Propagator.

Definition at line 23 of file RKPropagatorInR.h.

References theVolume.

23 { return theVolume; }
const MagVolume * theVolume

◆ myPropagate() [1/2]

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

Definition at line 52 of file RKPropagatorInR.cc.

◆ myPropagate() [2/2]

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

Definition at line 14 of file RKPropagatorInR.cc.

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

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 }
Definition: start.py:1
double Scalar
Definition: Definitions.h:25
ROOT::Math::Plane3D::Vector Vector
Definition: EcalHitMaker.cc:29
LocalPoint toLocal(const GlobalPoint &gp) const
GlobalPoint position() const
int TrackCharge
Definition: TrackCharge.h:4
const MagVolume * theVolume
TrackCharge charge() const
GlobalVector momentum() const
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
Scalar radius() const
Radius of the cylinder.
Definition: Cylinder.h:64
step
Definition: StallMonitor.cc:98

◆ propagateWithPath() [1/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 }

◆ propagateWithPath() [2/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 }

Member Data Documentation

◆ theVolume

const MagVolume* RKPropagatorInR::theVolume
private

Definition at line 26 of file RKPropagatorInR.h.

Referenced by magneticField(), and myPropagate().