CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
KinematicRefittedTrackState Class Reference

#include <KinematicRefittedTrackState.h>

Inheritance diagram for KinematicRefittedTrackState:
RefittedTrackState< 6 > ReferenceCounted

Public Types

typedef ReferenceCountingPointer< RefittedTrackState< 6 > > RefCountedRefittedTrackState
 
- Public Types inherited from RefittedTrackState< 6 >
typedef ROOT::Math::SMatrix< double, N, N, ROOT::Math::MatRepSym< double, N > > AlgebraicSymMatrixNN
 
typedef ROOT::Math::SVector< double, N - 2 > AlgebraicVectorM
 
typedef ROOT::Math::SVector< double, NAlgebraicVectorN
 

Public Member Functions

std::vector< ReferenceCountingPointer< RefittedTrackState< 6 > > > components () const override
 
AlgebraicSymMatrix66 covariance () const override
 
FreeTrajectoryState freeTrajectoryState () const override
 
AlgebraicVector4 kinematicMomentumVector () const
 
AlgebraicVector7 kinematicParameters () const
 
AlgebraicSymMatrix77 kinematicParametersCovariance () const
 
 KinematicRefittedTrackState (const KinematicState &st, const AlgebraicVector4 &mv)
 
AlgebraicVector4 momentumVector () const override
 
AlgebraicVector6 parameters () const override
 
GlobalPoint position () const override
 
ReferenceCountingPointer< RefittedTrackState< 6 > > stateWithNewWeight (const double newWeight) const override
 
TrajectoryStateOnSurface trajectoryStateOnSurface (const Surface &surface) const override
 
TrajectoryStateOnSurface trajectoryStateOnSurface (const Surface &surface, const Propagator &propagator) const override
 
reco::TransientTrack transientTrack () const override
 
double weight () const override
 
- Public Member Functions inherited from RefittedTrackState< 6 >
 ~RefittedTrackState () override
 

Private Attributes

AlgebraicVector4 momentumAtVertex
 
KinematicState state
 

Detailed Description

Refitted state for kinematic parameters To be used in KinematicParticleVertxFitter only. Class caches the refitted state of the particle and provide access to its parameters in both parametrizations: Kinemaic and extended Perigee.

Several methods are done just to be consistent with present KalmanVertexFitter structure

Definition at line 21 of file KinematicRefittedTrackState.h.

Member Typedef Documentation

◆ RefCountedRefittedTrackState

Definition at line 23 of file KinematicRefittedTrackState.h.

Constructor & Destructor Documentation

◆ KinematicRefittedTrackState()

KinematicRefittedTrackState::KinematicRefittedTrackState ( const KinematicState st,
const AlgebraicVector4 mv 
)

Definition at line 6 of file KinematicRefittedTrackState.cc.

6  {
7  state = st;
8  momentumAtVertex = mv;
9 }

References momentumAtVertex, and state.

Member Function Documentation

◆ components()

std::vector< ReferenceCountingPointer< RefittedTrackState< 6 > > > KinematicRefittedTrackState::components ( ) const
overridevirtual

Implements RefittedTrackState< 6 >.

Definition at line 65 of file KinematicRefittedTrackState.cc.

65  {
66  std::vector<RefCountedRefittedTrackState> result;
67  result.reserve(1);
68  result.push_back(RefCountedRefittedTrackState(const_cast<KinematicRefittedTrackState*>(this)));
69  return result;
70 }

References mps_fire::result.

◆ covariance()

AlgebraicSymMatrix66 KinematicRefittedTrackState::covariance ( void  ) const
overridevirtual

Kinmatic perigee covariance

Implements RefittedTrackState< 6 >.

Definition at line 16 of file KinematicRefittedTrackState.cc.

16  {
17  throw VertexException("KinematicRefittedTrackState::Fishy covariance called");
18  return AlgebraicSymMatrix66();
19 }

◆ freeTrajectoryState()

FreeTrajectoryState KinematicRefittedTrackState::freeTrajectoryState ( ) const
overridevirtual

FTS out of kinematic parameters

Implements RefittedTrackState< 6 >.

Definition at line 29 of file KinematicRefittedTrackState.cc.

29 { return state.freeTrajectoryState(); }

References KinematicState::freeTrajectoryState(), and state.

Referenced by trajectoryStateOnSurface().

◆ kinematicMomentumVector()

AlgebraicVector4 KinematicRefittedTrackState::kinematicMomentumVector ( ) const

Kinematic momentum vector

Definition at line 33 of file KinematicRefittedTrackState.cc.

33  {
36  mr[0] = mm.x();
37  mr[1] = mm.y();
38  mr[2] = mm.z();
39  mr[3] = state.mass();
40  return mr;
41 }

References KinematicState::globalMomentum(), KinematicState::mass(), HLTObjectMonitor_cfi::mr, state, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by FinalTreeBuilder::buildTree().

◆ kinematicParameters()

AlgebraicVector7 KinematicRefittedTrackState::kinematicParameters ( ) const

Access to Kinematic parameters

Definition at line 21 of file KinematicRefittedTrackState.cc.

21  {
22  return state.kinematicParameters().vector();
23 }

References KinematicState::kinematicParameters(), state, and KinematicParameters::vector().

Referenced by FinalTreeBuilder::buildTree().

◆ kinematicParametersCovariance()

AlgebraicSymMatrix77 KinematicRefittedTrackState::kinematicParametersCovariance ( ) const

Kinmatic covariance

Definition at line 25 of file KinematicRefittedTrackState.cc.

25  {
27 }

References KinematicState::kinematicParametersError(), KinematicParametersError::matrix(), and state.

Referenced by FinalTreeBuilder::buildTree().

◆ momentumVector()

AlgebraicVector4 KinematicRefittedTrackState::momentumVector ( ) const
overridevirtual

Perigee momentum vector

Implements RefittedTrackState< 6 >.

Definition at line 43 of file KinematicRefittedTrackState.cc.

43 { return momentumAtVertex; }

References momentumAtVertex.

◆ parameters()

AlgebraicVector6 KinematicRefittedTrackState::parameters ( void  ) const
overridevirtual

Access to Kinematic perigee parameters

Implements RefittedTrackState< 6 >.

Definition at line 11 of file KinematicRefittedTrackState.cc.

11  {
13  return conv.extendedPerigeeFromKinematicParameters(state, state.globalPosition()).vector();
14 }

References conv, KinematicState::globalPosition(), state, and trackerHitRTTI::vector.

◆ position()

GlobalPoint KinematicRefittedTrackState::position ( ) const
overridevirtual

Position at which the momentum is defined.

Implements RefittedTrackState< 6 >.

Definition at line 31 of file KinematicRefittedTrackState.cc.

31 { return state.globalPosition(); }

References KinematicState::globalPosition(), and state.

◆ stateWithNewWeight()

ReferenceCountingPointer< RefittedTrackState< 6 > > KinematicRefittedTrackState::stateWithNewWeight ( const double  newWeight) const
overridevirtual

Returns a new refitted state of the same type, but with another weight. The current state is unchanged.

Implements RefittedTrackState< 6 >.

Definition at line 59 of file KinematicRefittedTrackState.cc.

60  {
61  std::cout << "WARNING: Change weight for Kinematic state called, weigt will stay to be equal 1." << std::endl;
62  return RefCountedRefittedTrackState(const_cast<KinematicRefittedTrackState*>(this));
63 }

References gather_cfg::cout.

◆ trajectoryStateOnSurface() [1/2]

TrajectoryStateOnSurface KinematicRefittedTrackState::trajectoryStateOnSurface ( const Surface surface) const
overridevirtual

Transformation into a TSOS at a given surface

Implements RefittedTrackState< 6 >.

Definition at line 45 of file KinematicRefittedTrackState.cc.

45  {
47  return thePropagator.propagate(freeTrajectoryState(), surface);
48 }

References anyDirection, freeTrajectoryState(), KinematicState::magneticField(), AnalyticalPropagator::propagate(), and state.

◆ trajectoryStateOnSurface() [2/2]

TrajectoryStateOnSurface KinematicRefittedTrackState::trajectoryStateOnSurface ( const Surface surface,
const Propagator propagator 
) const
overridevirtual

Transformation into a TSOS at a given surface, with a given propagator

Implements RefittedTrackState< 6 >.

Definition at line 50 of file KinematicRefittedTrackState.cc.

51  {
52  std::unique_ptr<Propagator> thePropagator(propagator.clone());
53  thePropagator->setPropagationDirection(anyDirection);
54  return thePropagator->propagate(freeTrajectoryState(), surface);
55 }

References anyDirection, freeTrajectoryState(), and TrackCandidateProducer_cfi::propagator.

◆ transientTrack()

reco::TransientTrack KinematicRefittedTrackState::transientTrack ( ) const
overridevirtual

Implements RefittedTrackState< 6 >.

Definition at line 72 of file KinematicRefittedTrackState.cc.

72  {
73  throw VertexException("KinematicRefittedTrackState::Can Not write a TransientTrack");
74  // TransientTrackFromFTSFactory factory;
75  // return factory.build(freeTrajectoryState());
76 }

◆ weight()

double KinematicRefittedTrackState::weight ( ) const
overridevirtual

The weight of this component in a mixture

Implements RefittedTrackState< 6 >.

Definition at line 57 of file KinematicRefittedTrackState.cc.

57 { return 1.; }

Member Data Documentation

◆ momentumAtVertex

AlgebraicVector4 KinematicRefittedTrackState::momentumAtVertex
private

Definition at line 79 of file KinematicRefittedTrackState.h.

Referenced by KinematicRefittedTrackState(), and momentumVector().

◆ state

KinematicState KinematicRefittedTrackState::state
private
Vector3DBase
Definition: Vector3DBase.h:8
anyDirection
Definition: PropagationDirection.h:4
VertexException
Common base class.
Definition: VertexException.h:12
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
conv
static HepMC::IO_HEPEVT conv
Definition: BeamHaloProducer.cc:48
KinematicPerigeeConversions
Definition: KinematicPerigeeConversions.h:17
gather_cfg.cout
cout
Definition: gather_cfg.py:144
KinematicState::globalMomentum
GlobalVector globalMomentum() const
Definition: KinematicState.h:67
KinematicRefittedTrackState::state
KinematicState state
Definition: KinematicRefittedTrackState.h:78
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
TrackCandidateProducer_cfi.propagator
propagator
Definition: TrackCandidateProducer_cfi.py:17
AlgebraicSymMatrix66
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > AlgebraicSymMatrix66
Definition: AlgebraicROOTObjects.h:24
KinematicState::kinematicParametersError
KinematicParametersError const & kinematicParametersError() const
Definition: KinematicState.h:63
KinematicRefittedTrackState::RefCountedRefittedTrackState
ReferenceCountingPointer< RefittedTrackState< 6 > > RefCountedRefittedTrackState
Definition: KinematicRefittedTrackState.h:23
KinematicParametersError::matrix
AlgebraicSymMatrix77 const & matrix() const
Definition: KinematicParametersError.h:36
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
KinematicRefittedTrackState::momentumAtVertex
AlgebraicVector4 momentumAtVertex
Definition: KinematicRefittedTrackState.h:79
KinematicState::mass
ParticleMass mass() const
Definition: KinematicState.h:54
AnalyticalPropagator
Definition: AnalyticalPropagator.h:22
AlgebraicVector4
ROOT::Math::SVector< double, 4 > AlgebraicVector4
Definition: AlgebraicROOTObjects.h:13
KinematicRefittedTrackState::freeTrajectoryState
FreeTrajectoryState freeTrajectoryState() const override
Definition: KinematicRefittedTrackState.cc:29
KinematicParameters::vector
AlgebraicVector7 const & vector() const
The full vector (7 elements)
Definition: KinematicParameters.h:31
KinematicState::magneticField
const MagneticField * magneticField() const
Definition: KinematicState.h:86
mps_fire.result
result
Definition: mps_fire.py:311
KinematicState::kinematicParameters
KinematicParameters const & kinematicParameters() const
Definition: KinematicState.h:61
HLTObjectMonitor_cfi.mr
mr
Definition: HLTObjectMonitor_cfi.py:366
KinematicState::freeTrajectoryState
FreeTrajectoryState freeTrajectoryState() const
Definition: KinematicState.h:77
AnalyticalPropagator::propagate
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
KinematicState::globalPosition
GlobalPoint globalPosition() const
Definition: KinematicState.h:69