CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
TransientTrackKinematicStateBuilder Class Reference

#include <TransientTrackKinematicStateBuilder.h>

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 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
 
KinematicState operator() (const FreeTrajectoryState &state, const ParticleMass &mass, float m_sigma, const GlobalPoint &point) const
 
PerigeeKinematicState operator() (const KinematicState &state, const GlobalPoint &point) 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.

20 {}
TransientTrackKinematicStateBuilder::~TransientTrackKinematicStateBuilder ( )
inline

Definition at line 22 of file TransientTrackKinematicStateBuilder.h.

22 {}

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(), scaleCards::mass, FreeTrajectoryState::momentum(), FreeTrajectoryState::parameters(), FreeTrajectoryState::position(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

58 {
59  AlgebraicVector7 par;
61  par(0) = state.position().x();
62  par(1) = state.position().y();
63  par(2) = state.position().z();
64 
65 //getting the state of TransientTrack at the point
66  par(3) = state.momentum().x();
67  par(4) = state.momentum().y();
68  par(5) = state.momentum().z();
69  par(6) = mass;
70 
71 //cartesian covariance matrix (x,y,z,p_x,p_y,p_z)
72 //and mass-related components stays unchanged
73 // if(!state.hasCartesianError()) throw VertexException("KinematicStateClosestToPointBuilder:: FTS passed has no error matrix!");
74 
75  FreeTrajectoryState curvFts(state.parameters(), state.curvilinearError());
76 
77 // cout <<"Transformation\n"<<curvFts.cartesianError().matrix()<<endl;
78  cov.Place_at(curvFts.cartesianError().matrix(),0,0);
79  cov(6,6) = m_sigma * m_sigma;
80 
81 //making parameters & error
82  KinematicParameters wPar(par);
83  KinematicParametersError wEr(cov);
84  return KinematicState(wPar,wEr,state.charge(), &state.parameters().magneticField());
85 }
const GlobalTrajectoryParameters & parameters() const
T y() const
Definition: PV3DBase.h:62
TrackCharge charge() const
const CurvilinearTrajectoryError & curvilinearError() const
ROOT::Math::SMatrix< double, 7, 7, ROOT::Math::MatRepSym< double, 7 > > AlgebraicSymMatrix77
Definition: Matrices.h:8
ROOT::Math::SVector< double, 7 > AlgebraicVector7
Definition: Matrices.h:7
T z() const
Definition: PV3DBase.h:63
GlobalVector momentum() const
GlobalPoint position() const
tuple mass
Definition: scaleCards.py:27
const MagneticField & magneticField() const
T x() const
Definition: PV3DBase.h:61
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().

8 {
9 // FreeTrajectoryState * recState = track.impactPointState().freeState();
10  return buildState(*(track.impactPointState().freeState()), m, m_sigma);
11 }
FreeTrajectoryState * freeState(bool withErrors=true) const
KinematicState buildState(const FreeTrajectoryState &state, const ParticleMass &mass, float m_sigma) const
TrajectoryStateOnSurface impactPointState() const
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.

17 {
18  return KinematicState(par, er, ch, field);
19 }
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().

23 {
24 // FreeTrajectoryState recState = track.trajectoryStateClosestToPoint(point).theState();
25  return buildState( track.trajectoryStateClosestToPoint(point).theState(), m, m_sigma);
26 }
const FreeTrajectoryState & theState() const
TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const GlobalPoint &point) const
KinematicState buildState(const FreeTrajectoryState &state, const ParticleMass &mass, float m_sigma) const
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.

30 {
31 //building initial kinematic state
32  return buildState(state,mass,m_sigma);
33 }
KinematicState buildState(const FreeTrajectoryState &state, const ParticleMass &mass, float m_sigma) const
tuple mass
Definition: scaleCards.py:27
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().

37 {
38 //building initial kinematic state
39  KinematicState res = buildState(state,mass,m_sigma);
40 
41 //and propagating it to given point if needed
42  GlobalPoint inPos = state.position();
43  if((inPos.x() != point.x())||(inPos.y() != point.y())||(inPos.z() != point.z()))
44  {res = propagator.propagateToTheTransversePCA(res,point);}
45  return res;
46 }
T y() const
Definition: PV3DBase.h:62
T z() const
Definition: PV3DBase.h:63
GlobalPoint position() const
KinematicState buildState(const FreeTrajectoryState &state, const ParticleMass &mass, float m_sigma) const
virtual KinematicState propagateToTheTransversePCA(const KinematicState &state, const GlobalPoint &referencePoint) const
tuple mass
Definition: scaleCards.py:27
T x() const
Definition: PV3DBase.h:61
PerigeeKinematicState TransientTrackKinematicStateBuilder::operator() ( const KinematicState state,
const GlobalPoint point 
) const

Definition at line 48 of file TransientTrackKinematicStateBuilder.cc.

References LargeD0_PixelPairStep_cff::propagator.

50 {
52  return PerigeeKinematicState(nState, point);
53 }
virtual KinematicState propagateToTheTransversePCA(const KinematicState &state, const GlobalPoint &referencePoint) const

Member Data Documentation

TrackKinematicStatePropagator TransientTrackKinematicStateBuilder::propagator
private

Definition at line 74 of file TransientTrackKinematicStateBuilder.h.