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 FreeTrajectoryState &state, const ParticleMass &mass, float m_sigma)
 
 KinematicState (const KinematicParameters &parameters, const KinematicParametersError &error, const TrackCharge &charge, const MagneticField *field)
 
const MagneticFieldmagneticField () const
 
GlobalVector magneticFieldInInverseGeV () const
 
GlobalVector magneticFieldInInverseGeV (const GlobalPoint &x) 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.

24 { vl = false; }

References vl.

◆ 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) {}

◆ 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) {}

Member Function Documentation

◆ freeTrajectoryState()

FreeTrajectoryState KinematicState::freeTrajectoryState ( ) const
inline

KinematicState -> FreeTrajectoryState converter

Definition at line 77 of file KinematicState.h.

77 { return fts; }

References fts.

Referenced by KinematicRefittedTrackState::freeTrajectoryState().

◆ 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.

61 { return param; }

References param.

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

◆ kinematicParametersError()

KinematicParametersError const& KinematicState::kinematicParametersError ( ) const
inline

Definition at line 63 of file KinematicState.h.

63 { return err; }

References err.

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

◆ magneticField()

const MagneticField* KinematicState::magneticField ( ) const
inline

◆ magneticFieldInInverseGeV() [1/2]

GlobalVector KinematicState::magneticFieldInInverseGeV ( ) const
inline

◆ magneticFieldInInverseGeV() [2/2]

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

◆ mass()

ParticleMass KinematicState::mass ( ) const
inline

◆ operator==()

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

Definition at line 14 of file KinematicState.cc.

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

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

◆ particleCharge()

TrackCharge KinematicState::particleCharge ( ) const
inline

Definition at line 71 of file KinematicState.h.

71 { return fts.charge(); }

References FreeTrajectoryState::charge(), and fts.

◆ trajectoryParameters()

GlobalTrajectoryParameters const& KinematicState::trajectoryParameters ( ) const
inline

Definition at line 65 of file KinematicState.h.

65 { return fts.parameters(); }

References fts, and FreeTrajectoryState::parameters().

Referenced by magneticField(), and magneticFieldInInverseGeV().

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

FreeTrajectoryState::momentum
GlobalVector momentum() const
Definition: FreeTrajectoryState.h:68
BeamSpotPI::parameters
parameters
Definition: BeamSpotPayloadInspectorHelper.h:29
KinematicState::vl
bool vl
Definition: KinematicState.h:93
FreeTrajectoryState::charge
TrackCharge charge() const
Definition: FreeTrajectoryState.h:69
DDAxes::x
FreeTrajectoryState::position
GlobalPoint position() const
Definition: FreeTrajectoryState.h:67
relativeConstraints.error
error
Definition: relativeConstraints.py:53
AlgebraicSymMatrix66
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > AlgebraicSymMatrix66
Definition: AlgebraicROOTObjects.h:24
KinematicState::trajectoryParameters
GlobalTrajectoryParameters const & trajectoryParameters() const
Definition: KinematicState.h:65
KinematicState::kinematicParametersError
KinematicParametersError const & kinematicParametersError() const
Definition: KinematicState.h:63
trackingPlots.other
other
Definition: trackingPlots.py:1467
GlobalTrajectoryParameters
Definition: GlobalTrajectoryParameters.h:15
KinematicState::fts
FreeTrajectoryState fts
Definition: KinematicState.h:89
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
KinematicState::err
KinematicParametersError err
Definition: KinematicState.h:91
KinematicParametersError::matrix
AlgebraicSymMatrix77 const & matrix() const
Definition: KinematicParametersError.h:36
FreeTrajectoryState::parameters
const GlobalTrajectoryParameters & parameters() const
Definition: FreeTrajectoryState.h:79
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
KinematicState::mass
ParticleMass mass() const
Definition: KinematicState.h:54
KinematicState::param
KinematicParameters param
Definition: KinematicState.h:90
CartesianTrajectoryError
Definition: CartesianTrajectoryError.h:15
RunInfoPI::state
state
Definition: RunInfoPayloadInspectoHelper.h:16
KinematicParameters::vector
AlgebraicVector7 const & vector() const
The full vector (7 elements)
Definition: KinematicParameters.h:31
GlobalTrajectoryParameters::magneticFieldInInverseGeV
GlobalVector magneticFieldInInverseGeV(const GlobalPoint &x) const
Definition: GlobalTrajectoryParameters.cc:35
GlobalTrajectoryParameters::magneticField
const MagneticField & magneticField() const
Definition: GlobalTrajectoryParameters.h:106
KinematicState::kinematicParameters
KinematicParameters const & kinematicParameters() const
Definition: KinematicState.h:61