CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

FreeTrajectoryState Class Reference

#include <FreeTrajectoryState.h>

Inheritance diagram for FreeTrajectoryState:
BlockWipedAllocated< FreeTrajectoryState >

List of all members.

Public Member Functions

bool canReach (double radius) const
CartesianTrajectoryError cartesianError () const
TrackCharge charge () const
const CurvilinearTrajectoryErrorcurvilinearError () const
 FreeTrajectoryState ()
 FreeTrajectoryState (const GlobalTrajectoryParameters &aGlobalParameters)
 FreeTrajectoryState (const GlobalTrajectoryParameters &aGlobalParameters, const CurvilinearTrajectoryError &aCurvilinearError)
 FreeTrajectoryState (const GlobalTrajectoryParameters &aGlobalParameters, const CartesianTrajectoryError &aCartesianError)
 FreeTrajectoryState (const GlobalTrajectoryParameters &aGlobalParameters, const CartesianTrajectoryError &, const CurvilinearTrajectoryError &aCurvilinearError)
 FreeTrajectoryState (const GlobalPoint &aX, const GlobalVector &aP, TrackCharge aCharge, const MagneticField *fieldProvider)
bool hasCurvilinearError () const
bool hasError () const
GlobalVector momentum () const
const GlobalTrajectoryParametersparameters () const
GlobalPoint position () const
void rescaleError (double factor)
void setCartesianError (const AlgebraicSymMatrix66 &err)
void setCartesianError (const CartesianTrajectoryError &err)
void setCurvilinearError (const AlgebraicSymMatrix55 &err)
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 31 of file FreeTrajectoryState.h.


Constructor & Destructor Documentation

FreeTrajectoryState::FreeTrajectoryState ( ) [inline]

Definition at line 36 of file FreeTrajectoryState.h.

FreeTrajectoryState::FreeTrajectoryState ( const GlobalTrajectoryParameters aGlobalParameters) [inline]

Definition at line 39 of file FreeTrajectoryState.h.

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

Definition at line 44 of file FreeTrajectoryState.h.

                                                          :
    theGlobalParameters(aX, aP, aCharge, fieldProvider),  
    theCurvilinearError(InvalidError())
  {}
FreeTrajectoryState::FreeTrajectoryState ( const GlobalTrajectoryParameters aGlobalParameters,
const CurvilinearTrajectoryError aCurvilinearError 
) [inline]

Definition at line 53 of file FreeTrajectoryState.h.

                                                                           :
    theGlobalParameters(aGlobalParameters),
    theCurvilinearError(aCurvilinearError)
  {}
FreeTrajectoryState::FreeTrajectoryState ( const GlobalTrajectoryParameters aGlobalParameters,
const CartesianTrajectoryError aCartesianError 
) [inline]

Definition at line 61 of file FreeTrajectoryState.h.

References createCurvilinearError().

                                                                       :
    theGlobalParameters(aGlobalParameters)
  { createCurvilinearError(aCartesianError);  }
FreeTrajectoryState::FreeTrajectoryState ( const GlobalTrajectoryParameters aGlobalParameters,
const CartesianTrajectoryError ,
const CurvilinearTrajectoryError aCurvilinearError 
) [inline]

Definition at line 66 of file FreeTrajectoryState.h.

                                                                           :
    theGlobalParameters(aGlobalParameters),
    theCurvilinearError(aCurvilinearError)  
  {}

Member Function Documentation

bool FreeTrajectoryState::canReach ( double  radius) const

Definition at line 57 of file FreeTrajectoryState.cc.

References lumiQTWidget::ax, momentum(), AlCaHLTBitMon_ParallelJobs::p, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::perp2(), position(), CosmicsPD_Skims::radius, rho, findQualityFiles::rr, corrVsCorr::rx, corrVsCorr::ry, mathSSE::sqrt(), transverseCurvature(), Vector3DBase< T, FrameTag >::unit(), PV3DBase< T, PVType, FrameType >::x(), x, and PV3DBase< T, PVType, FrameType >::y().

                                                      {
  GlobalPoint x = position();
  GlobalVector p = momentum().unit();
  double rho = transverseCurvature()*p.perp();
  double rx = rho*x.x();
  double ry = rho*x.y();
  double rr = rho*radius;
  double ax = p.x()*rx + p.y()*ry;
  double ay = p.x()*ry - p.y()*rx + p.perp2();
  double cospsi = (.5*(rx*rx + ry*ry - rr*rr) + ay)/sqrt(ax*ax + ay*ay);
  return fabs(cospsi) <= 1.;
}
CartesianTrajectoryError FreeTrajectoryState::cartesianError ( ) const [inline]
TrackCharge FreeTrajectoryState::charge ( void  ) const [inline]
void FreeTrajectoryState::createCartesianError ( CartesianTrajectoryError aCartesianError) const [private]

Definition at line 27 of file FreeTrajectoryState.cc.

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

Referenced by cartesianError().

                                                                                              {
  
  JacobianCurvilinearToCartesian curv2Cart(theGlobalParameters);
  const AlgebraicMatrix65& jac = curv2Cart.jacobian();

  aCartesianError = 
    ROOT::Math::Similarity(jac, theCurvilinearError.matrix());
}
void FreeTrajectoryState::createCurvilinearError ( CartesianTrajectoryError const &  aCartesianError) const [private]

Definition at line 37 of file FreeTrajectoryState.cc.

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

Referenced by FreeTrajectoryState(), and setCartesianError().

                                                                                                     {
  
  JacobianCartesianToCurvilinear cart2Curv(theGlobalParameters);
  const AlgebraicMatrix56& jac = cart2Curv.jacobian();
  
  theCurvilinearError = 
    ROOT::Math::Similarity(jac, aCartesianError.matrix());

} 
const CurvilinearTrajectoryError& FreeTrajectoryState::curvilinearError ( ) const [inline]
bool FreeTrajectoryState::hasCurvilinearError ( ) const [inline]

Definition at line 93 of file FreeTrajectoryState.h.

References theCurvilinearError, and CurvilinearTrajectoryError::valid().

Referenced by hasError().

bool FreeTrajectoryState::hasError ( void  ) const [inline]
void FreeTrajectoryState::missingError ( ) const [private]

Definition at line 13 of file FreeTrajectoryState.cc.

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

Referenced by cartesianError(), and curvilinearError().

                                             {
  std::stringstream form;
  form<< "FreeTrajectoryState: attempt to access errors when none available" <<
    "\nCurvilinear error valid/values :"<< theCurvilinearError.valid() << "\n" 
      <<  theCurvilinearError.matrix();
    edm::LogWarning("FreeTrajectoryState") << "(was exception) " << form.str();
//  throw TrajectoryStateException(form.str());
}
GlobalVector FreeTrajectoryState::momentum ( ) const [inline]

Definition at line 78 of file FreeTrajectoryState.h.

References GlobalTrajectoryParameters::momentum(), and theGlobalParameters.

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

const GlobalTrajectoryParameters& FreeTrajectoryState::parameters ( void  ) const [inline]
GlobalPoint FreeTrajectoryState::position ( void  ) const [inline]

Definition at line 75 of file FreeTrajectoryState.h.

References GlobalTrajectoryParameters::position(), and theGlobalParameters.

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

void FreeTrajectoryState::rescaleError ( double  factor)
void FreeTrajectoryState::setCartesianError ( const CartesianTrajectoryError err) [inline]
void FreeTrajectoryState::setCartesianError ( const AlgebraicSymMatrix66 err) [inline]
void FreeTrajectoryState::setCurvilinearError ( const CurvilinearTrajectoryError err) [inline]
void FreeTrajectoryState::setCurvilinearError ( const AlgebraicSymMatrix55 err) [inline]
double FreeTrajectoryState::signedInverseMomentum ( ) const [inline]
double FreeTrajectoryState::transverseCurvature ( ) const [inline]

Member Data Documentation