CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

TransientTrackKinematicStateBuilder Class Reference

#include <TransientTrackKinematicStateBuilder.h>

List of all members.

Public Member Functions

KinematicState operator() (const reco::TransientTrack &track, const ParticleMass &m, float m_sigma) const
KinematicState operator() (const KinematicParameters &par, const KinematicParametersError &er, const TrackCharge &ch, const MagneticField *field) const
KinematicState operator() (const FreeTrajectoryState &state, const ParticleMass &mass, float m_sigma, const GlobalPoint &point) const
PerigeeKinematicState operator() (const KinematicState &state, const GlobalPoint &point) const
KinematicState operator() (const reco::TransientTrack &track, const GlobalPoint &point, const ParticleMass &m, float m_sigma) const
KinematicState operator() (const FreeTrajectoryState &state, const ParticleMass &mass, float m_sigma) const
 TransientTrackKinematicStateBuilder ()
 ~TransientTrackKinematicStateBuilder ()

Private Member Functions

KinematicState buildState (const FreeTrajectoryState &state, const ParticleMass &mass, float m_sigma) const

Private Attributes

TrackKinematicStatePropagator propagator

Detailed Description

Kinematic State builder for TransientTrack based kinematic states. Uses TrackKinematicStatePropagator for state propagation.

Definition at line 16 of file TransientTrackKinematicStateBuilder.h.


Constructor & Destructor Documentation

TransientTrackKinematicStateBuilder::TransientTrackKinematicStateBuilder ( ) [inline]

Definition at line 20 of file TransientTrackKinematicStateBuilder.h.

{}
TransientTrackKinematicStateBuilder::~TransientTrackKinematicStateBuilder ( ) [inline]

Definition at line 22 of file TransientTrackKinematicStateBuilder.h.

{}

Member Function Documentation

KinematicState TransientTrackKinematicStateBuilder::buildState ( const FreeTrajectoryState state,
const ParticleMass mass,
float  m_sigma 
) const [private]

Definition at line 56 of file TransientTrackKinematicStateBuilder.cc.

References FreeTrajectoryState::charge(), FreeTrajectoryState::curvilinearError(), GlobalTrajectoryParameters::magneticField(), FreeTrajectoryState::momentum(), FreeTrajectoryState::parameters(), FreeTrajectoryState::position(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

{ 
 AlgebraicVector7 par;
 AlgebraicSymMatrix77 cov;
 par(0) = state.position().x();
 par(1) = state.position().y();
 par(2) = state.position().z();
      
//getting the state of TransientTrack at the point
 par(3) = state.momentum().x();
 par(4) = state.momentum().y();
 par(5) = state.momentum().z();
 par(6) = mass;

//cartesian covariance matrix (x,y,z,p_x,p_y,p_z)
//and mass-related components stays unchanged
// if(!state.hasCartesianError()) throw VertexException("KinematicStateClosestToPointBuilder:: FTS passed has no error matrix!");

  FreeTrajectoryState curvFts(state.parameters(), state.curvilinearError());

//   cout <<"Transformation\n"<<curvFts.cartesianError().matrix()<<endl;
 cov.Place_at(curvFts.cartesianError().matrix(),0,0);
 cov(6,6) = m_sigma * m_sigma;

//making parameters & error
 KinematicParameters wPar(par);
 KinematicParametersError wEr(cov);
 return KinematicState(wPar,wEr,state.charge(), &state.parameters().magneticField());
}
KinematicState TransientTrackKinematicStateBuilder::operator() ( const reco::TransientTrack track,
const GlobalPoint point,
const ParticleMass m,
float  m_sigma 
) const

Operator creating a KinematicState out of a RecObj and propagating it to the given point using propagator provided by user

Definition at line 21 of file TransientTrackKinematicStateBuilder.cc.

References m, TrajectoryStateClosestToPoint::theState(), and reco::TransientTrack::trajectoryStateClosestToPoint().

{
//  FreeTrajectoryState  recState = track.trajectoryStateClosestToPoint(point).theState();
 return buildState( track.trajectoryStateClosestToPoint(point).theState(), m, m_sigma);
} 
PerigeeKinematicState TransientTrackKinematicStateBuilder::operator() ( const KinematicState state,
const GlobalPoint point 
) const
KinematicState TransientTrackKinematicStateBuilder::operator() ( const FreeTrajectoryState state,
const ParticleMass mass,
float  m_sigma,
const GlobalPoint point 
) const

Operator to create a particle state at point using the FreeTrajectoryState, charge and mass guess for the particle. The state will be created by propagating FTS to the transvese point of closest approach to the given point

Definition at line 35 of file TransientTrackKinematicStateBuilder.cc.

References FreeTrajectoryState::position(), LargeD0_PixelPairStep_cff::propagator, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

{
//building initial kinematic state 
 KinematicState res = buildState(state,mass,m_sigma);
 
//and propagating it to given point if needed
 GlobalPoint inPos = state.position();
 if((inPos.x() != point.x())||(inPos.y() != point.y())||(inPos.z() != point.z()))
 {res = propagator.propagateToTheTransversePCA(res,point);}  
 return res; 
}
KinematicState TransientTrackKinematicStateBuilder::operator() ( const FreeTrajectoryState state,
const ParticleMass mass,
float  m_sigma 
) const

Operator to create a particle state at point using the FreeTrajectoryState, charge and mass guess for the particle. The state will be created with the reference point taken from the FTS

Definition at line 28 of file TransientTrackKinematicStateBuilder.cc.

{
//building initial kinematic state 
 return buildState(state,mass,m_sigma); 
}
KinematicState TransientTrackKinematicStateBuilder::operator() ( const reco::TransientTrack track,
const ParticleMass m,
float  m_sigma 
) const

Operator creating a KinematcState at RecObj definition point with given mass guess and sigma

Definition at line 6 of file TransientTrackKinematicStateBuilder.cc.

References TrajectoryStateOnSurface::freeState(), and reco::TransientTrack::impactPointState().

{ 
// FreeTrajectoryState * recState = track.impactPointState().freeState(); 
 return buildState(*(track.impactPointState().freeState()), m, m_sigma);
} 
KinematicState TransientTrackKinematicStateBuilder::operator() ( const KinematicParameters par,
const KinematicParametersError er,
const TrackCharge ch,
const MagneticField field 
) const

Operator creating a KinematicState directly out of 7 state parameters and their covariance matrix

Definition at line 14 of file TransientTrackKinematicStateBuilder.cc.

{
  return KinematicState(par, er, ch, field);
}

Member Data Documentation

Definition at line 74 of file TransientTrackKinematicStateBuilder.h.