CMS 3D CMS Logo

AnalyticalImpactPointExtrapolator Class Reference

Extrapolate to impact point with respect to vtx, i.e. More...

#include <TrackingTools/GeomPropagators/interface/AnalyticalImpactPointExtrapolator.h>

List of all members.

Public Member Functions

 AnalyticalImpactPointExtrapolator (const Propagator &, const MagneticField *)
 constructor with alternative propagator
 AnalyticalImpactPointExtrapolator (const MagneticField *field)
 constructor with default geometrical propagator
TrajectoryStateOnSurface extrapolate (const TrajectoryStateOnSurface tsos, const GlobalPoint &vtx) const
 as above, but from TrajectoryStateOnSurface
TrajectoryStateOnSurface extrapolate (const FreeTrajectoryState &fts, const GlobalPoint &vtx) const
 extrapolation from FreeTrajectoryState

Private Member Functions

TrajectoryStateOnSurface extrapolateFullState (const TrajectoryStateOnSurface tsos, const GlobalPoint &vertex) const
 extrapolation of (multi) TSOS
TrajectoryStateOnSurface extrapolateSingleState (const FreeTrajectoryState &fts, const GlobalPoint &vertex) const
 extrapolation of (single) FTS
bool propagateWithHelix (const IterativeHelixExtrapolatorToLine &extrapolator, const GlobalPoint &vertex, GlobalPoint &x, GlobalVector &p, double &s) const
 the actual propagation to a new point & momentum vector

Private Attributes

const MagneticFieldtheField
DeepCopyPointerByClone
< Propagator
thePropagator


Detailed Description

Extrapolate to impact point with respect to vtx, i.e.

to the point of closest approach to vtx in 3D. It is slightly faster than the ImpactPointExtrapolator. The helix model is explicitely used in the determination of the target surface. This target surface is centered on vtx; the axes of the local coordinate system (x_loc, y_loc, z_loc) are z_loc // trajectory direction at impact point; x_loc normal to trajectory and along impact vector (impact point - vtx); y_loc forms a right-handed system with the other axes.

Definition at line 26 of file AnalyticalImpactPointExtrapolator.h.


Constructor & Destructor Documentation

AnalyticalImpactPointExtrapolator::AnalyticalImpactPointExtrapolator ( const MagneticField field  ) 

constructor with default geometrical propagator

Definition at line 12 of file AnalyticalImpactPointExtrapolator.cc.

00012                                                                                                 :
00013   thePropagator(new AnalyticalPropagator(theField, anyDirection)),
00014   theField(field)
00015 {}

AnalyticalImpactPointExtrapolator::AnalyticalImpactPointExtrapolator ( const Propagator propagator,
const MagneticField field 
)

constructor with alternative propagator

Definition at line 17 of file AnalyticalImpactPointExtrapolator.cc.

References anyDirection, and thePropagator.

00018                                                                                                   :
00019   thePropagator(propagator.clone()),
00020   theField(field)
00021 {
00022   thePropagator->setPropagationDirection(anyDirection);
00023 }


Member Function Documentation

TrajectoryStateOnSurface AnalyticalImpactPointExtrapolator::extrapolate ( const TrajectoryStateOnSurface  tsos,
const GlobalPoint vtx 
) const

as above, but from TrajectoryStateOnSurface

Definition at line 36 of file AnalyticalImpactPointExtrapolator.cc.

References extrapolateFullState(), and TrajectoryStateOnSurface::isValid().

00038 {
00039   if ( tsos.isValid() )  return extrapolateFullState(tsos,vtx);
00040   else  return tsos;
00041 }

TrajectoryStateOnSurface AnalyticalImpactPointExtrapolator::extrapolate ( const FreeTrajectoryState fts,
const GlobalPoint vtx 
) const

extrapolation from FreeTrajectoryState

Definition at line 26 of file AnalyticalImpactPointExtrapolator.cc.

References extrapolateSingleState().

00028 {
00029 //   static TimingReport::Item& timer = detailedDetTimer("AnalyticalImpactPointExtrapolator");
00030 //   TimeMe t(timer,false);
00031 
00032   return extrapolateSingleState(fts, vtx);
00033 }

TrajectoryStateOnSurface AnalyticalImpactPointExtrapolator::extrapolateFullState ( const TrajectoryStateOnSurface  tsos,
const GlobalPoint vertex 
) const [private]

extrapolation of (multi) TSOS

Definition at line 44 of file AnalyticalImpactPointExtrapolator.cc.

References TrajectoryStateOnSurface::components(), extrapolateSingleState(), TrajectoryStateOnSurface::freeTrajectoryState(), TrajectoryStateOnSurface::isValid(), TrajectoryStateOnSurface::surface(), and thePropagator.

Referenced by extrapolate().

00046 {
00047   //
00048   // first determine IP plane using propagation with (single) FTS
00049   // could be optimised (will propagate errors even if duplicated below)
00050   //
00051   TrajectoryStateOnSurface singleState = 
00052     extrapolateSingleState(*tsos.freeTrajectoryState(),vertex);
00053   if ( !singleState.isValid() || tsos.components().size()==1 )  return singleState;
00054   //
00055   // propagate multiTsos to plane found above
00056   //
00057   return thePropagator->propagate(tsos,singleState.surface());
00058 }

TrajectoryStateOnSurface AnalyticalImpactPointExtrapolator::extrapolateSingleState ( const FreeTrajectoryState fts,
const GlobalPoint vertex 
) const [private]

extrapolation of (single) FTS

Definition at line 61 of file AnalyticalImpactPointExtrapolator.cc.

References anyDirection, FreeTrajectoryState::charge(), FreeTrajectoryState::curvilinearError(), e, FreeTrajectoryState::hasError(), CurvilinearTrajectoryError::matrix(), FreeTrajectoryState::momentum(), p, FreeTrajectoryState::parameters(), GlobalTrajectoryParameters::position(), FreeTrajectoryState::position(), propagateWithHelix(), rho, rot, s, theField, FreeTrajectoryState::transverseCurvature(), and x.

Referenced by extrapolate(), and extrapolateFullState().

00063 {
00064   //
00065   // initialisation of position, momentum and transverse curvature
00066   //
00067   GlobalPoint x(fts.position());
00068   GlobalVector p(fts.momentum());
00069   double rho = fts.transverseCurvature();
00070   //
00071   // Straight line approximation? |rho|<1.e-10 equivalent to ~ 1um 
00072   // difference in transversal position at 10m.
00073   //
00074   double s(0);
00075   if( fabs(rho)<1.e-10 ) {
00076     GlobalVector dx(p.dot(vertex-x)/p.mag2()*p);
00077     x += dx;
00078     float sign = p.dot(dx);
00079     s = sign>0 ? dx.mag() : -dx.mag();
00080   }
00081   //
00082   // Helix case 
00083   //
00084   else {
00085     HelixLineExtrapolation::PositionType helixPos(x);
00086     HelixLineExtrapolation::DirectionType helixDir(p);
00087     IterativeHelixExtrapolatorToLine extrapolator(helixPos,helixDir,rho,anyDirection);
00088     if ( !propagateWithHelix(extrapolator,vertex,x,p,s) )  return TrajectoryStateOnSurface();
00089   }
00090   //
00091   // Define target surface: origin on line, x_local from line 
00092   //   to helix at closest approach, z_local along the helix
00093   //   and y_local to complete right-handed system
00094   //
00095   GlobalVector zLocal(p.unit());
00096   GlobalVector yLocal(zLocal.cross(x-vertex).unit());
00097   GlobalVector xLocal(yLocal.cross(zLocal));
00098   Surface::RotationType rot(xLocal,yLocal,zLocal);
00099   PlaneBuilder::ReturnType surface = PlaneBuilder().plane(vertex,rot);
00100   //
00101   // Compute propagated state
00102   //
00103   GlobalTrajectoryParameters gtp(x,p,fts.charge(), theField);
00104   if (fts.hasError()) {
00105     //
00106     // compute jacobian
00107     //
00108     AnalyticalCurvilinearJacobian analyticalJacobian(fts.parameters(), gtp.position(), gtp.momentum(), s);
00109     CurvilinearTrajectoryError cte( ROOT::Math::Similarity( analyticalJacobian.jacobian(), 
00110                                                             fts.curvilinearError().matrix()) );
00111     return TrajectoryStateOnSurface(gtp,cte,*surface);
00112   }
00113   else {
00114     //
00115     // return state without errors
00116     //
00117     return TrajectoryStateOnSurface(gtp,*surface);
00118   }
00119 }

bool AnalyticalImpactPointExtrapolator::propagateWithHelix ( const IterativeHelixExtrapolatorToLine extrapolator,
const GlobalPoint vertex,
GlobalPoint x,
GlobalVector p,
double &  s 
) const [private]

the actual propagation to a new point & momentum vector

Definition at line 122 of file AnalyticalImpactPointExtrapolator.cc.

References IterativeHelixExtrapolatorToLine::direction(), PV3DBase< T, PVType, FrameType >::mag(), Basic3DVector< T >::mag(), IterativeHelixExtrapolatorToLine::pathLength(), and IterativeHelixExtrapolatorToLine::position().

Referenced by extrapolateSingleState().

00124                                                                                                          {
00125   //
00126   // save absolute value of momentum
00127   //
00128   double pmag(p.mag());
00129   //
00130   // get path length to solution
00131   //
00132   std::pair<bool,double> propResult = extrapolator.pathLength(vertex);
00133   if ( !propResult.first )  return false;
00134   s = propResult.second;
00135   // 
00136   // get point and (normalised) direction from path length
00137   //
00138   HelixLineExtrapolation::PositionType xGen = extrapolator.position(s);
00139   HelixLineExtrapolation::DirectionType pGen = extrapolator.direction(s);
00140   //
00141   // Fix normalisation and convert back to GlobalPoint / GlobalVector
00142   //
00143   x = GlobalPoint(xGen);
00144   pGen *= pmag/pGen.mag();
00145   p = GlobalVector(pGen);
00146   //
00147   return true;
00148 }


Member Data Documentation

const MagneticField* AnalyticalImpactPointExtrapolator::theField [private]

Definition at line 57 of file AnalyticalImpactPointExtrapolator.h.

Referenced by extrapolateSingleState().

DeepCopyPointerByClone<Propagator> AnalyticalImpactPointExtrapolator::thePropagator [private]

Definition at line 56 of file AnalyticalImpactPointExtrapolator.h.

Referenced by AnalyticalImpactPointExtrapolator(), and extrapolateFullState().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:14:40 2009 for CMSSW by  doxygen 1.5.4