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 Reference

#include <RKPropagatorInZ.h>

Inheritance diagram for RKPropagatorInZ:
Propagator

Public Member Functions

virtual Propagatorclone () const
 
virtual const MagneticFieldmagneticField () const
 
virtual TrajectoryStateOnSurface propagate (const FreeTrajectoryState &, const Plane &) const
 
virtual TrajectoryStateOnSurface propagate (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
virtual TrajectoryStateOnSurface propagate (const FreeTrajectoryState &, const Surface &) const
 
virtual TrajectoryStateOnSurface propagate (const TrajectoryStateOnSurface &, const Surface &) const
 
virtual TrajectoryStateOnSurface propagate (const TrajectoryStateOnSurface &, const Plane &) const
 
virtual TrajectoryStateOnSurface propagate (const TrajectoryStateOnSurface &, const Cylinder &) const
 
virtual FreeTrajectoryState propagate (const FreeTrajectoryState &, const reco::BeamSpot &) const
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const FreeTrajectoryState &, const Surface &) const
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &, const Surface &) const
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &, const Plane &) const
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &, const Cylinder &) const
 
virtual std::pair
< FreeTrajectoryState, double > 
propagateWithPath (const FreeTrajectoryState &, const GlobalPoint &, const GlobalPoint &) const
 
virtual PropagationDirection propagationDirection () const
 
 Propagator (PropagationDirection dir=alongMomentum)
 
virtual bool setMaxDirectionChange (float phiMax)
 
virtual void setPropagationDirection (PropagationDirection dir) const
 
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:41
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::propagate ( const FreeTrajectoryState ts,
const Plane plane 
) const
virtual

Implements Propagator.

Definition at line 13 of file RKPropagatorInZ.cc.

References FreeTrajectoryState::charge(), alignCSCRings::e, PV3DBase< T, PVType, FrameType >::mag(), FreeTrajectoryState::momentum(), pos, FreeTrajectoryState::position(), errorMatrix2Lands_multiChannel::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 }
ROOT::Math::Plane3D::Vector Vector
Definition: EcalHitMaker.cc:28
T y() const
Definition: PV3DBase.h:62
TrackCharge charge() const
T mag() const
Definition: PV3DBase.h:66
const MagVolume * theVolume
LocalPoint toLocal(const GlobalPoint &gp) const
T z() const
Definition: PV3DBase.h:63
GlobalVector momentum() const
GlobalPoint position() const
T x() const
Definition: PV3DBase.h:61
TrajectoryStateOnSurface RKPropagatorInZ::propagate ( const FreeTrajectoryState ,
const Cylinder  
) const
virtual

Implements Propagator.

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 propagate().