CMS 3D CMS Logo

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

#include <RKPropagatorInZ.h>

Inheritance diagram for RKPropagatorInZ:
Propagator

Public Member Functions

virtual Propagatorclone () const
 
virtual const MagneticFieldmagneticField () const
 
TrajectoryStateOnSurface myPropagate (const FreeTrajectoryState &, const Plane &) const
 
TrajectoryStateOnSurface myPropagate (const FreeTrajectoryState &, const Cylinder &) const
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const FreeTrajectoryState &, const Plane &) const
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const FreeTrajectoryState &, const Cylinder &) const
 
 RKPropagatorInZ (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 RKPropagatorInZ.h.

Constructor & Destructor Documentation

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

Definition at line 10 of file RKPropagatorInZ.h.

Referenced by clone().

10  :
11  Propagator(dir), theVolume( &vol) {}
Propagator(PropagationDirection dir=alongMomentum)
Definition: Propagator.h:46
const MagVolume * theVolume
dbl *** dir
Definition: mlp_gen.cc:35

Member Function Documentation

Propagator * RKPropagatorInZ::clone ( void  ) const
virtual

Implements Propagator.

Definition at line 79 of file RKPropagatorInZ.cc.

References RKPropagatorInZ().

80 {
81  return new RKPropagatorInZ(*this);
82 }
RKPropagatorInZ(const MagVolume &vol, PropagationDirection dir=alongMomentum)
virtual const MagneticField* RKPropagatorInZ::magneticField ( ) const
inlinevirtual

Implements Propagator.

Definition at line 27 of file RKPropagatorInZ.h.

References theVolume.

27 {return theVolume;}
const MagVolume * theVolume
TrajectoryStateOnSurface RKPropagatorInZ::myPropagate ( const FreeTrajectoryState ts,
const Plane plane 
) const

Definition at line 13 of file RKPropagatorInZ.cc.

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

14 {
15  //typedef RK4PreciseSolver<double,5> Solver;
16  //typedef RKAdaptiveSolver<double,RKOne4OrderStep, 5> Solver;
18  typedef Solver::Vector RKVector;
19 
20  GlobalPoint pos( ts.position());
21  GlobalVector mom( ts.momentum());
22 
23  // cout << "RKPropagatorInZ: starting from FTS " << ts << endl;
24 
25  LocalPoint startpos = plane.toLocal(pos);
26  LocalVector startmom = plane.toLocal(mom);
27  double pzSign = startmom.z() > 0 ? 1.0 : -1.0;
28 
29  // cout << "In local plane coordinates: " << startpos << ", momentum " << startmom << endl;
30 
31  RKVector start;
32  start(0) = startpos.x();
33  start(1) = startpos.y();
34  start(2) = startmom.x()/startmom.z();
35  start(3) = startmom.y()/startmom.z();
36  start(4) = pzSign * ts.charge() / startmom.mag();
37 
38  // cout << "RKPropagatorInZ: Solving with par " << startpos.z() << " and state " << start << endl;
39 
40  RKLocalFieldProvider localField( *theVolume, plane);
41 
42  CurvilinearLorentzForce<double,5> deriv(localField);
44  double eps = 1.e-5;
45  Solver solver;
46  try {
47  RKVector rkresult = solver( startpos.z(), start, -startpos.z(), deriv, dist, eps);
48 
49  return TrajectoryStateOnSurface( LocalTrajectoryParameters( rkresult(4), rkresult(2), rkresult(3),
50  rkresult(0), rkresult(1), pzSign),
51  plane, theVolume);
52  }
53  catch (CurvilinearLorentzForceException& e) {
54  // the propagation failed due to momentum almost parallel to the plane.
55  // This does not mean the propagation is impossible, but it should be done
56  // in a different parametrization (e.g. s)
57  return TrajectoryStateOnSurface();
58  }
59 }
tuple start
Check for commandline option errors.
Definition: dqm_diff.py:58
ROOT::Math::Plane3D::Vector Vector
Definition: EcalHitMaker.cc:29
T y() const
Definition: PV3DBase.h:63
TrackCharge charge() const
T mag() const
Definition: PV3DBase.h:67
const MagVolume * theVolume
LocalPoint toLocal(const GlobalPoint &gp) const
T z() const
Definition: PV3DBase.h:64
GlobalVector momentum() const
GlobalPoint position() const
T x() const
Definition: PV3DBase.h:62
TrajectoryStateOnSurface RKPropagatorInZ::myPropagate ( const FreeTrajectoryState ,
const Cylinder  
) const

Definition at line 62 of file RKPropagatorInZ.cc.

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

Implements Propagator.

Definition at line 68 of file RKPropagatorInZ.cc.

69 {
70  return std::pair< TrajectoryStateOnSurface, double>();
71 }
std::pair< TrajectoryStateOnSurface, double > RKPropagatorInZ::propagateWithPath ( const FreeTrajectoryState ,
const Cylinder  
) const
virtual

Implements Propagator.

Definition at line 74 of file RKPropagatorInZ.cc.

75 {
76  return std::pair< TrajectoryStateOnSurface, double>();
77 }

Member Data Documentation

const MagVolume* RKPropagatorInZ::theVolume
private

Definition at line 31 of file RKPropagatorInZ.h.

Referenced by magneticField(), and myPropagate().