CMS 3D CMS Logo

TransverseImpactPointExtrapolator Class Reference

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

#include <TrackingTools/PatternTools/interface/TransverseImpactPointExtrapolator.h>

List of all members.

Public Member Functions

TrajectoryStateOnSurface extrapolate (const TrajectoryStateOnSurface tsos, const GlobalPoint &vtx, const Propagator &u) const
 as above, but from TrajectoryStateOnSurface
TrajectoryStateOnSurface extrapolate (const FreeTrajectoryState &fts, const GlobalPoint &vtx, const Propagator &u) const
 extrapolation with user-supplied 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 with default (=geometrical) propagator
 TransverseImpactPointExtrapolator (const Propagator &u)
 constructor with user-supplied propagator
 TransverseImpactPointExtrapolator (const MagneticField *field)
 constructor with default geometrical propagator
 TransverseImpactPointExtrapolator ()
 constructor with default geometrical propagator

Private Member Functions

TrajectoryStateOnSurface doExtrapolation (const FreeTrajectoryState &fts, const GlobalPoint &vtx, const Propagator &u) const
 extrapolation of (single) FTS with (internal or user-supplied) propagator
TrajectoryStateOnSurface doExtrapolation (const TrajectoryStateOnSurface tsos, const GlobalPoint &vtx, const Propagator &u) const
 extrapolation of (multi) TSOS with (internal or user-supplied) propagator
ReferenceCountingPointer
< BoundPlane
tipSurface (const GlobalPoint &position, const GlobalVector &momentum, const double &signedTransverseRadius, const GlobalPoint &vtx) const
 computation of the TIP surface

Private Attributes

DeepCopyPointerByClone
< Propagator
thePropagator


Detailed Description

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

point of closest approach to vtx in 2D. The surface of the returned TrajectoryStateOnSurface is chosen centred on vtx; the axes of the local coordinate system (x_loc, y_loc, z_loc) are z_loc // trajectory direction in transverse plane 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 TransverseImpactPointExtrapolator.h.


Constructor & Destructor Documentation

TransverseImpactPointExtrapolator::TransverseImpactPointExtrapolator (  ) 

constructor with default geometrical propagator

Definition at line 15 of file TransverseImpactPointExtrapolator.cc.

00015                                                                       :
00016   thePropagator(0) {}

TransverseImpactPointExtrapolator::TransverseImpactPointExtrapolator ( const MagneticField field  ) 

constructor with default geometrical propagator

Definition at line 19 of file TransverseImpactPointExtrapolator.cc.

00019                                                                                                 :
00020   thePropagator(new AnalyticalPropagator(field, anyDirection)) {}

TransverseImpactPointExtrapolator::TransverseImpactPointExtrapolator ( const Propagator u  ) 

constructor with user-supplied propagator

Definition at line 22 of file TransverseImpactPointExtrapolator.cc.

References anyDirection, and thePropagator.

00022                                                                                          :
00023   thePropagator(u.clone()) 
00024 {
00025   thePropagator->setPropagationDirection(anyDirection);
00026 }


Member Function Documentation

TrajectoryStateOnSurface TransverseImpactPointExtrapolator::doExtrapolation ( const FreeTrajectoryState fts,
const GlobalPoint vtx,
const Propagator u 
) const [private]

extrapolation of (single) FTS with (internal or user-supplied) propagator

Definition at line 108 of file TransverseImpactPointExtrapolator.cc.

References Vector3DBase< T, FrameTag >::cross(), LogDebug, FreeTrajectoryState::momentum(), origin, FreeTrajectoryState::position(), Propagator::propagate(), tipSurface(), FreeTrajectoryState::transverseCurvature(), PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

00111 {
00112   //
00113   // Compute tip surface
00114   //
00115   if (fabs(fts.transverseCurvature())<1.E-6){
00116     LogDebug("TransverseImpactPointExtrapolator")<< "negligeable curvature: using a trick to extrapolate:\n"<<fts;
00117 
00118     //0T field probably
00119     //x is perpendicular to the momentum
00120     GlobalVector xLocal = GlobalVector(-fts.momentum().y(),fts.momentum().x(),0).unit();
00121     //y along global Z
00122     GlobalVector yLocal(0.,0.,1.);
00123     //z accordingly
00124     GlobalVector zLocal(xLocal.cross(yLocal));
00125 
00126     Surface::PositionType origin(vtx);
00127     Surface::RotationType rotation(xLocal,yLocal,zLocal);
00128     ReferenceCountingPointer<BoundPlane> surface =  PlaneBuilder().plane(origin,rotation);
00129     
00130     return p.propagate(fts,*surface);
00131   }else{
00132   ReferenceCountingPointer<BoundPlane> surface = 
00133     tipSurface(fts.position(),fts.momentum(),
00134                1./fts.transverseCurvature(),vtx);
00135   //
00136   // propagate
00137   //
00138   return p.propagate(fts,*surface);
00139   }
00140 }

TrajectoryStateOnSurface TransverseImpactPointExtrapolator::doExtrapolation ( const TrajectoryStateOnSurface  tsos,
const GlobalPoint vtx,
const Propagator u 
) const [private]

extrapolation of (multi) TSOS with (internal or user-supplied) propagator

Definition at line 73 of file TransverseImpactPointExtrapolator.cc.

References Vector3DBase< T, FrameTag >::cross(), TrajectoryStateOnSurface::freeState(), TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), LogDebug, origin, Propagator::propagate(), tipSurface(), FreeTrajectoryState::transverseCurvature(), TrajectoryStateOnSurface::transverseCurvature(), PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

Referenced by extrapolate().

00076 {
00077   //
00078   // Compute tip surface
00079   //
00080   if (fabs(tsos.freeState()->transverseCurvature())<1.E-6){
00081     LogDebug("TransverseImpactPointExtrapolator")<< "negligeable curvature: using a trick to extrapolate:\n"<<tsos;
00082 
00083     //0T field probably
00084     //x is perpendicular to the momentum
00085     GlobalVector xLocal = GlobalVector(-tsos.globalMomentum().y(),tsos.globalMomentum().x(),0).unit();
00086     //y along global Z
00087     GlobalVector yLocal(0.,0.,1.);
00088     //z accordingly
00089     GlobalVector zLocal(xLocal.cross(yLocal));
00090 
00091     Surface::PositionType origin(vtx);
00092     Surface::RotationType rotation(xLocal,yLocal,zLocal);
00093     ReferenceCountingPointer<BoundPlane> surface =  PlaneBuilder().plane(origin,rotation);
00094     
00095     return p.propagate(*tsos.freeState(),*surface);
00096   }else{
00097   ReferenceCountingPointer<BoundPlane> surface = 
00098     tipSurface(tsos.globalPosition(),tsos.globalMomentum(),
00099                1./tsos.transverseCurvature(),vtx);
00100   //
00101   // propagate
00102   //
00103   return p.propagate(tsos,*surface);
00104   }
00105 }

TrajectoryStateOnSurface TransverseImpactPointExtrapolator::extrapolate ( const TrajectoryStateOnSurface  tsos,
const GlobalPoint vtx,
const Propagator u 
) const

as above, but from TrajectoryStateOnSurface

Definition at line 58 of file TransverseImpactPointExtrapolator.cc.

References anyDirection, Propagator::clone(), doExtrapolation(), TrajectoryStateOnSurface::isValid(), and p.

00061 {
00062   if ( !tsos.isValid() )  return tsos;
00063   //
00064   // use clone of propagator for bidirectional propagation
00065   //
00066   DeepCopyPointerByClone<Propagator> p(u.clone());
00067   p->setPropagationDirection(anyDirection);
00068 
00069   return doExtrapolation(tsos,vtx,*p);
00070 } 

TrajectoryStateOnSurface TransverseImpactPointExtrapolator::extrapolate ( const FreeTrajectoryState fts,
const GlobalPoint vtx,
const Propagator u 
) const

extrapolation with user-supplied propagator

Definition at line 44 of file TransverseImpactPointExtrapolator.cc.

References anyDirection, Propagator::clone(), doExtrapolation(), and p.

00047 {
00048   //
00049   // use clone of propagator for bidirectional propagation
00050   //
00051   DeepCopyPointerByClone<Propagator> p(u.clone());
00052   p->setPropagationDirection(anyDirection);
00053 
00054   return doExtrapolation(fts,vtx,*p);
00055 } 

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

as above, but from TrajectoryStateOnSurface

Definition at line 36 of file TransverseImpactPointExtrapolator.cc.

References doExtrapolation(), TrajectoryStateOnSurface::isValid(), and thePropagator.

00038 {
00039   if ( !tsos.isValid() )  return tsos;
00040   return doExtrapolation(tsos, vtx, *thePropagator);
00041 }

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

extrapolation with default (=geometrical) propagator

Definition at line 29 of file TransverseImpactPointExtrapolator.cc.

References doExtrapolation(), and thePropagator.

Referenced by GroupedCkfTrajectoryBuilder::advanceOneLayer(), reco::TrackTransientTrack::calculateTSOSAtVertex(), reco::TransientTrackFromFTS::calculateTSOSAtVertex(), reco::GsfTransientTrack::calculateTSOSAtVertex(), PixelTrackBuilder::checkState(), MuonCkfTrajectoryBuilder::collectMeasurement(), MultiRefittedTS::computeFreeTrajectoryState(), GsfTrackProducerBase::fillMode(), CkfTrajectoryBuilder::findCompatibleMeasurements(), ElectronSiStripSeedGenerator::findSeedsFromCluster(), reco::TrackTransientTrack::stateOnSurface(), reco::GsfTransientTrack::stateOnSurface(), reco::TransientTrackFromFTS::stateOnSurface(), IPTools::transverseExtrapolate(), and SimpleNavigableLayer::wellInside().

00031 {
00032   return doExtrapolation(fts, vtx, *thePropagator);
00033 }

ReferenceCountingPointer< BoundPlane > TransverseImpactPointExtrapolator::tipSurface ( const GlobalPoint position,
const GlobalVector momentum,
const double &  signedTransverseRadius,
const GlobalPoint vtx 
) const [private]

computation of the TIP surface

Definition at line 143 of file TransverseImpactPointExtrapolator.cc.

References Vector3DBase< T, FrameTag >::cross(), LogDebug, PV3DBase< T, PVType, FrameType >::mag(), origin, PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

Referenced by doExtrapolation().

00147 {
00148 
00149   LogDebug("TransverseImpactPointExtrapolator")<< position<<"\n"
00150                                                     <<momentum<<"\n"
00151                                                     <<"signedTransverseRadius : "<<signedTransverseRadius<<"\n"
00152                                                     <<vertex;
00153 
00154   typedef Point2DBase<double,GlobalTag> PositionType2D;
00155   typedef Vector2DBase<double,GlobalTag> DirectionType2D;
00156   
00157   PositionType2D x0(position.x(),position.y());
00158   DirectionType2D t0(-momentum.y(),momentum.x());
00159   t0 = t0/t0.mag();
00160 
00161   PositionType2D xc(x0+signedTransverseRadius*t0);
00162 
00163   DirectionType2D vtxDirection(xc.x()-vertex.x(),xc.y()-vertex.y());
00164   double vtxDistance = vtxDirection.mag();
00165 
00166   Surface::PositionType origin(vertex);
00167   GlobalVector xLocal(vtxDirection.x()/vtxDistance,
00168                       vtxDirection.y()/vtxDistance,
00169                       0.);
00170   if ( vtxDistance<fabs(signedTransverseRadius) )  xLocal = -xLocal;
00171   GlobalVector yLocal(0.,0.,1.);
00172   GlobalVector zLocal(xLocal.cross(yLocal));
00173   if ( zLocal.dot(momentum)<0. ) {
00174     yLocal = -yLocal;
00175     zLocal = -zLocal;
00176   }
00177   Surface::RotationType rotation(xLocal,yLocal,zLocal);
00178   return PlaneBuilder().plane(origin,rotation);
00179 }


Member Data Documentation

DeepCopyPointerByClone<Propagator> TransverseImpactPointExtrapolator::thePropagator [private]

Definition at line 70 of file TransverseImpactPointExtrapolator.h.

Referenced by extrapolate(), and TransverseImpactPointExtrapolator().


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