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

Definition at line 23 of file KinematicRefittedTrackState.h.

Constructor & Destructor Documentation

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

Definition at line 6 of file KinematicRefittedTrackState.cc.

References momentumAtVertex, and state.

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

Member Function Documentation

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

Implements RefittedTrackState< 6 >.

Definition at line 65 of file KinematicRefittedTrackState.cc.

References mps_fire::result.

65  {
66  std::vector<RefCountedRefittedTrackState> result;
67  result.reserve(1);
68  result.push_back(RefCountedRefittedTrackState(const_cast<KinematicRefittedTrackState*>(this)));
69  return result;
70 }
ReferenceCountingPointer< RefittedTrackState< 6 > > RefCountedRefittedTrackState
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 }
Common base class.
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > AlgebraicSymMatrix66
FreeTrajectoryState KinematicRefittedTrackState::freeTrajectoryState ( ) const
overridevirtual

FTS out of kinematic parameters

Implements RefittedTrackState< 6 >.

Definition at line 29 of file KinematicRefittedTrackState.cc.

References KinematicState::freeTrajectoryState(), and state.

Referenced by trajectoryStateOnSurface().

29 { return state.freeTrajectoryState(); }
FreeTrajectoryState freeTrajectoryState() const
AlgebraicVector4 KinematicRefittedTrackState::kinematicMomentumVector ( ) const

Kinematic momentum vector

Definition at line 33 of file KinematicRefittedTrackState.cc.

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().

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 }
T y() const
Definition: PV3DBase.h:60
GlobalVector globalMomentum() const
ParticleMass mass() const
T z() const
Definition: PV3DBase.h:61
ROOT::Math::SVector< double, 4 > AlgebraicVector4
T x() const
Definition: PV3DBase.h:59
AlgebraicVector7 KinematicRefittedTrackState::kinematicParameters ( ) const

Access to Kinematic parameters

Definition at line 21 of file KinematicRefittedTrackState.cc.

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

Referenced by FinalTreeBuilder::buildTree().

21  {
22  return state.kinematicParameters().vector();
23 }
AlgebraicVector7 const & vector() const
The full vector (7 elements)
KinematicParameters const & kinematicParameters() const
AlgebraicSymMatrix77 KinematicRefittedTrackState::kinematicParametersCovariance ( ) const

Kinmatic covariance

Definition at line 25 of file KinematicRefittedTrackState.cc.

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

Referenced by FinalTreeBuilder::buildTree().

25  {
27 }
AlgebraicSymMatrix77 const & matrix() const
KinematicParametersError const & kinematicParametersError() const
AlgebraicVector4 KinematicRefittedTrackState::momentumVector ( ) const
overridevirtual

Perigee momentum vector

Implements RefittedTrackState< 6 >.

Definition at line 43 of file KinematicRefittedTrackState.cc.

References momentumAtVertex.

43 { return momentumAtVertex; }
AlgebraicVector6 KinematicRefittedTrackState::parameters ( void  ) const
overridevirtual

Access to Kinematic perigee parameters

Implements RefittedTrackState< 6 >.

Definition at line 11 of file KinematicRefittedTrackState.cc.

References conv, KinematicPerigeeConversions::extendedPerigeeFromKinematicParameters(), KinematicState::globalPosition(), and state.

11  {
14 }
static HepMC::IO_HEPEVT conv
ExtendedPerigeeTrajectoryParameters extendedPerigeeFromKinematicParameters(const KinematicState &state, const GlobalPoint &point) const
GlobalPoint globalPosition() const
GlobalPoint KinematicRefittedTrackState::position ( ) const
overridevirtual

Position at which the momentum is defined.

Implements RefittedTrackState< 6 >.

Definition at line 31 of file KinematicRefittedTrackState.cc.

References KinematicState::globalPosition(), and state.

31 { return state.globalPosition(); }
GlobalPoint globalPosition() const
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.

References gather_cfg::cout.

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 }
ReferenceCountingPointer< RefittedTrackState< 6 > > RefCountedRefittedTrackState
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.

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

45  {
47  return thePropagator.propagate(freeTrajectoryState(), surface);
48 }
FreeTrajectoryState freeTrajectoryState() const override
const MagneticField * magneticField() const
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
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.

References anyDirection, Propagator::clone(), and freeTrajectoryState().

51  {
52  std::unique_ptr<Propagator> thePropagator(propagator.clone());
53  thePropagator->setPropagationDirection(anyDirection);
54  return thePropagator->propagate(freeTrajectoryState(), surface);
55 }
virtual Propagator * clone() const =0
FreeTrajectoryState freeTrajectoryState() const override
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 }
Common base class.
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

AlgebraicVector4 KinematicRefittedTrackState::momentumAtVertex
private

Definition at line 79 of file KinematicRefittedTrackState.h.

Referenced by KinematicRefittedTrackState(), and momentumVector().

KinematicState KinematicRefittedTrackState::state
private