CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
trajectoryStateTransform Namespace Reference

Functions

FreeTrajectoryState initialFreeState (const reco::Track &tk, const MagneticField *field)
 
FreeTrajectoryState innerFreeState (const reco::Track &tk, const MagneticField *field)
 
TrajectoryStateOnSurface innerStateOnSurface (const reco::Track &tk, const TrackingGeometry &geom, const MagneticField *field)
 
FreeTrajectoryState outerFreeState (const reco::Track &tk, const MagneticField *field)
 
TrajectoryStateOnSurface outerStateOnSurface (const reco::Track &tk, const TrackingGeometry &geom, const MagneticField *field)
 
PTrajectoryStateOnDet persistentState (const TrajectoryStateOnSurface &ts, unsigned int detid)
 
TrajectoryStateOnSurface transientState (const PTrajectoryStateOnDet &ts, const Surface *surface, const MagneticField *field)
 

Function Documentation

FreeTrajectoryState trajectoryStateTransform::initialFreeState ( const reco::Track tk,
const MagneticField field 
)

Construct a FreeTrajectoryState from the reco::Track innermost or outermost state, does not require access to tracking geometry

Definition at line 68 of file TrajectoryStateTransform.cc.

References reco::TrackBase::charge(), reco::TrackBase::covariance(), reco::TrackBase::momentum(), pos, and reco::TrackBase::vertex().

Referenced by TrackDetectorAssociator::associate(), V0Fitter::fitAll(), TrackAssociatorByPosition::getState(), reco::GsfTransientTrack::GsfTransientTrack(), TSGForRoadSearch::IPfts(), TSGFromPropagation::outerTkState(), FastTSGFromPropagation::outerTkState(), MuonErrorMatrixAdjuster::produce(), MuonTrackingRegionBuilder::region(), PropagateToMuon::startingState(), MatcherUsingTracksAlgorithm::startingState(), and reco::TrackTransientTrack::TrackTransientTrack().

70  {
72  GlobalPoint gpos( pos);
73  Basic3DVector<float> mom( tk.momentum());
74  GlobalVector gmom( mom);
75  GlobalTrajectoryParameters par( gpos, gmom, tk.charge(), field);
77  return FreeTrajectoryState( par, err);
78  }
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:150
CovarianceMatrix covariance() const
return track covariance matrix
Definition: TrackBase.h:182
const Point & vertex() const
reference point on the track. This method is DEPRECATED, please use referencePoint() instead ...
Definition: TrackBase.h:156
int charge() const
track electric charge
Definition: TrackBase.h:113
FreeTrajectoryState trajectoryStateTransform::innerFreeState ( const reco::Track tk,
const MagneticField field 
)

Definition at line 80 of file TrajectoryStateTransform.cc.

References reco::TrackBase::charge(), reco::Track::extra(), reco::Track::innerMomentum(), reco::Track::innerPosition(), and pos.

Referenced by BetaCalculatorECAL::addInfoToCandidate(), TrackDetectorAssociator::associate(), innerStateOnSurface(), EgammaHLTPixelMatchElectronAlgo::process(), TrackClusterSplitter::produce(), PropagateToMuon::startingState(), and MatcherUsingTracksAlgorithm::startingState().

82  {
84  GlobalPoint gpos( pos);
86  GlobalVector gmom( mom);
87  GlobalTrajectoryParameters par( gpos, gmom, tk.charge(), field);
88  CurvilinearTrajectoryError err( tk.extra()->innerStateCovariance());
89  return FreeTrajectoryState( par, err);
90  }
const TrackExtraRef & extra() const
reference to &quot;extra&quot; object
Definition: Track.h:97
const math::XYZPoint & innerPosition() const
position of the innermost hit
Definition: Track.h:42
const math::XYZVector & innerMomentum() const
momentum vector at the innermost hit position
Definition: Track.h:45
int charge() const
track electric charge
Definition: TrackBase.h:113
TrajectoryStateOnSurface trajectoryStateTransform::innerStateOnSurface ( const reco::Track tk,
const TrackingGeometry geom,
const MagneticField field 
)

Construct a TrajectoryStateOnSurface from the reco::Track innermost or outermost state, requires access to tracking geometry

Definition at line 106 of file TrajectoryStateTransform.cc.

References reco::Track::extra(), TrackingGeometry::idToDet(), innerFreeState(), and GeomDet::surface().

Referenced by ConversionProducer::checkPhi(), GlobalMuonTrackMatcher::convertToTSOSMuHit(), GlobalMuonTrackMatcher::convertToTSOSTkHit(), MuonShowerInformationFiller::getCompatibleDets(), NuclearTrackCorrector::getInitialState(), GlobalCosmicMuonTrajectoryBuilder::getTransientRecHits(), GlobalTrajectoryBuilderBase::getTransientRecHits(), ConversionSeedFilter::getTSOS(), reco::TrackTransientTrack::innermostMeasurementState(), TSGFromPropagation::innerState(), FastTSGFromPropagation::innerState(), reco::modules::CosmicTrackSplitter::makeCandidate(), reco::modules::TrackerTrackHitFilter::makeCandidate(), GlobalCosmicMuonTrajectoryBuilder::match(), TkConvValidator::recalculateMomentumAtFittedVertex(), MatcherUsingTracksAlgorithm::targetState(), and GlobalCosmicMuonTrajectoryBuilder::trajectories().

109  {
110  const Surface& surface = geom.idToDet( DetId( tk.extra()->innerDetId()))->surface();
111  return TrajectoryStateOnSurface( innerFreeState( tk, field), surface);
112  }
const TrackExtraRef & extra() const
reference to &quot;extra&quot; object
Definition: Track.h:97
FreeTrajectoryState innerFreeState(const reco::Track &tk, const MagneticField *field)
Definition: DetId.h:20
virtual const GeomDet * idToDet(DetId) const =0
const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
FreeTrajectoryState trajectoryStateTransform::outerFreeState ( const reco::Track tk,
const MagneticField field 
)

Definition at line 93 of file TrajectoryStateTransform.cc.

References reco::TrackBase::charge(), reco::Track::extra(), reco::Track::outerMomentum(), reco::Track::outerPosition(), and pos.

Referenced by TrackDetectorAssociator::associate(), outerStateOnSurface(), PropagateToMuon::startingState(), and MatcherUsingTracksAlgorithm::startingState().

95  {
97  GlobalPoint gpos( pos);
99  GlobalVector gmom( mom);
100  GlobalTrajectoryParameters par( gpos, gmom, tk.charge(), field);
101  CurvilinearTrajectoryError err( tk.extra()->outerStateCovariance());
102  return FreeTrajectoryState( par, err);
103  }
const TrackExtraRef & extra() const
reference to &quot;extra&quot; object
Definition: Track.h:97
const math::XYZPoint & outerPosition() const
position of the outermost hit
Definition: Track.h:47
const math::XYZVector & outerMomentum() const
momentum vector at the outermost hit position
Definition: Track.h:49
int charge() const
track electric charge
Definition: TrackBase.h:113
TrajectoryStateOnSurface trajectoryStateTransform::outerStateOnSurface ( const reco::Track tk,
const TrackingGeometry geom,
const MagneticField field 
)

Definition at line 114 of file TrajectoryStateTransform.cc.

References reco::Track::extra(), TrackingGeometry::idToDet(), outerFreeState(), and GeomDet::surface().

Referenced by GlobalMuonTrackMatcher::convertToTSOSMuHit(), GlobalMuonTrackMatcher::convertToTSOSTk(), GlobalMuonTrackMatcher::convertToTSOSTkHit(), MuonShowerInformationFiller::getCompatibleDets(), NuclearTrackCorrector::getInitialState(), ConversionProducer::getTrackImpactPosition(), reco::modules::CosmicTrackSplitter::makeCandidate(), reco::modules::TrackerTrackHitFilter::makeCandidate(), GlobalCosmicMuonTrajectoryBuilder::match(), reco::TrackTransientTrack::outermostMeasurementState(), MatcherUsingTracksAlgorithm::targetState(), and GlobalCosmicMuonTrajectoryBuilder::trajectories().

117  {
118  const Surface& surface = geom.idToDet( DetId( tk.extra()->outerDetId()))->surface();
119  return TrajectoryStateOnSurface( outerFreeState( tk, field), surface);
120  }
const TrackExtraRef & extra() const
reference to &quot;extra&quot; object
Definition: Track.h:97
Definition: DetId.h:20
virtual const GeomDet * idToDet(DetId) const =0
const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
FreeTrajectoryState outerFreeState(const reco::Track &tk, const MagneticField *field)
PTrajectoryStateOnDet trajectoryStateTransform::persistentState ( const TrajectoryStateOnSurface ts,
unsigned int  detid 
)

should check if corresponds to m

should check if corresponds to m

Definition at line 16 of file TrajectoryStateTransform.cc.

References cond::rpcobgas::detid, TrajectoryStateOnSurface::hasError(), i, j, gen::k, TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localParameters(), m, LocalTrajectoryError::matrix(), and TrajectoryStateOnSurface::surfaceSide().

Referenced by SiStripElectronSeedGenerator::altCheckHitsAndTSOS(), SeedFromConsecutiveHitsCreator::buildSeed(), SeedFromGenericPairOrTriplet::buildSeed(), SeedForPhotonConversion1Leg::buildSeed(), SeedForPhotonConversionFromQuadruplets::buildSeed(), SiStripElectronSeedGenerator::checkHitsAndTSOS(), SeedFromNuclearInteraction::construct(), RPCSeedPattern::createFakeSeed(), MuonSeedFromRecHits::createSeed(), MuonSeedCreator::createSeed(), RPCSeedPattern::createSeed(), OutInConversionSeedFinder::createSeed(), TSGFromPropagation::createSeed(), InOutConversionSeedFinder::createSeed(), FastTSGFromPropagation::createSeed(), RoadSearchTrackCandidateMakerAlgorithm::createSeedTrajectory(), SiStripElectronAlgo::findElectron(), SeedFromProtoTrack::init(), reco::modules::CosmicTrackSplitter::makeCandidate(), reco::modules::TrackerTrackHitFilter::makeCandidate(), SETSeedFinder::makeSeed(), GlobalTrackerMuonAlignment::muonFitter(), ElectronSeedGenerator::prepareElTrackSeed(), FastElectronSeedGenerator::prepareElTrackSeed(), RoadSearchTrackCandidateMakerAlgorithm::PrepareTrackCandidates(), TrackCandidateProducer::produce(), SETMuonSeedProducer::produce(), L2MuonSeedGenerator::produce(), TrajectorySeedFromMuonProducer::produce(), ConvBremSeedProducer::produce(), TrackerToMuonPropagator::produce(), CSCOverlapsTrackPreparation::produce(), cms::CosmicTrackFinder::produce(), cms::CkfTrackCandidateMakerBase::produceBase(), TSGForRoadSearch::pushTrajectorySeed(), KalmanAlignmentTrackRefitter::refitSingleTracklet(), TrackInfoProducerAlgorithm::run(), RoadSearchTrackCandidateMakerAlgorithm::run(), SeedGeneratorForCRack::seeds(), SeedGeneratorForCosmics::seeds(), SimpleCosmicBONSeeder::seeds(), GlobalTrackerMuonAlignment::trackFitter(), InOutConversionTrackFinder::tracks(), OutInConversionTrackFinder::tracks(), StandAloneMuonTrajectoryBuilder::trajectories(), CosmicSeedCreator::trajectorySeed(), and CosmicMuonSeedGenerator::tsosToSeed().

18  {
19  int surfaceSide = static_cast<int>(ts.surfaceSide());
20 
21  if (ts.hasError()) {
23 
24  int dim = 5;
25  float localErrors[15];
26 
27  int k = 0;
28  for (int i=0; i<dim; i++) {
29  for (int j=0; j<=i; j++) {
30  localErrors[k++] = m(i,j);
31  }
32  }
34  localErrors, detid,
35  surfaceSide);
36  }
38  detid,
39  surfaceSide);
40  }
int i
Definition: DBlmapReader.cc:9
const LocalTrajectoryParameters & localParameters() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
SurfaceSide surfaceSide() const
Position relative to material, defined relative to momentum vector.
int j
Definition: DBlmapReader.cc:9
const AlgebraicSymMatrix55 & matrix() const
const LocalTrajectoryError & localError() const
int k[5][pyjets_maxn]
TrajectoryStateOnSurface trajectoryStateTransform::transientState ( const PTrajectoryStateOnDet ts,
const Surface surface,
const MagneticField field 
)

Definition at line 43 of file TrajectoryStateTransform.cc.

References PTrajectoryStateOnDet::error(), PTrajectoryStateOnDet::hasError(), i, j, gen::k, m, PTrajectoryStateOnDet::parameters(), and PTrajectoryStateOnDet::surfaceSide().

Referenced by TrackBuildingAnalyzer::analyze(), ElectronSeedAnalyzer::analyze(), TestHits::analyze(), TestSmoothHits::analyze(), TrackerSeedCleaner::clean(), MuonCkfTrajectoryBuilder::findCompatibleMeasurements(), BaseCkfTrajectoryBuilder::findStateAndLayers(), MuonSeedsAnalyzer::getSeedTSOS(), MuonSeedTrack::getSeedTSOS(), MuonTrackAnalyzer::getSeedTSOS(), ConversionSeedFilter::getTSOS(), MuonRoadTrajectoryBuilder::makeTrajectories_0(), CtfSpecialSeedGenerator::postCheck(), TrackProducerWithSCAssociation::produce(), TrackCandidateProducer::produce(), ConversionSeedFilterCharge::produce(), BaseCkfTrajectoryBuilder::seedMeasurements(), MuonSeedCleaner::SeedMomentum(), MuonSeedCleaner::SeedPosition(), SeedTransformer::seedTransientState(), StartingLayerFinder::startingLayers(), CosmicTrajectoryBuilder::startingTSOS(), CRackTrajectoryBuilder::startingTSOS(), FastTSGFromPropagation::trackerSeeds(), and CosmicMuonTrajectoryBuilder::trajectories().

46  {
48  bool errInv=true;
49  if (ts.hasError()) {
50  errInv = false;
51  int dim = 5;
52  int k = 0;
53  for (int i=0; i<dim; i++) {
54  for (int j=0; j<=i; j++) {
55  m(i,j) = ts.error(k++); // NOTE: here we do a cast float => double.
56  }
57  }
58  }
59 
60 
62  errInv ? LocalTrajectoryError(InvalidError()) : LocalTrajectoryError(m),
63  *surface, field,
64  static_cast<SurfaceSide>(ts.surfaceSide()));
65 
66 }
int i
Definition: DBlmapReader.cc:9
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
int j
Definition: DBlmapReader.cc:9
int k[5][pyjets_maxn]
const LocalTrajectoryParameters & parameters() const