CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 29 of file FreeTrajectoryState.h.

Constructor & Destructor Documentation

FreeTrajectoryState::FreeTrajectoryState ( )
inline

Definition at line 34 of file FreeTrajectoryState.h.

34  :
CurvilinearTrajectoryError theCurvilinearError
FreeTrajectoryState::FreeTrajectoryState ( const GlobalTrajectoryParameters aGlobalParameters)
inline

Definition at line 37 of file FreeTrajectoryState.h.

37  :
38  theGlobalParameters(aGlobalParameters),
40  {}
CurvilinearTrajectoryError theCurvilinearError
GlobalTrajectoryParameters theGlobalParameters
FreeTrajectoryState::FreeTrajectoryState ( const GlobalPoint aX,
const GlobalVector aP,
TrackCharge  aCharge,
const MagneticField fieldProvider 
)
inline

Definition at line 42 of file FreeTrajectoryState.h.

45  :
46  theGlobalParameters(aX, aP, aCharge, fieldProvider),
48  {}
CurvilinearTrajectoryError theCurvilinearError
GlobalTrajectoryParameters theGlobalParameters
FreeTrajectoryState::FreeTrajectoryState ( const GlobalPoint aX,
const GlobalVector aP,
TrackCharge  aCharge,
const MagneticField fieldProvider,
GlobalVector  fieldValue 
)
inline

Definition at line 51 of file FreeTrajectoryState.h.

55  :
56  theGlobalParameters(aX, aP, aCharge, fieldProvider,fieldValue),
58  {}
CurvilinearTrajectoryError theCurvilinearError
GlobalTrajectoryParameters theGlobalParameters
FreeTrajectoryState::FreeTrajectoryState ( const GlobalTrajectoryParameters aGlobalParameters,
const CurvilinearTrajectoryError aCurvilinearError 
)
inline

Definition at line 62 of file FreeTrajectoryState.h.

63  :
64  theGlobalParameters(aGlobalParameters),
65  theCurvilinearError(aCurvilinearError)
66  {}
CurvilinearTrajectoryError theCurvilinearError
GlobalTrajectoryParameters theGlobalParameters
FreeTrajectoryState::FreeTrajectoryState ( const GlobalTrajectoryParameters aGlobalParameters,
const CartesianTrajectoryError aCartesianError 
)
inline

Definition at line 70 of file FreeTrajectoryState.h.

References createCurvilinearError().

71  :
72  theGlobalParameters(aGlobalParameters)
73  { createCurvilinearError(aCartesianError); }
GlobalTrajectoryParameters theGlobalParameters
void createCurvilinearError(CartesianTrajectoryError const &aCartesianError) const
FreeTrajectoryState::FreeTrajectoryState ( const GlobalTrajectoryParameters aGlobalParameters,
const CartesianTrajectoryError ,
const CurvilinearTrajectoryError aCurvilinearError 
)
inline

Definition at line 75 of file FreeTrajectoryState.h.

77  :
78  theGlobalParameters(aGlobalParameters),
79  theCurvilinearError(aCurvilinearError)
80  {}
CurvilinearTrajectoryError theCurvilinearError
GlobalTrajectoryParameters theGlobalParameters

Member Function Documentation

CartesianTrajectoryError FreeTrajectoryState::cartesianError ( ) const
inline

Definition at line 114 of file FreeTrajectoryState.h.

References createCartesianError(), hasError(), missingError(), and unlikely.

Referenced by BasicTrajectoryState::cartesianError(), HTrack::computePull(), CSCEfficiency::getFromFTS(), SimpleCosmicBONSeeder::seeds(), TrajectoryStateClosestToBeamLine::transverseImpactParameter(), and SimpleNavigableLayer::wellInside().

114  {
115  if unlikely(!hasError()) missingError();
116  CartesianTrajectoryError aCartesianError;
117  createCartesianError(aCartesianError);
118  return aCartesianError;
119  }
#define unlikely(x)
Definition: Likely.h:21
void createCartesianError(CartesianTrajectoryError &aCartesianError) const
return(e1-e2)*(e1-e2)+dp *dp
TrackCharge FreeTrajectoryState::charge ( void  ) const
inline
void FreeTrajectoryState::createCartesianError ( CartesianTrajectoryError aCartesianError) const
private

Definition at line 29 of file FreeTrajectoryState.cc.

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

Referenced by cartesianError().

29  {
30 
32  const AlgebraicMatrix65& jac = curv2Cart.jacobian();
33 
34  aCartesianError =
35  ROOT::Math::Similarity(jac, theCurvilinearError.matrix());
36 }
CurvilinearTrajectoryError theCurvilinearError
GlobalTrajectoryParameters theGlobalParameters
ROOT::Math::SMatrix< double, 6, 5, ROOT::Math::MatRepStd< double, 6, 5 > > AlgebraicMatrix65
const AlgebraicSymMatrix55 & matrix() const
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  {
40 
42  const AlgebraicMatrix56& jac = cart2Curv.jacobian();
43 
45  ROOT::Math::Similarity(jac, aCartesianError.matrix());
46 
47 }
ROOT::Math::SMatrix< double, 5, 6, ROOT::Math::MatRepStd< double, 5, 6 > > AlgebraicMatrix56
CurvilinearTrajectoryError theCurvilinearError
GlobalTrajectoryParameters theGlobalParameters
const CurvilinearTrajectoryError& FreeTrajectoryState::curvilinearError ( ) const
inline

Definition at line 121 of file FreeTrajectoryState.h.

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

Referenced by MuonErrorMatrix::adjust(), TSGFromPropagation::adjust(), FastTSGFromPropagation::adjust(), analyticalErrorPropagation(), TrackProducerAlgorithm< reco::Track >::buildTrack(), TrackProducerAlgorithm< reco::GsfTrack >::buildTrack(), MuonTrackLoader::buildTrackAtPCA(), MuonSeedTrack::buildTrackAtPCA(), MuonTrackLoader::buildTrackUpdatedAtPCA(), HTrack::computePull(), BasicTrajectoryState::createLocalErrorFromCurvilinearError(), BasicTrajectoryState::curvilinearError(), AnalyticalImpactPointExtrapolator::extrapolateSingleState(), AnalyticalTrajectoryExtrapolatorToLine::extrapolateSingleState(), GsfTrackProducerBase::fillMode(), PerigeeConversions::ftsToPerigeeError(), MatcherUsingTracksAlgorithm::getChi2(), TrajectoryStateAccessor::inversePtError(), TSCBLBuilderNoMaterial::operator()(), operator<<(), TrackKinematicStatePropagator::propagateToTheTransversePCACharged(), SteppingHelixStateInfo::SteppingHelixStateInfo(), reco::TransientTrackFromFTS::track(), and MuonNavigableLayer::trackingRange().

121  {
122  if unlikely(!hasError()) missingError();
124  }
CurvilinearTrajectoryError theCurvilinearError
#define unlikely(x)
Definition: Likely.h:21
return(e1-e2)*(e1-e2)+dp *dp
bool FreeTrajectoryState::hasCurvilinearError ( ) const
inline
bool FreeTrajectoryState::hasError ( void  ) const
inline
void FreeTrajectoryState::missingError ( ) const
private

Definition at line 14 of file FreeTrajectoryState.cc.

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

Referenced by cartesianError(), and curvilinearError().

14  {
15  std::stringstream form;
16  form<< "FreeTrajectoryState: attempt to access errors when none available" <<
17  "\nCurvilinear error valid/values :"<< theCurvilinearError.valid() << "\n"
19  edm::LogWarning("FreeTrajectoryState") << "(was exception) " << form.str();
20  // throw TrajectoryStateException(form.str());
21  // bPoint();
22 }
CurvilinearTrajectoryError theCurvilinearError
const AlgebraicSymMatrix55 & matrix() const
GlobalVector FreeTrajectoryState::momentum ( ) const
inline

Definition at line 87 of file FreeTrajectoryState.h.

References GlobalTrajectoryParameters::momentum(), and theGlobalParameters.

Referenced by MuonErrorMatrix::adjust(), TSGFromPropagation::adjust(), FastTSGFromPropagation::adjust(), ElectronSeedAnalyzer::analyze(), ValidationMisalignedTracker::analyze(), TestOutliers::analyze(), HLTPMMassFilter::approxMomAtVtx(), CosmicMuonTrajectoryBuilder::build(), TrackProducerAlgorithm< reco::Track >::buildTrack(), TrackProducerAlgorithm< reco::GsfTrack >::buildTrack(), MuonTrackLoader::buildTrackAtPCA(), MuonSeedTrack::buildTrackAtPCA(), MuonTrackLoader::buildTrackUpdatedAtPCA(), TangentApproachInRPhi::calculate(), DirectMuonNavigation::checkCompatible(), DirectMuonNavigation::compatibleEndcapLayers(), PixelHitMatcher::compatibleHits(), DirectMuonNavigation::compatibleLayers(), PixelHitMatcher::compatibleSeeds(), HTrack::computePull(), HTrack::computeResolution(), HTrack::computeTDRResolution(), ReferenceTrajectory::construct(), BasicTrajectoryState::createLocalParameters(), TransverseImpactPointExtrapolator::doExtrapolation(), MuonPatternRecoDumper::dumpFTS(), CSCEfficiency::efficienciesPerChamber(), PropagateToMuon::extrapolate(), AnalyticalImpactPointExtrapolator::extrapolateSingleState(), AnalyticalTrajectoryExtrapolatorToLine::extrapolateSingleState(), HTrack::Fill(), TrackDetectorAssociator::fillCaloTruth(), GsfTrackProducerBase::fillMode(), MuonTrackAnalyzer::fillPlots(), PerigeeConversions::ftsToPerigeeParameters(), MatcherUsingTracksAlgorithm::getChi2(), CSCEfficiency::getFromFTS(), HDetIdAssociator::getTrajectory(), BasicTrajectoryState::globalDirection(), KinematicState::globalMomentum(), BasicTrajectoryState::globalMomentum(), TrackDetMatchInfo::insideCone(), TrajectoryStateAccessor::inversePtError(), MuonNavigableLayer::isInsideOut(), PerigeeConversions::jacobianCurvilinear2Perigee(), MuonErrorMatrixAdjuster::makeTrack(), MatcherUsingTracksAlgorithm::matchByDirectComparison(), MatcherUsingTracksAlgorithm::matchWithPropagation(), CosmicParametersDefinerForTP::momentum(), StateOnTrackerBound::operator()(), PropagationDirectionChooser::operator()(), TrimmedTrackFilter::operator()(), CrossingPtBasedLinearizationPointFinder::CompareTwoTracks::operator()(), CosmicTrackingParticleSelector::operator()(), DirectMuonNavigation::outward(), DirectTrackerNavigation::outward(), TrackAssociatorByChi2::parametersAtClosestApproach(), TrajectorySeedProducer::produce(), TrackCandidateProducer::produce(), reco::modules::DuplicateTrackMerger::produce(), StandAloneMuonTrajectoryBuilder::propagateTheSeedTSOS(), TrackKinematicStatePropagator::propagateToTheTransversePCANeutral(), TrackClassifier::reconstructionInformation(), StandAloneMuonFilter::refit(), MuonTrackingRegionBuilder::region(), SeedFilter::seeds(), TrackAlgoCompareUtil::SetTrackingParticleD0Dz(), SteppingHelixStateInfo::SteppingHelixStateInfo(), CSCEfficiency::stripWire_Efficiencies(), ThresholdPtTrajectoryFilter::test(), reco::TransientTrackFromFTS::track(), and StandAloneMuonTrajectoryBuilder::trajectories().

87  {
89  }
GlobalTrajectoryParameters theGlobalParameters
const GlobalTrajectoryParameters& FreeTrajectoryState::parameters ( void  ) const
inline
GlobalPoint FreeTrajectoryState::position ( ) const
inline

Definition at line 84 of file FreeTrajectoryState.h.

References GlobalTrajectoryParameters::position(), and theGlobalParameters.

Referenced by TrackDetectorAssociator::addTAMuonSegmentMatch(), ElectronSeedAnalyzer::analyze(), ValidationMisalignedTracker::analyze(), HcalCorrPFCalculation::analyze(), MuonAlignmentAnalyzer::analyze(), TestOutliers::analyze(), TrackDetectorAssociator::associate(), CosmicMuonTrajectoryBuilder::build(), SeedForPhotonConversionFromQuadruplets::buildSeedBool(), TrackProducerAlgorithm< reco::Track >::buildTrack(), TrackProducerAlgorithm< reco::GsfTrack >::buildTrack(), MuonTrackLoader::buildTrackAtPCA(), MuonSeedTrack::buildTrackAtPCA(), MuonTrackLoader::buildTrackUpdatedAtPCA(), TangentApproachInRPhi::calculate(), reco::TransientTrackFromFTS::calculateTSOSAtVertex(), reco::GsfTransientTrack::calculateTSOSAtVertex(), DirectMuonNavigation::checkCompatible(), DirectTrackerNavigation::checkCompatible(), PixelHitMatcher::compatibleHits(), DirectMuonNavigation::compatibleLayers(), DirectTrackerNavigation::compatibleLayers(), PixelHitMatcher::compatibleSeeds(), BasicTrajectoryState::createLocalParameters(), SimpleNavigableLayer::crossingState(), TransverseImpactPointExtrapolator::doExtrapolation(), MuonPatternRecoDumper::dumpFTS(), PropagateToMuon::extrapolate(), AnalyticalImpactPointExtrapolator::extrapolateSingleState(), AnalyticalTrajectoryExtrapolatorToLine::extrapolateSingleState(), CSCEfficiency::filter(), PerigeeConversions::ftsToPerigeeParameters(), MatcherUsingTracksAlgorithm::getChi2(), CSCEfficiency::getFromFTS(), SteppingHelixStateInfo::getStateOnSurface(), TrackDetectorAssociator::getTAMuonChamberMatches(), HDetIdAssociator::getTrajectory(), KinematicState::globalPosition(), BasicTrajectoryState::globalPosition(), reco::TrackTransientTrack::impactPointState(), reco::TransientTrackFromFTS::impactPointTSCP(), reco::TrackTransientTrack::impactPointTSCP(), reco::GsfTransientTrack::impactPointTSCP(), MuonNavigableLayer::isInsideOut(), MatcherUsingTracksAlgorithm::matchByDirectComparison(), MatcherUsingTracksAlgorithm::matchWithPropagation(), StateOnTrackerBound::operator()(), PropagationDirectionChooser::operator()(), TransientTrackKinematicStateBuilder::operator()(), CosmicTrackingParticleSelector::operator()(), DirectMuonNavigation::outward(), DirectTrackerNavigation::outward(), TrackAssociatorByChi2::parametersAtClosestApproach(), reco::modules::DuplicateTrackMerger::produce(), OutsideInMuonSeeder::produce(), MuonErrorMatrixAdjuster::produce(), TrackKinematicStatePropagator::propagateToTheTransversePCANeutral(), MuonForwardNavigableLayer::pushResult(), MuonBarrelNavigableLayer::pushResult(), CSCEfficiency::recHitSegment_Efficiencies(), TrackClassifier::reconstructionInformation(), TrackAlgoCompareUtil::SetTrackingParticleD0Dz(), SteppingHelixStateInfo::SteppingHelixStateInfo(), reco::TransientTrackFromFTS::track(), MuonNavigableLayer::trackingRange(), TrajectoryStateClosestToBeamLine::transverseImpactParameter(), CosmicParametersDefinerForTP::vertex(), and SimpleNavigableLayer::wellInside().

84  {
86  }
GlobalTrajectoryParameters theGlobalParameters
void FreeTrajectoryState::rescaleError ( double  factor)

Definition at line 50 of file FreeTrajectoryState.cc.

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

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

50  {
51  if unlikely(!hasError()) return;
52  bool zeroField = (parameters().magneticField().nominalValue()==0);
53  if unlikely(zeroField) theCurvilinearError.zeroFieldScaling(factor*factor);
54  else theCurvilinearError *= (factor*factor);
55 }
const GlobalTrajectoryParameters & parameters() const
CurvilinearTrajectoryError theCurvilinearError
#define unlikely(x)
Definition: Likely.h:21
return(e1-e2)*(e1-e2)+dp *dp
if(dp >Float(M_PI)) dp-
void FreeTrajectoryState::setCartesianError ( const CartesianTrajectoryError err)
inline

Definition at line 129 of file FreeTrajectoryState.h.

References createCurvilinearError().

Referenced by TwoBodyDecayTrajectoryState::setError().

129  {
131  }
void createCurvilinearError(CartesianTrajectoryError const &aCartesianError) const
void FreeTrajectoryState::setCartesianError ( const AlgebraicSymMatrix66 err)
inline

Definition at line 132 of file FreeTrajectoryState.h.

References createCurvilinearError().

132  {
134  }
void createCurvilinearError(CartesianTrajectoryError const &aCartesianError) const
CurvilinearTrajectoryError& FreeTrajectoryState::setCurvilinearError ( )
inline

Definition at line 136 of file FreeTrajectoryState.h.

References theCurvilinearError.

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

136  {
137  return theCurvilinearError;
138  }
CurvilinearTrajectoryError theCurvilinearError
void FreeTrajectoryState::setCurvilinearError ( const CurvilinearTrajectoryError err)
inline

Definition at line 140 of file FreeTrajectoryState.h.

References theCurvilinearError.

140  {
141  theCurvilinearError = err;
142  }
CurvilinearTrajectoryError theCurvilinearError
double FreeTrajectoryState::signedInverseMomentum ( ) const
inline
double FreeTrajectoryState::transverseCurvature ( ) const
inline

Member Data Documentation

CurvilinearTrajectoryError FreeTrajectoryState::theCurvilinearError
mutableprivate
GlobalTrajectoryParameters FreeTrajectoryState::theGlobalParameters
private