CMS 3D CMS Logo

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

#include <FreeTrajectoryState.h>

Public Member Functions

CartesianTrajectoryError cartesianError () const
 
TrackCharge charge () const
 
const CurvilinearTrajectoryErrorcurvilinearError () const
 
 FreeTrajectoryState ()
 
 FreeTrajectoryState (const GlobalTrajectoryParameters &aGlobalParameters)
 
 FreeTrajectoryState (const GlobalPoint &aX, const GlobalVector &aP, TrackCharge aCharge, const MagneticField *fieldProvider)
 
 FreeTrajectoryState (const GlobalPoint &aX, const GlobalVector &aP, TrackCharge aCharge, const MagneticField *fieldProvider, GlobalVector fieldValue)
 
 FreeTrajectoryState (const GlobalTrajectoryParameters &aGlobalParameters, const CurvilinearTrajectoryError &aCurvilinearError)
 
 FreeTrajectoryState (const GlobalTrajectoryParameters &aGlobalParameters, const CartesianTrajectoryError &aCartesianError)
 
 FreeTrajectoryState (const GlobalTrajectoryParameters &aGlobalParameters, const CartesianTrajectoryError &, const CurvilinearTrajectoryError &aCurvilinearError)
 
bool hasCurvilinearError () const
 
bool hasError () const
 
GlobalVector momentum () const
 
const GlobalTrajectoryParametersparameters () const
 
GlobalPoint position () const
 
void rescaleError (double factor)
 
void setCartesianError (const CartesianTrajectoryError &err)
 
void setCartesianError (const AlgebraicSymMatrix66 &err)
 
CurvilinearTrajectoryErrorsetCurvilinearError ()
 
void setCurvilinearError (const CurvilinearTrajectoryError &err)
 
double signedInverseMomentum () const
 
double transverseCurvature () const
 

Private Member Functions

void createCartesianError (CartesianTrajectoryError &aCartesianError) const
 
void createCurvilinearError (CartesianTrajectoryError const &aCartesianError) const
 
void missingError () const
 

Private Attributes

CurvilinearTrajectoryError theCurvilinearError
 
GlobalTrajectoryParameters theGlobalParameters
 

Detailed Description

A 6-dimensional state vector of a helix given at some point in space along the helix, and the associated error matrix. The error can be obtained in two different parametrizations: CurvilinearTrajectoryError and CartesianTrajectoryError (see descriptions of corresponding classes). The FreeTrajectoryState can be instantiated with either of these error parametrisations; it converts from one to the other internally.

Definition at line 27 of file FreeTrajectoryState.h.

Constructor & Destructor Documentation

◆ FreeTrajectoryState() [1/7]

FreeTrajectoryState::FreeTrajectoryState ( )
inline

Definition at line 32 of file FreeTrajectoryState.h.

CurvilinearTrajectoryError theCurvilinearError

◆ FreeTrajectoryState() [2/7]

FreeTrajectoryState::FreeTrajectoryState ( const GlobalTrajectoryParameters aGlobalParameters)
inline

Definition at line 34 of file FreeTrajectoryState.h.

35  : theGlobalParameters(aGlobalParameters), theCurvilinearError(InvalidError()) {}
CurvilinearTrajectoryError theCurvilinearError
GlobalTrajectoryParameters theGlobalParameters

◆ FreeTrajectoryState() [3/7]

FreeTrajectoryState::FreeTrajectoryState ( const GlobalPoint aX,
const GlobalVector aP,
TrackCharge  aCharge,
const MagneticField fieldProvider 
)
inline

Definition at line 37 of file FreeTrajectoryState.h.

41  : theGlobalParameters(aX, aP, aCharge, fieldProvider), theCurvilinearError(InvalidError()) {}
CurvilinearTrajectoryError theCurvilinearError
GlobalTrajectoryParameters theGlobalParameters

◆ FreeTrajectoryState() [4/7]

FreeTrajectoryState::FreeTrajectoryState ( const GlobalPoint aX,
const GlobalVector aP,
TrackCharge  aCharge,
const MagneticField fieldProvider,
GlobalVector  fieldValue 
)
inline

Definition at line 43 of file FreeTrajectoryState.h.

48  : theGlobalParameters(aX, aP, aCharge, fieldProvider, fieldValue), theCurvilinearError(InvalidError()) {}
CurvilinearTrajectoryError theCurvilinearError
GlobalTrajectoryParameters theGlobalParameters

◆ FreeTrajectoryState() [5/7]

FreeTrajectoryState::FreeTrajectoryState ( const GlobalTrajectoryParameters aGlobalParameters,
const CurvilinearTrajectoryError aCurvilinearError 
)
inline

Definition at line 50 of file FreeTrajectoryState.h.

52  : theGlobalParameters(aGlobalParameters), theCurvilinearError(aCurvilinearError) {}
CurvilinearTrajectoryError theCurvilinearError
GlobalTrajectoryParameters theGlobalParameters

◆ FreeTrajectoryState() [6/7]

FreeTrajectoryState::FreeTrajectoryState ( const GlobalTrajectoryParameters aGlobalParameters,
const CartesianTrajectoryError aCartesianError 
)
inline

Definition at line 54 of file FreeTrajectoryState.h.

References createCurvilinearError().

56  : theGlobalParameters(aGlobalParameters) {
57  createCurvilinearError(aCartesianError);
58  }
GlobalTrajectoryParameters theGlobalParameters
void createCurvilinearError(CartesianTrajectoryError const &aCartesianError) const

◆ FreeTrajectoryState() [7/7]

FreeTrajectoryState::FreeTrajectoryState ( const GlobalTrajectoryParameters aGlobalParameters,
const CartesianTrajectoryError ,
const CurvilinearTrajectoryError aCurvilinearError 
)
inline

Definition at line 60 of file FreeTrajectoryState.h.

63  : theGlobalParameters(aGlobalParameters), theCurvilinearError(aCurvilinearError) {}
CurvilinearTrajectoryError theCurvilinearError
GlobalTrajectoryParameters theGlobalParameters

Member Function Documentation

◆ cartesianError()

CartesianTrajectoryError FreeTrajectoryState::cartesianError ( ) const
inline

◆ charge()

TrackCharge FreeTrajectoryState::charge ( void  ) const
inline

Definition at line 69 of file FreeTrajectoryState.h.

References GlobalTrajectoryParameters::charge(), and theGlobalParameters.

Referenced by DAFTrackProducerAlgorithm::buildTrack(), TrackExtenderWithMTDT< TrackCollection >::buildTrack(), MuonSeedTrack::buildTrackAtPCA(), MuonTrackLoader::buildTrackAtPCA(), MuonTrackLoader::buildTrackUpdatedAtPCA(), TangentApproachInRPhi::calculate(), ClosestApproachInRPhi::calculate(), reco::TransientTrackFromFTS::charge(), BasicTrajectoryState::charge(), HTrack::computePull(), HTrack::computeResolution(), HTrack::computeTDRResolution(), TSCPBuilderNoMaterial::createFTSatTransverseImpactPointCharged(), TSCPBuilderNoMaterial::createFTSatTransverseImpactPointNeutral(), BasicTrajectoryState::createLocalParameters(), AnalyticalImpactPointExtrapolator::extrapolateSingleState(), AnalyticalTrajectoryExtrapolatorToLine::extrapolateSingleState(), HTrack::Fill(), GsfTrackProducerBase::fillMode(), PerigeeConversions::ftsToPerigeeParameters(), CSCEfficiency::getFromFTS(), TrajSeedMatcher::getTrajStateFromPoint(), SeedFromConsecutiveHitsCreator::makeSeed(), RKPropagatorInZ::myPropagate(), RKPropagatorInR::myPropagate(), TSCBLBuilderNoMaterial::operator()(), KinematicState::particleCharge(), StraightLinePropagator::propagatedState(), Geant4ePropagator::propagateGeneric(), RKPropagatorInS::propagateParametersOnCylinder(), RKPropagatorInS::propagateParametersOnPlane(), StraightLinePropagator::propagateWithPath(), OutInConversionSeedFinder::startSeed(), InOutConversionSeedFinder::startSeed(), SteppingHelixStateInfo::SteppingHelixStateInfo(), reco::TransientTrackFromFTS::track(), and reco::trackingParametersAtClosestApproachToBeamSpot().

69 { return theGlobalParameters.charge(); }
GlobalTrajectoryParameters theGlobalParameters

◆ createCartesianError()

void FreeTrajectoryState::createCartesianError ( CartesianTrajectoryError aCartesianError) const
private

Definition at line 31 of file FreeTrajectoryState.cc.

References JacobianCurvilinearToCartesian::jacobian(), CurvilinearTrajectoryError::matrix(), theCurvilinearError, and theGlobalParameters.

Referenced by cartesianError().

31  {
33  const AlgebraicMatrix65& jac = curv2Cart.jacobian();
34 
35  aCartesianError = ROOT::Math::Similarity(jac, theCurvilinearError.matrix());
36 }
CurvilinearTrajectoryError theCurvilinearError
GlobalTrajectoryParameters theGlobalParameters
const AlgebraicSymMatrix55 & matrix() const
ROOT::Math::SMatrix< double, 6, 5, ROOT::Math::MatRepStd< double, 6, 5 > > AlgebraicMatrix65

◆ createCurvilinearError()

void FreeTrajectoryState::createCurvilinearError ( CartesianTrajectoryError const &  aCartesianError) const
private

Definition at line 39 of file FreeTrajectoryState.cc.

References JacobianCartesianToCurvilinear::jacobian(), CartesianTrajectoryError::matrix(), theCurvilinearError, and theGlobalParameters.

Referenced by FreeTrajectoryState(), and setCartesianError().

39  {
41  const AlgebraicMatrix56& jac = cart2Curv.jacobian();
42 
43  theCurvilinearError = ROOT::Math::Similarity(jac, aCartesianError.matrix());
44 }
CurvilinearTrajectoryError theCurvilinearError
ROOT::Math::SMatrix< double, 5, 6, ROOT::Math::MatRepStd< double, 5, 6 > > AlgebraicMatrix56
GlobalTrajectoryParameters theGlobalParameters

◆ curvilinearError()

const CurvilinearTrajectoryError& FreeTrajectoryState::curvilinearError ( ) const
inline

Definition at line 89 of file FreeTrajectoryState.h.

References hasError(), missingError(), theCurvilinearError, and UNLIKELY.

Referenced by analyticalErrorPropagation(), DAFTrackProducerAlgorithm::buildTrack(), TrackExtenderWithMTDT< TrackCollection >::buildTrack(), MuonSeedTrack::buildTrackAtPCA(), MuonTrackLoader::buildTrackAtPCA(), MuonTrackLoader::buildTrackUpdatedAtPCA(), HTrack::computePull(), TSCPBuilderNoMaterial::createFTSatTransverseImpactPointCharged(), TSCPBuilderNoMaterial::createFTSatTransverseImpactPointNeutral(), BasicTrajectoryState::createLocalErrorFromCurvilinearError(), BasicTrajectoryState::curvilinearError(), TrajectoryExtrapolatorToLine::extrapolate(), AnalyticalImpactPointExtrapolator::extrapolateSingleState(), AnalyticalTrajectoryExtrapolatorToLine::extrapolateSingleState(), GsfTrackProducerBase::fillMode(), PerigeeConversions::ftsToPerigeeError(), TrajectoryStateAccessor::inversePtError(), TSCBLBuilderNoMaterial::operator()(), operator<<(), AnalyticalPropagator::propagatedStateWithPath(), Geant4ePropagator::propagateGeneric(), SteppingHelixStateInfo::SteppingHelixStateInfo(), reco::TransientTrackFromFTS::track(), and MuonNavigableLayer::trackingRange().

89  {
90  if UNLIKELY (!hasError())
91  missingError();
93  }
return((rh ^ lh) &mask)
CurvilinearTrajectoryError theCurvilinearError
#define UNLIKELY(x)
Definition: Likely.h:21

◆ hasCurvilinearError()

bool FreeTrajectoryState::hasCurvilinearError ( ) const
inline

◆ hasError()

bool FreeTrajectoryState::hasError ( void  ) const
inline

◆ missingError()

void FreeTrajectoryState::missingError ( ) const
private

Definition at line 16 of file FreeTrajectoryState.cc.

References CurvilinearTrajectoryError::matrix(), theCurvilinearError, and CurvilinearTrajectoryError::valid().

Referenced by cartesianError(), and curvilinearError().

16  {
17  std::stringstream form;
18  form << "FreeTrajectoryState: attempt to access errors when none available"
19  << "\nCurvilinear error valid/values :" << theCurvilinearError.valid() << "\n"
21  edm::LogWarning("FreeTrajectoryState") << "(was exception) " << form.str();
22  // throw TrajectoryStateException(form.str());
23  // bPoint();
24 }
CurvilinearTrajectoryError theCurvilinearError
const AlgebraicSymMatrix55 & matrix() const
Log< level::Warning, false > LogWarning

◆ momentum()

GlobalVector FreeTrajectoryState::momentum ( ) const
inline

Definition at line 68 of file FreeTrajectoryState.h.

References GlobalTrajectoryParameters::momentum(), and theGlobalParameters.

Referenced by TrackBuildingAnalyzer::analyze(), ValidationMisalignedTracker::analyze(), TestOutliers::analyze(), CosmicMuonTrajectoryBuilder::build(), DAFTrackProducerAlgorithm::buildTrack(), TrackExtenderWithMTDT< TrackCollection >::buildTrack(), MuonSeedTrack::buildTrackAtPCA(), MuonTrackLoader::buildTrackAtPCA(), MuonTrackLoader::buildTrackUpdatedAtPCA(), TangentApproachInRPhi::calculate(), ClosestApproachInRPhi::calculate(), DirectMuonNavigation::checkCompatible(), DirectMuonNavigation::compatibleEndcapLayers(), DirectMuonNavigation::compatibleLayers(), PerigeeLinearizedTrackState::computeNeutralJacobians(), HTrack::computePull(), HTrack::computeResolution(), HTrack::computeTDRResolution(), ReferenceTrajectory::construct(), TSCPBuilderNoMaterial::createFTSatTransverseImpactPointCharged(), TSCPBuilderNoMaterial::createFTSatTransverseImpactPointNeutral(), BasicTrajectoryState::createLocalParameters(), TransverseImpactPointExtrapolator::doExtrapolation(), MuonPatternRecoDumper::dumpFTS(), CSCEfficiency::efficienciesPerChamber(), AnalyticalImpactPointExtrapolator::extrapolateSingleState(), AnalyticalTrajectoryExtrapolatorToLine::extrapolateSingleState(), HTrack::Fill(), GsfTrackProducerBase::fillMode(), MuonTrackAnalyzer::fillPlots(), PerigeeConversions::ftsToPerigeeParameters(), CSCEfficiency::getFromFTS(), ExoticaDQM::getGenParticleTrajectoryAtBeamline(), HDetIdAssociator::getTrajectory(), BasicTrajectoryState::globalDirection(), KinematicState::globalMomentum(), BasicTrajectoryState::globalMomentum(), TrackDetMatchInfo::insideCone(), TrajectoryStateAccessor::inversePtError(), MuonNavigableLayer::isInsideOut(), PerigeeConversions::jacobianCurvilinear2Perigee(), SeedFromConsecutiveHitsCreator::makeSeed(), CosmicParametersDefinerForTP::momentum(), ParametersDefinerForTP::momentum(), ParametersDefinerForTP::momentumAndVertex(), RKPropagatorInZ::myPropagate(), RKPropagatorInR::myPropagate(), SimpleForwardNavigableLayer::nextLayers(), SimpleBarrelNavigableLayer::nextLayers(), TSCBLBuilderNoMaterial::operator()(), StateOnTrackerBound::operator()(), PropagationDirectionChooser::operator()(), TrimmedTrackFilter::operator()(), CosmicTrackingParticleSelector::operator()(), DirectMuonNavigation::outward(), DirectTrackerNavigation::outward(), TrackFromSeedProducer::produce(), TrackExtenderWithMTDT< TrackCollection >::produce(), Geant4ePropagator::propagateGeneric(), StraightLinePropagator::propagateParametersOnCylinder(), RKPropagatorInS::propagateParametersOnCylinder(), AnalyticalPropagator::propagateParametersOnCylinder(), StraightLinePropagator::propagateParametersOnPlane(), RKPropagatorInS::propagateParametersOnPlane(), AnalyticalPropagator::propagateParametersOnPlane(), StandAloneMuonTrajectoryBuilder::propagateTheSeedTSOS(), TrackClassifier::reconstructionInformation(), StandAloneMuonFilter::refit(), L1MuonSeededTrackingRegionsProducer::regions(), TrackAlgoCompareUtil::SetTrackingParticleD0Dz(), SteppingHelixStateInfo::SteppingHelixStateInfo(), CSCEfficiency::stripWire_Efficiencies(), ThresholdPtTrajectoryFilter::test(), reco::TransientTrackFromFTS::track(), reco::trackingParametersAtClosestApproachToBeamSpot(), and StandAloneMuonTrajectoryBuilder::trajectories().

68 { return theGlobalParameters.momentum(); }
GlobalTrajectoryParameters theGlobalParameters

◆ parameters()

const GlobalTrajectoryParameters& FreeTrajectoryState::parameters ( void  ) const
inline

◆ position()

GlobalPoint FreeTrajectoryState::position ( ) const
inline

Definition at line 67 of file FreeTrajectoryState.h.

References GlobalTrajectoryParameters::position(), and theGlobalParameters.

Referenced by TrackDetectorAssociator::addTAMuonSegmentMatch(), TrackBuildingAnalyzer::analyze(), ValidationMisalignedTracker::analyze(), TestOutliers::analyze(), MuonAlignmentAnalyzer::analyze(), PrimaryVertexValidation::analyze(), TrackDetectorAssociator::associate(), MkFitOutputConverter::backwardFit(), CosmicMuonTrajectoryBuilder::build(), SeedForPhotonConversionFromQuadruplets::buildSeedBool(), DAFTrackProducerAlgorithm::buildTrack(), TrackExtenderWithMTDT< TrackCollection >::buildTrack(), MuonSeedTrack::buildTrackAtPCA(), MuonTrackLoader::buildTrackAtPCA(), MuonTrackLoader::buildTrackUpdatedAtPCA(), TangentApproachInRPhi::calculate(), ClosestApproachInRPhi::calculate(), reco::TransientTrackFromFTS::calculateTSOSAtVertex(), reco::GsfTransientTrack::calculateTSOSAtVertex(), DirectMuonNavigation::checkCompatible(), DirectTrackerNavigation::checkCompatible(), DirectMuonNavigation::compatibleLayers(), DirectTrackerNavigation::compatibleLayers(), PerigeeLinearizedTrackState::computeChargedJacobians(), PerigeeLinearizedTrackState::computeJacobians(), PerigeeLinearizedTrackState::computeNeutralJacobians(), TSCPBuilderNoMaterial::createFTSatTransverseImpactPointCharged(), TSCPBuilderNoMaterial::createFTSatTransverseImpactPointNeutral(), BasicTrajectoryState::createLocalParameters(), SimpleNavigableLayer::crossingState(), BeamHaloPropagator::crossingTk(), TransverseImpactPointExtrapolator::doExtrapolation(), MuonPatternRecoDumper::dumpFTS(), AnalyticalImpactPointExtrapolator::extrapolateSingleState(), AnalyticalTrajectoryExtrapolatorToLine::extrapolateSingleState(), CSCEfficiency::filter(), PerigeeConversions::ftsToPerigeeParameters(), CSCEfficiency::getFromFTS(), SteppingHelixStateInfo::getStateOnSurface(), TrackDetectorAssociator::getTAMuonChamberMatches(), HDetIdAssociator::getTrajectory(), KinematicState::globalPosition(), BasicTrajectoryState::globalPosition(), reco::CandidatePtrTransientTrack::impactPointState(), reco::TrackTransientTrack::impactPointState(), reco::TransientTrackFromFTS::impactPointTSCP(), reco::CandidatePtrTransientTrack::impactPointTSCP(), reco::TrackTransientTrack::impactPointTSCP(), reco::GsfTransientTrack::impactPointTSCP(), SmartPropagator::insideTkVol(), MuonNavigableLayer::isInsideOut(), ParametersDefinerForTP::momentumAndVertex(), RKPropagatorInZ::myPropagate(), RKPropagatorInR::myPropagate(), SimpleForwardNavigableLayer::nextLayers(), SimpleBarrelNavigableLayer::nextLayers(), StateOnTrackerBound::operator()(), TSCPBuilderNoMaterial::operator()(), PropagationDirectionChooser::operator()(), CosmicTrackingParticleSelector::operator()(), DirectMuonNavigation::outward(), DirectTrackerNavigation::outward(), TSGForOIFromL2::produce(), TSGForOIDNN::produce(), SeedGeneratorFromL1TTracksEDProducer::produce(), TrackFromSeedProducer::produce(), Geant4ePropagator::propagateGeneric(), StraightLinePropagator::propagateParametersOnCylinder(), RKPropagatorInS::propagateParametersOnCylinder(), AnalyticalPropagator::propagateParametersOnCylinder(), StraightLinePropagator::propagateParametersOnPlane(), RKPropagatorInS::propagateParametersOnPlane(), AnalyticalPropagator::propagateParametersOnPlane(), MuonForwardNavigableLayer::pushResult(), MuonBarrelNavigableLayer::pushResult(), CSCEfficiency::recHitSegment_Efficiencies(), TrackClassifier::reconstructionInformation(), TrackAlgoCompareUtil::SetTrackingParticleD0Dz(), SteppingHelixStateInfo::SteppingHelixStateInfo(), reco::TransientTrackFromFTS::track(), reco::trackingParametersAtClosestApproachToBeamSpot(), MuonNavigableLayer::trackingRange(), TrajectoryStateClosestToBeamLine::transverseImpactParameter(), CosmicParametersDefinerForTP::vertex(), ParametersDefinerForTP::vertex(), and SimpleNavigableLayer::wellInside().

67 { return theGlobalParameters.position(); }
GlobalTrajectoryParameters theGlobalParameters

◆ rescaleError()

void FreeTrajectoryState::rescaleError ( double  factor)

Definition at line 46 of file FreeTrajectoryState.cc.

References hasError(), GlobalTrajectoryParameters::magneticField(), MagneticField::nominalValue(), parameters(), theCurvilinearError, UNLIKELY, and CurvilinearTrajectoryError::zeroFieldScaling().

Referenced by BasicTrajectoryState::rescaleError(), and SimpleCosmicBONSeeder::seeds().

46  {
47  if UNLIKELY (!hasError())
48  return;
49  bool zeroField = (parameters().magneticField().nominalValue() == 0);
50  if UNLIKELY (zeroField)
51  theCurvilinearError.zeroFieldScaling(factor * factor);
52  else
54 }
return((rh ^ lh) &mask)
CurvilinearTrajectoryError theCurvilinearError
const GlobalTrajectoryParameters & parameters() const
#define UNLIKELY(x)
Definition: Likely.h:21

◆ setCartesianError() [1/2]

void FreeTrajectoryState::setCartesianError ( const CartesianTrajectoryError err)
inline

Definition at line 97 of file FreeTrajectoryState.h.

References createCurvilinearError(), and submitPVResolutionJobs::err.

Referenced by TwoBodyDecayTrajectoryState::setError().

void createCurvilinearError(CartesianTrajectoryError const &aCartesianError) const

◆ setCartesianError() [2/2]

void FreeTrajectoryState::setCartesianError ( const AlgebraicSymMatrix66 err)
inline

◆ setCurvilinearError() [1/2]

CurvilinearTrajectoryError& FreeTrajectoryState::setCurvilinearError ( )
inline

Definition at line 100 of file FreeTrajectoryState.h.

References theCurvilinearError.

Referenced by BasicTrajectoryState::checkCurvilinError(), and BasicTrajectoryState::setCurvilinearError().

100 { return theCurvilinearError; }
CurvilinearTrajectoryError theCurvilinearError

◆ setCurvilinearError() [2/2]

void FreeTrajectoryState::setCurvilinearError ( const CurvilinearTrajectoryError err)
inline

◆ signedInverseMomentum()

double FreeTrajectoryState::signedInverseMomentum ( ) const
inline

◆ transverseCurvature()

double FreeTrajectoryState::transverseCurvature ( ) const
inline

Member Data Documentation

◆ theCurvilinearError

CurvilinearTrajectoryError FreeTrajectoryState::theCurvilinearError
mutableprivate

◆ theGlobalParameters

GlobalTrajectoryParameters FreeTrajectoryState::theGlobalParameters
private