CMS 3D CMS Logo

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

#include <RKPropagatorInS.h>

Inheritance diagram for RKPropagatorInS:
Propagator

Public Member Functions

Propagatorclone () const override
 
const MagneticFieldmagneticField () const override
 
 RKPropagatorInS (const MagVolume &vol, PropagationDirection dir=alongMomentum, double tolerance=5.e-5)
 
 ~RKPropagatorInS () override
 
- 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 Types

typedef std::pair< TrajectoryStateOnSurface, double > TsosWP
 

Private Member Functions

RKLocalFieldProvider fieldProvider () const
 
RKLocalFieldProvider fieldProvider (const Cylinder &cyl) const
 
GlobalVector globalMomentum (const Basic3DVector< float > &mom) const
 
GlobalPoint globalPosition (const Basic3DVector< float > &pos) const
 
GlobalTrajectoryParameters gtpFromLocal (const Basic3DVector< float > &lpos, const Basic3DVector< float > &lmom, TrackCharge ch, const Surface &surf) const
 
GlobalTrajectoryParameters gtpFromVolumeLocal (const CartesianStateAdaptor &state, TrackCharge charge) const
 
PropagationDirection invertDirection (PropagationDirection dir) const
 
GlobalParametersWithPath propagateParametersOnCylinder (const FreeTrajectoryState &ts, const Cylinder &cyl) const
 
GlobalParametersWithPath propagateParametersOnPlane (const FreeTrajectoryState &ts, const Plane &plane) const
 
std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const FreeTrajectoryState &, const Plane &) const override
 
std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const FreeTrajectoryState &, const Cylinder &) const override
 
Basic3DVector< double > rkMomentum (const GlobalVector &mom) const
 
Basic3DVector< double > rkPosition (const GlobalPoint &pos) const
 

Private Attributes

double theTolerance
 
const MagVolumetheVolume
 

Detailed Description

Definition at line 20 of file RKPropagatorInS.h.

Member Typedef Documentation

typedef std::pair<TrajectoryStateOnSurface,double> RKPropagatorInS::TsosWP
private

Definition at line 52 of file RKPropagatorInS.h.

Constructor & Destructor Documentation

RKPropagatorInS::RKPropagatorInS ( const MagVolume vol,
PropagationDirection  dir = alongMomentum,
double  tolerance = 5.e-5 
)
inlineexplicit

Definition at line 27 of file RKPropagatorInS.h.

Referenced by clone().

28  :
Propagator(PropagationDirection dir=alongMomentum)
Definition: Propagator.h:46
const double tolerance
const MagVolume * theVolume
dbl *** dir
Definition: mlp_gen.cc:35
RKPropagatorInS::~RKPropagatorInS ( )
inlineoverride

Member Function Documentation

Propagator * RKPropagatorInS::clone ( void  ) const
overridevirtual

Implements Propagator.

Definition at line 332 of file RKPropagatorInS.cc.

References RKPropagatorInS().

Referenced by ~RKPropagatorInS().

333 {
334  return new RKPropagatorInS(*this);
335 }
RKPropagatorInS(const MagVolume &vol, PropagationDirection dir=alongMomentum, double tolerance=5.e-5)
RKLocalFieldProvider RKPropagatorInS::fieldProvider ( ) const
private

Definition at line 345 of file RKPropagatorInS.cc.

References theVolume.

Referenced by propagateParametersOnCylinder(), and propagateParametersOnPlane().

346 {
348 }
const MagVolume * theVolume
RKLocalFieldProvider RKPropagatorInS::fieldProvider ( const Cylinder cyl) const
private

Definition at line 350 of file RKPropagatorInS.cc.

References theVolume.

351 {
352  return RKLocalFieldProvider( *theVolume, cyl);
353 }
const MagVolume * theVolume
GlobalVector RKPropagatorInS::globalMomentum ( const Basic3DVector< float > &  mom) const
private

Definition at line 379 of file RKPropagatorInS.cc.

References theVolume, and GloballyPositioned< T >::toGlobal().

Referenced by gtpFromVolumeLocal().

381 {
382  if (theVolume != nullptr) return theVolume->toGlobal( LocalVector(mom));
383  else return GlobalVector(mom);
384 }
Local3DVector LocalVector
Definition: LocalVector.h:12
const MagVolume * theVolume
GlobalPoint toGlobal(const LocalPoint &lp) const
Global3DVector GlobalVector
Definition: GlobalVector.h:10
GlobalPoint RKPropagatorInS::globalPosition ( const Basic3DVector< float > &  pos) const
private

Definition at line 373 of file RKPropagatorInS.cc.

References theVolume, and GloballyPositioned< T >::toGlobal().

Referenced by gtpFromVolumeLocal(), and propagateParametersOnPlane().

374 {
375  if (theVolume != nullptr) return theVolume->toGlobal( LocalPoint(pos));
376  else return GlobalPoint(pos);
377 }
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:32
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
const MagVolume * theVolume
GlobalPoint toGlobal(const LocalPoint &lp) const
GlobalTrajectoryParameters RKPropagatorInS::gtpFromLocal ( const Basic3DVector< float > &  lpos,
const Basic3DVector< float > &  lmom,
TrackCharge  ch,
const Surface surf 
) const
private

Definition at line 337 of file RKPropagatorInS.cc.

References theVolume, and Surface::toGlobal().

Referenced by propagateParametersOnCylinder().

340 {
341  return GlobalTrajectoryParameters( surf.toGlobal( LocalPoint( lpos)),
342  surf.toGlobal( LocalVector( lmom)), ch, theVolume);
343 }
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:106
Local3DVector LocalVector
Definition: LocalVector.h:12
const MagVolume * theVolume
GlobalTrajectoryParameters RKPropagatorInS::gtpFromVolumeLocal ( const CartesianStateAdaptor state,
TrackCharge  charge 
) const
private

Definition at line 387 of file RKPropagatorInS.cc.

References globalMomentum(), globalPosition(), CartesianStateAdaptor::momentum(), CartesianStateAdaptor::position(), and theVolume.

Referenced by propagateParametersOnPlane().

389 {
391  globalMomentum(state.momentum()),
392  charge, theVolume);
393 }
GlobalPoint globalPosition(const Basic3DVector< float > &pos) const
const Vector3D & momentum() const
const MagVolume * theVolume
GlobalVector globalMomentum(const Basic3DVector< float > &mom) const
const Vector3D & position() const
PropagationDirection RKPropagatorInS::invertDirection ( PropagationDirection  dir) const
private
const MagneticField* RKPropagatorInS::magneticField ( ) const
inlineoverridevirtual

Implements Propagator.

Definition at line 48 of file RKPropagatorInS.h.

References theVolume.

48 {return theVolume;}
const MagVolume * theVolume
GlobalParametersWithPath RKPropagatorInS::propagateParametersOnCylinder ( const FreeTrajectoryState ts,
const Cylinder cyl 
) const
private

Definition at line 198 of file RKPropagatorInS.cc.

References funct::abs(), FreeTrajectoryState::charge(), MillePedeFileConverter_cfg::e, fieldProvider(), gtpFromLocal(), invertDirection(), LIKELY, LogDebug, CartesianStateAdaptor::momentum(), FreeTrajectoryState::momentum(), callgraph::path, StraightLineBarrelCylinderCrossing::pathLength(), StraightLineCylinderCrossing::pathLength(), Basic3DVector< T >::perp(), perp(), CartesianStateAdaptor::position(), StraightLineBarrelCylinderCrossing::position(), GloballyPositioned< T >::position(), FreeTrajectoryState::position(), Propagator::propagationDirection(), Cylinder::radius(), rho, CartesianStateAdaptor::rkstate(), alignCSCRings::s, command_line::start, theTolerance, theVolume, GloballyPositioned< T >::toLocal(), FreeTrajectoryState::transverseCurvature(), UNLIKELY, x, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and Basic3DVector< T >::z().

Referenced by propagateWithPath().

199  {
200 
202  typedef Solver::Vector RKVector;
203 
204 
205  const GlobalPoint& sp = cyl.position();
206  if UNLIKELY(sp.x()!=0. || sp.y()!=0.) {
207  throw PropagationException("Cannot propagate to an arbitrary cylinder");
208  }
209 
210  GlobalPoint gpos( ts.position());
211  GlobalVector gmom( ts.momentum());
212  LocalPoint pos(cyl.toLocal(gpos));
213  LocalVector mom(cyl.toLocal(gmom));
214  double startR = cyl.radius() - pos.perp();
215 
216  // LogDebug("RKPropagatorInS") << "RKPropagatorInS: starting from FTS " << ts ;
217 
218 
219  // (transverse) curvature
220  double rho = ts.transverseCurvature();
221  //
222  // Straight line approximation? |rho|<1.e-10 equivalent to ~ 1um
223  // difference in transversal position at 10m.
224  //
225  if UNLIKELY( fabs(rho)<1.e-10 ) {
226  //
227  // Instantiate auxiliary object for finding intersection.
228  // Frame-independant point and vector are created explicitely to
229  // avoid confusing gcc (refuses to compile with temporary objects
230  // in the constructor).
231  //
232 
234 
235  //
236  // get solution
237  //
238  std::pair<bool,double> propResult = cylCrossing.pathLength(cyl);
239  if LIKELY( propResult.first && theVolume !=nullptr) {
240  double s = propResult.second;
241  // point (reconverted to GlobalPoint)
242  GlobalPoint x (cylCrossing.position(s));
244  LogDebug("RKPropagatorInS") << "Straight line propagation to cylinder succeeded !!";
245  return GlobalParametersWithPath( res, s);
246  }
247 
248  //do someting
249  edm::LogError("RKPropagatorInS") <<"Straight line propagation to cylinder failed !!";
250  return GlobalParametersWithPath( );
251 
252  }
253 
254 
255  RKLocalFieldProvider field( fieldProvider(cyl));
256  // StraightLineCylinderCrossing pathLength( pos, mom, propagationDirection());
257  CartesianLorentzForce deriv(field, ts.charge());
258 
259  RKCartesianDistance dist;
260  double eps = theTolerance;
261  Solver solver;
262  double stot = 0;
263  PropagationDirection currentDirection = propagationDirection();
264 
265  RKVector start( CartesianStateAdaptor::rkstate( pos.basicVector(), mom.basicVector()));
266  int safeGuard = 0;
267  while (safeGuard++<100) {
268  CartesianStateAdaptor startState(start);
269  StraightLineCylinderCrossing pathLength( LocalPoint(startState.position()),
270  LocalVector(startState.momentum()),
271  currentDirection, eps);
272 
273  std::pair<bool,double> path = pathLength.pathLength( cyl);
274  if UNLIKELY(!path.first) {
275  LogDebug("RKPropagatorInS") << "RKPropagatorInS: Path length calculation to cylinder failed!"
276  << "Radius " << cyl.radius() << " pos.perp() " << LocalPoint(startState.position()).perp() ;
277  return GlobalParametersWithPath();
278  }
279 
280  LogDebug("RKPropagatorInS") << "RKPropagatorInS: Path lenght to cylinder is " << path.second
281  << " from point (R,z) " << startState.position().perp()
282  << ", " << startState.position().z()
283  << " to R " << cyl.radius()
284  ;
285 
286 
287  double sstep = path.second;
288  if UNLIKELY( std::abs(sstep) < eps) {
289  LogDebug("RKPropagatorInS") << "accuracy not reached, but pathLength calculation says we are there! "
290  << path.second ;
291 
292  GlobalTrajectoryParameters res( gtpFromLocal( startState.position(),
293  startState.momentum(),
294  ts.charge(), cyl));
295  return GlobalParametersWithPath( res, stot);
296  }
297 
298  LogDebug("RKPropagatorInS") << "RKPropagatorInS: Solving for " << sstep
299  << " current distance to cylinder is " << startR ;
300 
301  RKVector rkresult = solver( 0, start, sstep, deriv, dist, eps);
302  stot += sstep;
303  CartesianStateAdaptor cur( rkresult);
304  double remainingR = cyl.radius() - cur.position().perp();
305 
306  if ( fabs(remainingR) < eps) {
307  LogDebug("RKPropagatorInS") << "Accuracy reached! " << remainingR ;
308  GlobalTrajectoryParameters res( gtpFromLocal( cur.position(),
309  cur.momentum(),
310  ts.charge(), cyl));
311  return GlobalParametersWithPath( res, stot);
312  }
313 
314  start = rkresult;
315  if (remainingR * startR > 0) {
316  LogDebug("RKPropagatorInS") << "Accuracy not reached yet, trying in same direction again "
317  << remainingR ;
318  }
319  else {
320  LogDebug("RKPropagatorInS") << "Accuracy not reached yet, trying in opposite direction "
321  << remainingR ;
322  currentDirection = invertDirection( currentDirection);
323  }
324  startR = remainingR;
325  }
326 
327  edm::LogError("FailedPropagation") << " too many iterations trying to reach cylinder ";
328  return GlobalParametersWithPath();
329 }
#define LogDebug(id)
Definition: start.py:1
Local3DVector LocalVector
Definition: LocalVector.h:12
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:32
ROOT::Math::Plane3D::Vector Vector
Definition: EcalHitMaker.cc:29
RKLocalFieldProvider fieldProvider() const
T y() const
Definition: PV3DBase.h:63
#define LIKELY(x)
Definition: Likely.h:20
PropagationDirection
TrackCharge charge() const
Definition: Electron.h:6
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:151
Estimator of the distance between two state vectors, e.g. for convergence test.
Scalar radius() const
Radius of the cylinder.
Definition: Cylinder.h:67
PropagationDirection invertDirection(PropagationDirection dir) const
LocalPoint toLocal(const GlobalPoint &gp) const
GlobalTrajectoryParameters gtpFromLocal(const Basic3DVector< float > &lpos, const Basic3DVector< float > &lmom, TrackCharge ch, const Surface &surf) const
Derivative calculation for the 6D cartesian case.
static RKSmallVector< double, 6 > rkstate(const Vector3D &pos, const Vector3D &mom)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const MagVolume * theVolume
Common base class.
GlobalVector momentum() const
GlobalPoint position() const
double transverseCurvature() const
T perp() const
Magnitude of transverse component.
#define UNLIKELY(x)
Definition: Likely.h:21
T x() const
Definition: PV3DBase.h:62
const PositionType & position() const
GlobalParametersWithPath RKPropagatorInS::propagateParametersOnPlane ( const FreeTrajectoryState ts,
const Plane plane 
) const
private

Definition at line 51 of file RKPropagatorInS.cc.

References funct::abs(), PV3DBase< T, PVType, FrameType >::basicVector(), FreeTrajectoryState::charge(), cross(), dir, MillePedeFileConverter_cfg::e, fieldProvider(), RKLocalFieldProvider::frame(), globalPosition(), gtpFromVolumeLocal(), RKLocalFieldProvider::inTesla(), invertDirection(), LIKELY, Plane::localZ(), LogDebug, CartesianStateAdaptor::momentum(), FreeTrajectoryState::momentum(), callgraph::path, StraightLinePlaneCrossing::pathLength(), CartesianStateAdaptor::position(), GloballyPositioned< T >::position(), StraightLinePlaneCrossing::position(), FreeTrajectoryState::position(), Propagator::propagationDirection(), rho, rkMomentum(), rkPosition(), CartesianStateAdaptor::rkstate(), alignCSCRings::s, command_line::start, theTolerance, theVolume, GloballyPositioned< T >::toGlobal(), GloballyPositioned< T >::toLocal(), FrameChanger::transformPlane(), FreeTrajectoryState::transverseCurvature(), UNLIKELY, and x.

Referenced by propagateWithPath().

53 {
54 
55  GlobalPoint gpos( ts.position());
56  GlobalVector gmom( ts.momentum());
57  double startZ = plane.localZ(gpos);
58  // (transverse) curvature
59  double rho = ts.transverseCurvature();
60  //
61  // Straight line approximation? |rho|<1.e-10 equivalent to ~ 1um
62  // difference in transversal position at 10m.
63  //
64  if UNLIKELY( fabs(rho)<1.e-10 ) {
65  //
66  // Instantiate auxiliary object for finding intersection.
67  // Frame-independant point and vector are created explicitely to
68  // avoid confusing gcc (refuses to compile with temporary objects
69  // in the constructor).
70  //
71  LogDebug("RKPropagatorInS")<<" startZ = "<<startZ;
72 
73  if UNLIKELY(fabs(startZ) < 1e-5){
74  LogDebug("RKPropagatorInS")<< "Propagation is not performed: state is already on final surface.";
75  GlobalTrajectoryParameters res( gpos, gmom, ts.charge(),
76  theVolume);
77  return GlobalParametersWithPath( res, 0.0);
78  }
79 
83  //
84  // get solution
85  //
86  std::pair<bool,double> propResult = planeCrossing.pathLength(plane);
87  if LIKELY( propResult.first && theVolume !=nullptr) {
88  double s = propResult.second;
89  // point (reconverted to GlobalPoint)
90  GlobalPoint x (planeCrossing.position(s));
92  return GlobalParametersWithPath( res, s);
93  }
94  //do someting
95  LogDebug("RKPropagatorInS")<< "Straight line propgation to plane failed !!";
96  return GlobalParametersWithPath( );
97 
98  }
99 
100 
101 #ifdef EDM_ML_DEBUG
102  if (theVolume != 0) {
103  LogDebug("RKPropagatorInS") << "RKPropagatorInS: starting prop to plane in volume with pos " << theVolume->position()
104  << " Z axis " << theVolume->toGlobal( LocalVector(0,0,1)) ;
105 
106  LogDebug("RKPropagatorInS") << "The starting position is " << ts.position() << " (global) "
107  << theVolume->toLocal(ts.position()) << " (local) " ;
108 
109  FrameChanger changer;
110  auto localPlane = changer.transformPlane( plane, *theVolume);
111  LogDebug("RKPropagatorInS") << "The plane position is " << plane.position() << " (global) "
112  << localPlane.position() << " (local) " ;
113 
114  LogDebug("RKPropagatorInS") << "The initial distance to plane is " << plane.localZ( ts.position()) ;
115 
117  std::pair<bool,double> res3 = cross.pathLength(plane);
118  LogDebug("RKPropagatorInS") << "straight line distance " << res3.first << " " << res3.second ;
119  }
120 #endif
121 
123  typedef Solver::Vector RKVector;
124 
126  PathToPlane2Order pathLength( field, &field.frame());
127  CartesianLorentzForce deriv(field, ts.charge());
128 
129  RKCartesianDistance dist;
130  double eps = theTolerance;
131  Solver solver;
132  double stot = 0;
133  PropagationDirection currentDirection = propagationDirection();
134 
135  // in magVolume frame
136  RKVector start( CartesianStateAdaptor::rkstate( rkPosition(gpos), rkMomentum(gmom)));
137  int safeGuard = 0;
138  while (safeGuard++<100) {
139  CartesianStateAdaptor startState(start);
140 
141  std::pair<bool,double> path = pathLength( plane, startState.position(),
142  startState.momentum(),
143  (double) ts.charge(), currentDirection);
144  if UNLIKELY(!path.first) {
145  LogDebug("RKPropagatorInS") << "RKPropagatorInS: Path length calculation to plane failed!"
146  << "...distance to plane " << plane.localZ( globalPosition(startState.position()))
147  << "...Local starting position in volume " << startState.position()
148  << "...Magnetic field " << field.inTesla( startState.position()) ;
149 
150 
151  return GlobalParametersWithPath();
152  }
153 
154  LogDebug("RKPropagatorInS") << "RKPropagatorInS: Path lenght to plane is " << path.second ;
155 
156 
157  double sstep = path.second;
158  if UNLIKELY( std::abs(sstep) < eps) {
159  LogDebug("RKPropagatorInS") << "On-surface accuracy not reached, but pathLength calculation says we are there! "
160  << "path " << path.second << " distance to plane is " << startZ ;
162  return GlobalParametersWithPath( res, stot);
163  }
164 
165  LogDebug("RKPropagatorInS") << "RKPropagatorInS: Solving for " << sstep
166  << " current distance to plane is " << startZ ;
167 
168  RKVector rkresult = solver( 0, start, sstep, deriv, dist, eps);
169  stot += sstep;
170  CartesianStateAdaptor cur( rkresult);
171  double remainingZ = plane.localZ( globalPosition(cur.position()));
172 
173  if ( fabs(remainingZ) < eps) {
174  LogDebug("RKPropagatorInS") << "On-surface accuracy reached! " << remainingZ ;
176  return GlobalParametersWithPath( res, stot);
177  }
178 
179  start = rkresult;
180 
181  if (remainingZ * startZ > 0) {
182  LogDebug("RKPropagatorInS") << "Accuracy not reached yet, trying in same direction again "
183  << remainingZ ;
184  }
185  else {
186  LogDebug("RKPropagatorInS") << "Accuracy not reached yet, trying in opposite direction "
187  << remainingZ ;
188  currentDirection = invertDirection( currentDirection);
189  }
190  startZ = remainingZ;
191  }
192 
193  edm::LogError("FailedPropagation") << " too many iterations trying to reach plane ";
194  return GlobalParametersWithPath();
195 }
#define LogDebug(id)
Definition: start.py:1
Local3DVector LocalVector
Definition: LocalVector.h:12
GlobalTrajectoryParameters gtpFromVolumeLocal(const CartesianStateAdaptor &state, TrackCharge charge) const
ROOT::Math::Plane3D::Vector Vector
Definition: EcalHitMaker.cc:29
RKLocalFieldProvider fieldProvider() const
GlobalPoint globalPosition(const Basic3DVector< float > &pos) const
float localZ(const GlobalPoint &gp) const
Definition: Plane.h:45
#define LIKELY(x)
Definition: Likely.h:20
PropagationDirection
TrackCharge charge() const
Definition: Electron.h:6
Basic3DVector< double > rkMomentum(const GlobalVector &mom) const
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:151
Estimator of the distance between two state vectors, e.g. for convergence test.
PropagationDirection invertDirection(PropagationDirection dir) const
LocalPoint toLocal(const GlobalPoint &gp) const
Derivative calculation for the 6D cartesian case.
static RKSmallVector< double, 6 > rkstate(const Vector3D &pos, const Vector3D &mom)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const MagVolume * theVolume
GlobalVector momentum() const
GlobalPoint toGlobal(const LocalPoint &lp) const
GlobalPoint position() const
static Plane transformPlane(const Plane &plane, const GloballyPositioned< T > &frame)
Definition: FrameChanger.h:15
double transverseCurvature() const
dbl *** dir
Definition: mlp_gen.cc:35
#define UNLIKELY(x)
Definition: Likely.h:21
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56
const PositionType & position() const
Basic3DVector< double > rkPosition(const GlobalPoint &pos) const
Basic3DVector cross(const Basic3DVector &v) const
Vector product, or "cross" product, with a vector of same type.
std::pair< TrajectoryStateOnSurface, double > RKPropagatorInS::propagateWithPath ( const FreeTrajectoryState fts,
const Plane plane 
) const
overrideprivatevirtual

Implements Propagator.

Definition at line 27 of file RKPropagatorInS.cc.

References SurfaceSideDefinition::afterSurface, alongMomentum, analyticalErrorPropagation(), SurfaceSideDefinition::beforeSurface, runTauDisplay::gp, GlobalParametersWithPath::parameters(), propagateParametersOnPlane(), Propagator::propagationDirection(), GlobalParametersWithPath::s(), and UNLIKELY.

Referenced by ~RKPropagatorInS().

29 {
32 
35  return analyticalErrorPropagation( fts, plane, side, gp.parameters(),gp.s());
36 }
return((rh^lh)&mask)
std::pair< TrajectoryStateOnSurface, double > TsosWP
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:151
std::pair< TrajectoryStateOnSurface, double > analyticalErrorPropagation(const FreeTrajectoryState &startingState, const Surface &surface, SurfaceSideDefinition::SurfaceSide side, const GlobalTrajectoryParameters &destParameters, const double &s)
GlobalParametersWithPath propagateParametersOnPlane(const FreeTrajectoryState &ts, const Plane &plane) const
#define UNLIKELY(x)
Definition: Likely.h:21
std::pair< TrajectoryStateOnSurface, double > RKPropagatorInS::propagateWithPath ( const FreeTrajectoryState fts,
const Cylinder cyl 
) const
overrideprivatevirtual

Implements Propagator.

Definition at line 39 of file RKPropagatorInS.cc.

References SurfaceSideDefinition::afterSurface, alongMomentum, analyticalErrorPropagation(), SurfaceSideDefinition::beforeSurface, runTauDisplay::gp, GlobalParametersWithPath::parameters(), propagateParametersOnCylinder(), Propagator::propagationDirection(), GlobalParametersWithPath::s(), and UNLIKELY.

40 {
43 
46  return analyticalErrorPropagation( fts, cyl, side, gp.parameters(),gp.s());
47 
48 }
GlobalParametersWithPath propagateParametersOnCylinder(const FreeTrajectoryState &ts, const Cylinder &cyl) const
return((rh^lh)&mask)
std::pair< TrajectoryStateOnSurface, double > TsosWP
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:151
std::pair< TrajectoryStateOnSurface, double > analyticalErrorPropagation(const FreeTrajectoryState &startingState, const Surface &surface, SurfaceSideDefinition::SurfaceSide side, const GlobalTrajectoryParameters &destParameters, const double &s)
#define UNLIKELY(x)
Definition: Likely.h:21
Basic3DVector< double > RKPropagatorInS::rkMomentum ( const GlobalVector mom) const
private

Definition at line 367 of file RKPropagatorInS.cc.

References PV3DBase< T, PVType, FrameType >::basicVector(), theVolume, and GloballyPositioned< T >::toLocal().

Referenced by propagateParametersOnPlane().

368 {
369  if (theVolume != nullptr) return theVolume->toLocal( mom).basicVector();
370  else return mom.basicVector();
371 }
LocalPoint toLocal(const GlobalPoint &gp) const
const MagVolume * theVolume
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56
Basic3DVector< double > RKPropagatorInS::rkPosition ( const GlobalPoint pos) const
private

Definition at line 361 of file RKPropagatorInS.cc.

References PV3DBase< T, PVType, FrameType >::basicVector(), theVolume, and GloballyPositioned< T >::toLocal().

Referenced by propagateParametersOnPlane().

362 {
363  if (theVolume != nullptr) return theVolume->toLocal( pos).basicVector();
364  else return pos.basicVector();
365 }
LocalPoint toLocal(const GlobalPoint &gp) const
const MagVolume * theVolume
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56

Member Data Documentation

double RKPropagatorInS::theTolerance
private

Definition at line 55 of file RKPropagatorInS.h.

Referenced by propagateParametersOnCylinder(), and propagateParametersOnPlane().

const MagVolume* RKPropagatorInS::theVolume
private