CMS 3D CMS Logo

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

#include <KinematicState.h>

Public Member Functions

FreeTrajectoryState freeTrajectoryState () const
 
GlobalVector globalMomentum () const
 
GlobalPoint globalPosition () const
 
bool isValid () const
 
KinematicParameters const & kinematicParameters () const
 
KinematicParametersError const & kinematicParametersError () const
 
 KinematicState ()
 
 KinematicState (const KinematicParameters &parameters, const KinematicParametersError &error, const TrackCharge &charge, const MagneticField *field)
 
 KinematicState (const FreeTrajectoryState &state, const ParticleMass &mass, float m_sigma)
 
const MagneticFieldmagneticField () const
 
GlobalVector magneticFieldInInverseGeV (const GlobalPoint &x) const
 
GlobalVector magneticFieldInInverseGeV () const
 
ParticleMass mass () const
 
bool operator== (const KinematicState &other) const
 
TrackCharge particleCharge () const
 
GlobalTrajectoryParameters const & trajectoryParameters () const
 

Private Attributes

KinematicParametersError err
 
FreeTrajectoryState fts
 
KinematicParameters param
 
bool vl
 

Detailed Description

Class providing a state of particle needed for Kinematic Fit.

Kirill Prokofiev, March 2003

Definition at line 17 of file KinematicState.h.

Constructor & Destructor Documentation

◆ KinematicState() [1/3]

KinematicState::KinematicState ( )
inline

Default constructor for internal KinematicFitPrimitives library needs only

Definition at line 24 of file KinematicState.h.

References vl.

24 { vl = false; }

◆ KinematicState() [2/3]

KinematicState::KinematicState ( const KinematicParameters parameters,
const KinematicParametersError error,
const TrackCharge charge,
const MagneticField field 
)

Constructor taking directly KinematicParameters KinematicError and Charge. To be used with proper KinematicStateBuilder.

Definition at line 4 of file KinematicState.cc.

8  : fts(GlobalTrajectoryParameters(parameters.position(), parameters.momentum(), charge, field),
11  err(error),
12  vl(true) {}
KinematicParametersError err
FreeTrajectoryState fts
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > AlgebraicSymMatrix66
KinematicParameters param

◆ KinematicState() [3/3]

KinematicState::KinematicState ( const FreeTrajectoryState state,
const ParticleMass mass,
float  m_sigma 
)
inline

Definition at line 37 of file KinematicState.h.

38  : fts(state),
39  param(state.position().x(),
40  state.position().y(),
41  state.position().z(),
42  state.momentum().x(),
43  state.momentum().y(),
44  state.momentum().z(),
45  mass),
46  err(state.cartesianError(), m_sigma),
47  vl(true) {}
KinematicParametersError err
FreeTrajectoryState fts
KinematicParameters param
ParticleMass mass() const

Member Function Documentation

◆ freeTrajectoryState()

FreeTrajectoryState KinematicState::freeTrajectoryState ( ) const
inline

KinematicState -> FreeTrajectoryState converter

Definition at line 77 of file KinematicState.h.

References fts.

Referenced by KinematicRefittedTrackState::freeTrajectoryState().

77 { return fts; }
FreeTrajectoryState fts

◆ globalMomentum()

GlobalVector KinematicState::globalMomentum ( ) const
inline

◆ globalPosition()

GlobalPoint KinematicState::globalPosition ( ) const
inline

◆ isValid()

bool KinematicState::isValid ( void  ) const
inline

◆ kinematicParameters()

KinematicParameters const& KinematicState::kinematicParameters ( ) const
inline

Access methods to parameters and private data

Definition at line 61 of file KinematicState.h.

References param.

Referenced by KinematicRefittedTrackState::kinematicParameters(), operator==(), VirtualKinematicParticle::stateAtPoint(), and BPHWriteSpecificDecay::write().

61 { return param; }
KinematicParameters param

◆ kinematicParametersError()

KinematicParametersError const& KinematicState::kinematicParametersError ( ) const
inline

Definition at line 63 of file KinematicState.h.

References err.

Referenced by KinematicRefittedTrackState::kinematicParametersCovariance(), and operator==().

63 { return err; }
KinematicParametersError err

◆ magneticField()

const MagneticField* KinematicState::magneticField ( ) const
inline

◆ magneticFieldInInverseGeV() [1/2]

GlobalVector KinematicState::magneticFieldInInverseGeV ( const GlobalPoint x) const
inline

Definition at line 81 of file KinematicState.h.

References GlobalTrajectoryParameters::magneticFieldInInverseGeV(), trajectoryParameters(), and x.

81  {
83  }
GlobalVector magneticFieldInInverseGeV(const GlobalPoint &x) const
GlobalTrajectoryParameters const & trajectoryParameters() const

◆ magneticFieldInInverseGeV() [2/2]

GlobalVector KinematicState::magneticFieldInInverseGeV ( ) const
inline

Definition at line 84 of file KinematicState.h.

References GlobalTrajectoryParameters::magneticFieldInInverseGeV(), and trajectoryParameters().

GlobalVector magneticFieldInInverseGeV(const GlobalPoint &x) const
GlobalTrajectoryParameters const & trajectoryParameters() const

◆ mass()

ParticleMass KinematicState::mass ( ) const
inline

The mass of the particle

Definition at line 54 of file KinematicState.h.

References param, and KinematicParameters::vector().

Referenced by Particle.Particle::__str__(), DiObject.DiMuon::__str__(), BPHKinematicFit::fitMomentum(), KinematicRefittedTrackState::kinematicMomentumVector(), BPHKinematicFit::mass(), datamodel.Object::p4(), and BPHWriteSpecificDecay::write().

54 { return param.vector()[6]; }
AlgebraicVector7 const & vector() const
The full vector (7 elements)
KinematicParameters param

◆ operator==()

bool KinematicState::operator== ( const KinematicState other) const

Definition at line 14 of file KinematicState.cc.

References kinematicParameters(), kinematicParametersError(), KinematicParametersError::matrix(), trackingPlots::other, and trackerHitRTTI::vector.

14  {
15  return (kinematicParameters().vector() == other.kinematicParameters().vector()) &&
16  (kinematicParametersError().matrix() == other.kinematicParametersError().matrix());
17 }
KinematicParametersError const & kinematicParametersError() const
KinematicParameters const & kinematicParameters() const
AlgebraicSymMatrix77 const & matrix() const

◆ particleCharge()

TrackCharge KinematicState::particleCharge ( ) const
inline

Definition at line 71 of file KinematicState.h.

References FreeTrajectoryState::charge(), and fts.

71 { return fts.charge(); }
FreeTrajectoryState fts
TrackCharge charge() const

◆ trajectoryParameters()

GlobalTrajectoryParameters const& KinematicState::trajectoryParameters ( ) const
inline

Definition at line 65 of file KinematicState.h.

References fts, and FreeTrajectoryState::parameters().

Referenced by magneticField(), and magneticFieldInInverseGeV().

65 { return fts.parameters(); }
FreeTrajectoryState fts
const GlobalTrajectoryParameters & parameters() const

Member Data Documentation

◆ err

KinematicParametersError KinematicState::err
private

Definition at line 91 of file KinematicState.h.

Referenced by kinematicParametersError().

◆ fts

FreeTrajectoryState KinematicState::fts
private

◆ param

KinematicParameters KinematicState::param
private

Definition at line 90 of file KinematicState.h.

Referenced by kinematicParameters(), and mass().

◆ vl

bool KinematicState::vl
private

Definition at line 93 of file KinematicState.h.

Referenced by isValid(), and KinematicState().