CMS 3D CMS Logo

KinematicState Class Reference

Class providing a state of particle needed for Kinematic Fit. More...

#include <RecoVertex/KinematicFitPrimitives/interface/KinematicState.h>

List of all members.

Public Member Functions

FreeTrajectoryState freeTrajectoryState () const
 KinematicState -> FreeTrajectoryState converter.
GlobalVector globalMomentum () const
GlobalPoint globalPosition () const
bool isValid () const
KinematicParameters kinematicParameters () const
KinematicParametersError kinematicParametersError () const
 KinematicState (const KinematicParameters &parameters, const KinematicParametersError &error, const TrackCharge &charge, const MagneticField *field)
 Constructor taking directly KinematicParameters KinematicError and Charge.
 KinematicState ()
 Default constructor for internal KinematicFitPrimitives library needs only.
const MagneticFieldmagneticField () const
ParticleMass mass () const
 Access methods to parameters and private data.
bool operator== (const KinematicState &other) const
TrackCharge particleCharge () const

Private Attributes

TrackCharge ch
KinematicParametersError err
KinematicParameters param
const MagneticFieldtheField
bool vl


Detailed Description

Class providing a state of particle needed for Kinematic Fit.

Kirill Prokofiev, March 2003

Definition at line 18 of file KinematicState.h.


Constructor & Destructor Documentation

KinematicState::KinematicState (  )  [inline]

Default constructor for internal KinematicFitPrimitives library needs only.

Definition at line 27 of file KinematicState.h.

References vl.

00028  {vl = false;}

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.

00006                                     :
00007         theField(field), param(parameters),err(error), ch(charge), vl(true)
00008 {}


Member Function Documentation

FreeTrajectoryState KinematicState::freeTrajectoryState (  )  const

KinematicState -> FreeTrajectoryState converter.

Definition at line 37 of file KinematicState.cc.

References globalMomentum(), globalPosition(), kinematicParametersError(), KinematicParametersError::matrix(), particleCharge(), and theField.

Referenced by KinematicRefittedTrackState::freeTrajectoryState(), PerigeeKinematicState::PerigeeKinematicState(), TrackKinematicStatePropagator::propagateToTheTransversePCACharged(), and TrackKinematicStatePropagator::propagateToTheTransversePCANeutral().

00038 {
00039  GlobalTrajectoryParameters globalPar(globalPosition(), globalMomentum(),
00040         particleCharge(), theField);
00041  AlgebraicSymMatrix66 cError =
00042         kinematicParametersError().matrix().Sub<AlgebraicSymMatrix66>(0,0);
00043  CartesianTrajectoryError cartError(cError);
00044 // cout<<"conversion called"<<endl;
00045 // cout<<"parameters::position"<<globalPosition()<<endl;
00046 // cout<<"parameters::momentum"<<globalMomentum()<<endl;
00047 // cout<<"parameters::error"<<cError<<endl;
00048  return FreeTrajectoryState(globalPar,cartError);
00049 }

GlobalVector KinematicState::globalMomentum (  )  const

Definition at line 28 of file KinematicState.cc.

References KinematicParameters::momentum(), and param.

Referenced by ParticleKinematicLinearizedTrackState::computeChargedJacobians(), ParticleKinematicLinearizedTrackState::computeNeutralJacobians(), KinematicPerigeeConversions::extendedPerigeeFromKinematicParameters(), freeTrajectoryState(), KinematicRefittedTrackState::kinematicMomentumVector(), TrackKinematicStatePropagator::propagateToTheTransversePCACharged(), and TrackKinematicStatePropagator::propagateToTheTransversePCANeutral().

00029 {return param.momentum();}

GlobalPoint KinematicState::globalPosition (  )  const

Definition at line 31 of file KinematicState.cc.

References param, and KinematicParameters::position().

Referenced by ParticleKinematicLinearizedTrackState::computeChargedJacobians(), ParticleKinematicLinearizedTrackState::computeNeutralJacobians(), KinematicPerigeeConversions::extendedPerigeeFromKinematicParameters(), freeTrajectoryState(), KinematicRefittedTrackState::momentumVector(), KinematicRefittedTrackState::parameters(), KinematicRefittedTrackState::position(), TrackKinematicStatePropagator::propagateToTheTransversePCACharged(), and TrackKinematicStatePropagator::propagateToTheTransversePCANeutral().

00032 {return param.position();}

bool KinematicState::isValid ( void   )  const [inline]

Definition at line 63 of file KinematicState.h.

References vl.

Referenced by PerigeeKinematicState::PerigeeKinematicState().

00064  {return vl;}

KinematicParameters KinematicState::kinematicParameters (  )  const

Definition at line 22 of file KinematicState.cc.

References param.

Referenced by KinematicRefittedTrackState::kinematicParameters(), operator==(), TrackKinematicStatePropagator::propagateToTheTransversePCANeutral(), VirtualKinematicParticle::stateAtPoint(), and TransientTrackKinematicParticle::stateAtPoint().

00023 {return param;}

KinematicParametersError KinematicState::kinematicParametersError (  )  const

Definition at line 25 of file KinematicState.cc.

References err.

Referenced by freeTrajectoryState(), KinematicRefittedTrackState::kinematicParametersCovariance(), operator==(), PerigeeKinematicState::PerigeeKinematicState(), TrackKinematicStatePropagator::propagateToTheTransversePCACharged(), and TrackKinematicStatePropagator::propagateToTheTransversePCANeutral().

00026 {return err;}

const MagneticField* KinematicState::magneticField (  )  const [inline]

Definition at line 66 of file KinematicState.h.

References theField.

Referenced by KinematicPerigeeConversions::extendedPerigeeFromKinematicParameters(), TrackKinematicStatePropagator::propagateToTheTransversePCACharged(), TrackKinematicStatePropagator::propagateToTheTransversePCANeutral(), KinematicRefittedTrackState::trajectoryStateOnSurface(), TransientTrackKinematicParticle::TransientTrackKinematicParticle(), and VirtualKinematicParticle::VirtualKinematicParticle().

00066 {return theField;}

ParticleMass KinematicState::mass (  )  const

Access methods to parameters and private data.

Definition at line 19 of file KinematicState.cc.

References param, and KinematicParameters::vector().

Referenced by KinematicPerigeeConversions::extendedPerigeeFromKinematicParameters(), KinematicRefittedTrackState::kinematicMomentumVector(), and TrackKinematicStatePropagator::propagateToTheTransversePCACharged().

00020 {return param.vector()[6];}

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

Definition at line 11 of file KinematicState.cc.

References kinematicParameters(), kinematicParametersError(), KinematicParametersError::matrix(), res, and KinematicParameters::vector().

00012 {
00013  bool res = false;
00014  if((kinematicParameters().vector() == other.kinematicParameters().vector())&&
00015     (kinematicParametersError().matrix() == other.kinematicParametersError().matrix())) res = true;
00016  return res;
00017 }

TrackCharge KinematicState::particleCharge (  )  const

Definition at line 34 of file KinematicState.cc.

References ch.

Referenced by KinematicPerigeeConversions::extendedPerigeeFromKinematicParameters(), freeTrajectoryState(), TrackKinematicStatePropagator::propagateToTheTransversePCA(), TrackKinematicStatePropagator::propagateToTheTransversePCACharged(), and TrackKinematicStatePropagator::propagateToTheTransversePCANeutral().

00035 {return ch;}


Member Data Documentation

TrackCharge KinematicState::ch [private]

Definition at line 74 of file KinematicState.h.

Referenced by particleCharge().

KinematicParametersError KinematicState::err [private]

Definition at line 73 of file KinematicState.h.

Referenced by kinematicParametersError().

KinematicParameters KinematicState::param [private]

Definition at line 72 of file KinematicState.h.

Referenced by globalMomentum(), globalPosition(), kinematicParameters(), and mass().

const MagneticField* KinematicState::theField [private]

Definition at line 71 of file KinematicState.h.

Referenced by freeTrajectoryState(), and magneticField().

bool KinematicState::vl [private]

Definition at line 76 of file KinematicState.h.

Referenced by isValid(), and KinematicState().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:26:23 2009 for CMSSW by  doxygen 1.5.4