CMS 3D CMS Logo

TrackKinematicStatePropagator Class Reference

Propagator for TransientTrack based KinematicStates. More...

#include <RecoVertex/KinematicFitPrimitives/interface/TrackKinematicStatePropagator.h>

Inheritance diagram for TrackKinematicStatePropagator:

KinematicStatePropagator

List of all members.

Public Member Functions

virtual KinematicStatePropagatorclone () const
 Clone method reimplemented from abstract class.
virtual std::pair
< HelixBarrelPlaneCrossingByCircle,
BoundPlane * > 
planeCrossing (const FreeTrajectoryState &par, const GlobalPoint &point) const
virtual KinematicState propagateToTheTransversePCA (const KinematicState &state, const GlobalPoint &referencePoint) const
 Propagation to the point of closest approach in transverse plane to the given point.
 TrackKinematicStatePropagator ()
virtual ~TrackKinematicStatePropagator ()

Private Types

typedef Point3DBase< double,
GlobalTag
GlobalPointDouble
typedef Vector3DBase< double,
GlobalTag
GlobalVectorDouble

Private Member Functions

virtual KinematicState propagateToTheTransversePCACharged (const KinematicState &state, const GlobalPoint &referencePoint) const
 Internal private methods, distinguishing between the propagation of neutrals and propagation of cahrged tracks.
virtual KinematicState propagateToTheTransversePCANeutral (const KinematicState &state, const GlobalPoint &referencePoint) const


Detailed Description

Propagator for TransientTrack based KinematicStates.

Does not include the material.

Definition at line 18 of file TrackKinematicStatePropagator.h.


Member Typedef Documentation

typedef Point3DBase< double, GlobalTag> TrackKinematicStatePropagator::GlobalPointDouble [private]

Definition at line 53 of file TrackKinematicStatePropagator.h.

typedef Vector3DBase< double, GlobalTag> TrackKinematicStatePropagator::GlobalVectorDouble [private]

Definition at line 54 of file TrackKinematicStatePropagator.h.


Constructor & Destructor Documentation

TrackKinematicStatePropagator::TrackKinematicStatePropagator (  )  [inline]

Definition at line 22 of file TrackKinematicStatePropagator.h.

Referenced by clone().

00022 {}

virtual TrackKinematicStatePropagator::~TrackKinematicStatePropagator (  )  [inline, virtual]

Definition at line 24 of file TrackKinematicStatePropagator.h.

00024 {}


Member Function Documentation

virtual KinematicStatePropagator* TrackKinematicStatePropagator::clone ( void   )  const [inline, virtual]

Clone method reimplemented from abstract class.

Implements KinematicStatePropagator.

Definition at line 40 of file TrackKinematicStatePropagator.h.

References TrackKinematicStatePropagator().

00041  {return new TrackKinematicStatePropagator(*this);}

pair< HelixBarrelPlaneCrossingByCircle, BoundPlane * > TrackKinematicStatePropagator::planeCrossing ( const FreeTrajectoryState par,
const GlobalPoint point 
) const [virtual]

Definition at line 21 of file TrackKinematicStatePropagator.cc.

References anyDirection, FreeTrajectoryState::charge(), direction, MagneticField::inInverseGeV(), GlobalTrajectoryParameters::magneticField(), FreeTrajectoryState::momentum(), FreeTrajectoryState::parameters(), HelixBarrelPlaneCrossingByCircle::pathLength(), FreeTrajectoryState::position(), rot, FreeTrajectoryState::transverseCurvature(), Vector3DBase< T, FrameTag >::unit(), PV3DBase< T, PVType, FrameType >::x(), X, PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by propagateToTheTransversePCACharged().

00023 {
00024  GlobalPoint inPos = state.position();
00025  GlobalVector inMom = state.momentum();
00026  double kappa = state.transverseCurvature();
00027  double fac = 1./state.charge()/state.parameters().magneticField().inInverseGeV(point).z();
00028  
00029  GlobalVectorDouble xOrig2Centre = GlobalVectorDouble(fac * inMom.y(), -fac * inMom.x(), 0.);
00030  GlobalVectorDouble xOrigProj = GlobalVectorDouble(inPos.x(), inPos.y(), 0.);
00031  GlobalVectorDouble xRefProj = GlobalVectorDouble(point.x(), point.y(), 0.);
00032  GlobalVectorDouble deltax = xRefProj-xOrigProj-xOrig2Centre;
00033  GlobalVectorDouble ndeltax = deltax.unit();
00034   
00035  PropagationDirection direction = anyDirection;
00036  Surface::PositionType pos(point);
00037   
00038 // Need to define plane with orientation as the ImpactPointSurface
00039  GlobalVector X(ndeltax.x(), ndeltax.y(), ndeltax.z());
00040  GlobalVector Y(0.,0.,1.);
00041  Surface::RotationType rot(X,Y);
00042  BoundPlane* plane = new BoundPlane(pos,rot);
00043  HelixBarrelPlaneCrossingByCircle 
00044    planeCrossing(HelixPlaneCrossing::PositionType(inPos.x(), inPos.y(), inPos.z()),
00045                  HelixPlaneCrossing::DirectionType(inMom.x(), inMom.y(), inMom.z()), 
00046                  kappa, direction);
00047  pair<bool,double> propResult = planeCrossing.pathLength(*plane);
00048  if ( !propResult.first ) throw VertexException("KinematicStatePropagator without material::propagation failed!");
00049  return pair<HelixBarrelPlaneCrossingByCircle,BoundPlane *>(planeCrossing,plane);
00050 }

KinematicState TrackKinematicStatePropagator::propagateToTheTransversePCA ( const KinematicState state,
const GlobalPoint referencePoint 
) const [virtual]

Propagation to the point of closest approach in transverse plane to the given point.

Implements KinematicStatePropagator.

Definition at line 11 of file TrackKinematicStatePropagator.cc.

References KinematicState::particleCharge().

Referenced by TransientTrackKinematicStateBuilder::operator()().

00012 {
00013  if( state.particleCharge() == 0. ) {
00014     return propagateToTheTransversePCANeutral(state, referencePoint);
00015   } else {
00016     return propagateToTheTransversePCACharged(state, referencePoint);
00017   }
00018 }

KinematicState TrackKinematicStatePropagator::propagateToTheTransversePCACharged ( const KinematicState state,
const GlobalPoint referencePoint 
) const [private, virtual]

Internal private methods, distinguishing between the propagation of neutrals and propagation of cahrged tracks.

Definition at line 55 of file TrackKinematicStatePropagator.cc.

References HelixBarrelPlaneCrossingByCircle::direction(), KinematicState::freeTrajectoryState(), KinematicState::globalMomentum(), KinematicState::globalPosition(), JacobianCurvilinearToCartesian::jacobian(), KinematicState::kinematicParametersError(), PV3DBase< T, PVType, FrameType >::mag(), KinematicState::magneticField(), KinematicState::mass(), KinematicParametersError::matrix(), KinematicState::particleCharge(), HelixBarrelPlaneCrossingByCircle::pathLength(), planeCrossing(), HelixBarrelPlaneCrossingByCircle::position(), s, Basic3DVector< T >::x(), Basic3DVector< T >::y(), and Basic3DVector< T >::z().

00056 {
00057 //first use the existing FTS propagator to obtain parameters at PCA
00058 //in transverse plane to the given point
00059 
00060 //final parameters and covariance
00061   AlgebraicVector7 par;
00062   AlgebraicSymMatrix77 cov;
00063     
00064 //initial parameters as class and vectors:  
00065   GlobalTrajectoryParameters inPar(state.globalPosition(),state.globalMomentum(), 
00066                 state.particleCharge(), state.magneticField());
00067   ParticleMass mass = state.mass();                                                       
00068   GlobalVector inMom = state.globalMomentum();                                                    
00069   
00070 //making a free trajectory state and looking 
00071 //for helix barrel plane crossing  
00072   FreeTrajectoryState fState = state.freeTrajectoryState();             
00073   GlobalPoint iP = referencePoint;                                        
00074   pair<HelixBarrelPlaneCrossingByCircle, BoundPlane *> cros = planeCrossing(fState,iP);    
00075   
00076   HelixBarrelPlaneCrossingByCircle planeCrossing = cros.first; 
00077   BoundPlane * plane = cros.second;
00078   pair<bool,double> propResult = planeCrossing.pathLength(*plane);
00079   double s = propResult.second;
00080   
00081   HelixPlaneCrossing::PositionType xGen = planeCrossing.position(s);
00082   GlobalPoint nPosition(xGen.x(),xGen.y(),xGen.z());
00083   HelixPlaneCrossing::DirectionType pGen = planeCrossing.direction(s);
00084   pGen *= inMom.mag()/pGen.mag();
00085   GlobalVector nMomentum(pGen.x(),pGen.y(),pGen.z()); 
00086   par(0) = nPosition.x();
00087   par(1) = nPosition.y();
00088   par(2) = nPosition.z();
00089   par(3) = nMomentum.x();
00090   par(4) = nMomentum.y();
00091   par(5) = nMomentum.z();
00092   par(6) = mass;
00093   
00094 //covariance matrix business  
00095 //elements of 7x7 covariance matrix responcible for the mass and
00096 //mass - momentum projections corellations do change under such a transformation:
00097 //special Jacobian needed  
00098   GlobalTrajectoryParameters fPar(nPosition, nMomentum, state.particleCharge(),
00099                                 state.magneticField());
00100                                                                                                   
00101   JacobianCartesianToCurvilinear cart2curv(inPar);
00102   JacobianCurvilinearToCartesian curv2cart(fPar);
00103   
00104   AlgebraicMatrix67 ca2cu;
00105   AlgebraicMatrix76 cu2ca;
00106   ca2cu.Place_at(cart2curv.jacobian(),0,0);
00107   cu2ca.Place_at(curv2cart.jacobian(),0,0);
00108   ca2cu(5,6) = 1;  
00109   cu2ca(6,5) = 1;
00110 
00111 //now both transformation jacobians: cartesian to curvilinear and back are done
00112 //We transform matrix to curv frame, then propagate it and translate it back to
00113 //cartesian frame.  
00114   AlgebraicSymMatrix66 cov1 = ROOT::Math::Similarity(ca2cu, state.kinematicParametersError().matrix());
00115 
00116 //propagation jacobian
00117   AnalyticalCurvilinearJacobian prop(inPar,nPosition,nMomentum,s);
00118   AlgebraicMatrix66 pr;
00119   pr(5,5) = 1;
00120   pr.Place_at(prop.jacobian(),0,0);
00121 
00122 //transportation
00123   AlgebraicSymMatrix66 cov2 = ROOT::Math::Similarity(pr, cov1);
00124   
00125 //now geting back to 7-parametrization from curvilinear
00126   cov = ROOT::Math::Similarity(cu2ca, cov2);
00127   
00128 //return parameters as a kiematic state  
00129   KinematicParameters resPar(par);
00130   KinematicParametersError resEr(cov);
00131   return  KinematicState(resPar,resEr,state.particleCharge(), state.magneticField()); 
00132  }

KinematicState TrackKinematicStatePropagator::propagateToTheTransversePCANeutral ( const KinematicState state,
const GlobalPoint referencePoint 
) const [private, virtual]

Definition at line 135 of file TrackKinematicStatePropagator.cc.

References funct::cos(), KinematicState::freeTrajectoryState(), KinematicState::globalMomentum(), KinematicState::globalPosition(), JacobianCurvilinearToCartesian::jacobian(), KinematicState::kinematicParameters(), KinematicState::kinematicParametersError(), KinematicState::magneticField(), KinematicParametersError::matrix(), KinematicState::particleCharge(), phi, FreeTrajectoryState::position(), s, funct::sin(), funct::tan(), theta, KinematicParameters::vector(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

00136 {
00137 //new parameters vector and covariance:
00138  AlgebraicVector7 par;
00139  AlgebraicSymMatrix77 cov;
00140  
00141  AlgebraicVector7 inStatePar = state.kinematicParameters().vector();
00142  GlobalTrajectoryParameters inPar(state.globalPosition(),state.globalMomentum(), 
00143                 state.particleCharge(), state.magneticField());
00144  
00145 //first making a free trajectory state and propagating it according
00146 //to the algorithm provided by Thomas Speer and Wolfgang Adam 
00147  FreeTrajectoryState fState = state.freeTrajectoryState();
00148   
00149  GlobalPoint xvecOrig = fState.position();
00150  double phi = fState.momentum().phi();
00151  double theta = fState.momentum().theta();
00152  double xOrig = xvecOrig.x();
00153  double yOrig = xvecOrig.y();
00154  double zOrig = xvecOrig.z();
00155  double xR = referencePoint.x();
00156  double yR = referencePoint.y();
00157 
00158  double s2D = (xR - xOrig)  * cos(phi) + (yR - yOrig)  * sin(phi);
00159  double s = s2D / sin(theta);
00160  double xGen = xOrig + s2D*cos(phi);
00161  double yGen = yOrig + s2D*sin(phi);
00162  double zGen = zOrig + s2D/tan(theta);
00163  GlobalPoint xPerigee = GlobalPoint(xGen, yGen, zGen);
00164 
00165 //new parameters
00166  GlobalVector pPerigee = fState.momentum();
00167  par(0) = xPerigee.x();
00168  par(1) = xPerigee.y(); 
00169  par(2) = xPerigee.z(); 
00170  par(3) = pPerigee.x(); 
00171  par(4) = pPerigee.y(); 
00172  par(5) = pPerigee.z(); 
00173  par(6) = inStatePar(7);
00174 
00175 //covariance matrix business:
00176 //everything lake it was before: jacobains are smart enouhg to 
00177 //distinguish between neutral and charged states themselves
00178 
00179  GlobalTrajectoryParameters fPar(xPerigee, pPerigee, state.particleCharge(),
00180                                 state.magneticField());
00181 
00182  JacobianCartesianToCurvilinear cart2curv(inPar);
00183  JacobianCurvilinearToCartesian curv2cart(fPar);
00184   
00185   AlgebraicMatrix67 ca2cu;
00186   AlgebraicMatrix76 cu2ca;
00187   ca2cu.Place_at(cart2curv.jacobian(),0,0);
00188   cu2ca.Place_at(curv2cart.jacobian(),0,0);
00189   ca2cu(5,6) = 1;  
00190   cu2ca(6,5) = 1;
00191 
00192 //now both transformation jacobians: cartesian to curvilinear and back are done
00193 //We transform matrix to curv frame, then propagate it and translate it back to
00194 //cartesian frame.  
00195   AlgebraicSymMatrix66 cov1 = ROOT::Math::Similarity(ca2cu, state.kinematicParametersError().matrix());
00196 
00197 //propagation jacobian
00198   AnalyticalCurvilinearJacobian prop(inPar,xPerigee,pPerigee,s);
00199   AlgebraicMatrix66 pr;
00200   pr(5,5) = 1;
00201   pr.Place_at(prop.jacobian(),0,0);
00202   
00203 //transportation
00204   AlgebraicSymMatrix66 cov2 = ROOT::Math::Similarity(pr, cov1);
00205   
00206 //now geting back to 7-parametrization from curvilinear
00207   cov = ROOT::Math::Similarity(cu2ca, cov2);
00208  
00209 //return parameters as a kiematic state  
00210  KinematicParameters resPar(par);
00211  KinematicParametersError resEr(cov);
00212  return  KinematicState(resPar,resEr,state.particleCharge(), state.magneticField());    
00213 }


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