#include <TrackingTools/TrajectoryState/interface/TrajectoryStateTransform.h>
Definition at line 13 of file TrajectoryStateTransform.h.
FreeTrajectoryState TrajectoryStateTransform::initialFreeState | ( | const reco::Track & | tk, | |
const MagneticField * | field | |||
) | const |
Construct a FreeTrajectoryState from the reco::Track innermost or outermost state, does not require access to tracking geometry.
Definition at line 57 of file TrajectoryStateTransform.cc.
References reco::TrackBase::charge(), reco::TrackBase::covariance(), err, reco::TrackBase::momentum(), and reco::TrackBase::vertex().
Referenced by TrackDetectorAssociator::associate(), reco::GsfTransientTrack::GsfTransientTrack(), TSGForRoadSearch::IPfts(), TSGFromPropagation::outerTkState(), MuonErrorMatrixAdjuster::produce(), MuonTrackingRegionBuilder::region(), and reco::TrackTransientTrack::TrackTransientTrack().
00059 { 00060 Basic3DVector<float> pos( tk.vertex()); 00061 GlobalPoint gpos( pos); 00062 Basic3DVector<float> mom( tk.momentum()); 00063 GlobalVector gmom( mom); 00064 GlobalTrajectoryParameters par( gpos, gmom, tk.charge(), field); 00065 CurvilinearTrajectoryError err( tk.covariance()); 00066 return FreeTrajectoryState( par, err); 00067 }
FreeTrajectoryState TrajectoryStateTransform::innerFreeState | ( | const reco::Track & | tk, | |
const MagneticField * | field | |||
) | const |
Definition at line 69 of file TrajectoryStateTransform.cc.
References reco::TrackBase::charge(), err, reco::Track::extra(), reco::Track::innerMomentum(), and reco::Track::innerPosition().
Referenced by TrackDetectorAssociator::associate(), innerStateOnSurface(), and EgammaHLTPixelMatchElectronAlgo::process().
00071 { 00072 Basic3DVector<float> pos( tk.innerPosition()); 00073 GlobalPoint gpos( pos); 00074 Basic3DVector<float> mom( tk.innerMomentum()); 00075 GlobalVector gmom( mom); 00076 GlobalTrajectoryParameters par( gpos, gmom, tk.charge(), field); 00077 CurvilinearTrajectoryError err( tk.extra()->innerStateCovariance()); 00078 return FreeTrajectoryState( par, err); 00079 }
TrajectoryStateOnSurface TrajectoryStateTransform::innerStateOnSurface | ( | const reco::Track & | tk, | |
const TrackingGeometry & | geom, | |||
const MagneticField * | field | |||
) | const |
Construct a TrajectoryStateOnSurface from the reco::Track innermost or outermost state, requires access to tracking geometry.
Definition at line 95 of file TrajectoryStateTransform.cc.
References reco::Track::extra(), TrackingGeometry::idToDet(), innerFreeState(), and GeomDet::surface().
Referenced by NuclearTrackCorrector::getInitialState(), GlobalCosmicMuonTrajectoryBuilder::getTransientRecHits(), reco::TrackTransientTrack::innermostMeasurementState(), TSGFromPropagation::innerState(), reco::modules::CosmicTrackSplitter::makeCandidate(), reco::modules::TrackerTrackHitFilter::makeCandidate(), GlobalCosmicMuonTrajectoryBuilder::match(), and GlobalCosmicMuonTrajectoryBuilder::trajectories().
00098 { 00099 const Surface& surface = geom.idToDet( DetId( tk.extra()->innerDetId()))->surface(); 00100 return TrajectoryStateOnSurface( innerFreeState( tk, field), surface); 00101 }
FreeTrajectoryState TrajectoryStateTransform::outerFreeState | ( | const reco::Track & | tk, | |
const MagneticField * | field | |||
) | const |
Definition at line 82 of file TrajectoryStateTransform.cc.
References reco::TrackBase::charge(), err, reco::Track::extra(), reco::Track::outerMomentum(), and reco::Track::outerPosition().
Referenced by TrackDetectorAssociator::associate(), and outerStateOnSurface().
00084 { 00085 Basic3DVector<float> pos( tk.outerPosition()); 00086 GlobalPoint gpos( pos); 00087 Basic3DVector<float> mom( tk.outerMomentum()); 00088 GlobalVector gmom( mom); 00089 GlobalTrajectoryParameters par( gpos, gmom, tk.charge(), field); 00090 CurvilinearTrajectoryError err( tk.extra()->outerStateCovariance()); 00091 return FreeTrajectoryState( par, err); 00092 }
TrajectoryStateOnSurface TrajectoryStateTransform::outerStateOnSurface | ( | const reco::Track & | tk, | |
const TrackingGeometry & | geom, | |||
const MagneticField * | field | |||
) | const |
Definition at line 103 of file TrajectoryStateTransform.cc.
References reco::Track::extra(), TrackingGeometry::idToDet(), outerFreeState(), and GeomDet::surface().
Referenced by GlobalMuonTrackMatcher::convertToTSOSMuHit(), GlobalMuonTrackMatcher::convertToTSOSTk(), GlobalMuonTrackMatcher::convertToTSOSTkHit(), NuclearTrackCorrector::getInitialState(), reco::modules::CosmicTrackSplitter::makeCandidate(), reco::modules::TrackerTrackHitFilter::makeCandidate(), GlobalCosmicMuonTrajectoryBuilder::match(), reco::TrackTransientTrack::outermostMeasurementState(), TrackerOnlyConversionProducer::produce(), and GlobalCosmicMuonTrajectoryBuilder::trajectories().
00106 { 00107 const Surface& surface = geom.idToDet( DetId( tk.extra()->outerDetId()))->surface(); 00108 return TrajectoryStateOnSurface( outerFreeState( tk, field), surface); 00109 }
PTrajectoryStateOnDet * TrajectoryStateTransform::persistentState | ( | const TrajectoryStateOnSurface & | ts, | |
unsigned int | detid | |||
) | const |
should check if corresponds to m
Definition at line 13 of file TrajectoryStateTransform.cc.
References i, j, k, TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localParameters(), m, LocalTrajectoryError::matrix(), and TrajectoryStateOnSurface::surfaceSide().
Referenced by SeedFromGenericPairOrTriplet::buildSeed(), ElectronSiStripSeedGenerator::checkHitsAndTSOS(), SeedFromNuclearInteraction::construct(), SeedFromConsecutiveHits::construct(), MuonSeedCreator::createSeed(), TSGFromPropagation::createSeed(), OutInConversionSeedFinder::createSeed(), InOutConversionSeedFinder::createSeed(), RPCSeedHits::createSeed(), MuonSeedFromRecHits::createSeed(), RoadSearchTrackCandidateMakerAlgorithm::createSeedTrajectory(), SeedFromProtoTrack::init(), reco::modules::CosmicTrackSplitter::makeCandidate(), reco::modules::TrackerTrackHitFilter::makeCandidate(), ElectronPixelSeedGenerator::prepareElTrackSeed(), ElectronGSPixelSeedGenerator::prepareElTrackSeed(), RoadSearchTrackCandidateMakerAlgorithm::PrepareTrackCandidates(), L2MuonSeedGenerator::produce(), TrackerToMuonPropagator::produce(), ConvBremSeedProducer::produce(), SeedGeneratorForLaserBeams::propagateAnalytical(), SeedGeneratorForLaserBeams::propagateWithMaterial(), TSGForRoadSearch::pushTrajectorySeed(), TrackInfoProducerAlgorithm::run(), SeedFromConsecutiveHits::SeedFromConsecutiveHits(), SeedGeneratorForCRack::seeds(), SimpleCosmicBONSeeder::seeds(), SeedGeneratorForCosmics::seeds(), StandAloneMuonTrajectoryBuilder::trajectories(), and CosmicMuonSeedGenerator::tsosToSeed().
00015 { 00016 AlgebraicSymMatrix55 m = ts.localError().matrix(); 00017 00018 int dim = 5; 00019 00020 float localErrors[15]; 00021 int k = 0; 00022 for (int i=0; i<dim; i++) { 00023 for (int j=0; j<=i; j++) { 00024 localErrors[k++] = m(i,j); 00025 } 00026 } 00027 int surfaceSide = static_cast<int>(ts.surfaceSide()); 00028 00029 return new PTrajectoryStateOnDet( ts.localParameters(), 00030 localErrors, detid, 00031 surfaceSide); 00032 }
TrajectoryStateOnSurface TrajectoryStateTransform::transientState | ( | const PTrajectoryStateOnDet & | ts, | |
const Surface * | surface, | |||
const MagneticField * | field | |||
) | const |
Definition at line 35 of file TrajectoryStateTransform.cc.
References PTrajectoryStateOnDet::errorMatrix(), i, j, k, m, PTrajectoryStateOnDet::parameters(), and PTrajectoryStateOnDet::surfaceSide().
Referenced by ElectronPixelSeedAnalyzer::analyze(), SiPixelTrackResidualSource::analyze(), TestHits::analyze(), TrackerSeedValidator::analyze(), TestSmoothHits::analyze(), TrackerSeedCleaner::clean(), MuonCkfTrajectoryBuilder::findCompatibleMeasurements(), BaseCkfTrajectoryBuilder::findStateAndLayers(), MuonTrackAnalyzer::getSeedTSOS(), MuonSeedsAnalyzer::getSeedTSOS(), MuonSeedTrack::getSeedTSOS(), MuonRoadTrajectoryBuilder::makeTrajectories_0(), VisTrajectorySeedTwig::onNewEvent(), CtfSpecialSeedGenerator::postCheck(), TrackProducerWithSCAssociation::produce(), StandAloneMuonTrajectoryBuilder::propagateTheSeedTSOS(), DAFTrackProducerAlgorithm::runWithCandidate(), BaseCkfTrajectoryBuilder::seedMeasurements(), MuonSeedBuilder::SeedMomentum(), MuonSeedBuilder::SeedPosition(), StartingLayerFinder::startingLayers(), CRackTrajectoryBuilder::startingTSOS(), CosmicTrajectoryBuilder::startingTSOS(), and SimpleTrackRefitter::startingTSOS().
00038 { 00039 int dim = 5; 00040 AlgebraicSymMatrix55 m; 00041 const std::vector<float> &errs = ts.errorMatrix(); 00042 int k = 0; 00043 for (int i=0; i<dim; i++) { 00044 for (int j=0; j<=i; j++) { 00045 m(i,j) = errs[k++]; // NOTE: here we do a cast float => double. 00046 } 00047 } 00048 00049 00050 return TrajectoryStateOnSurface( ts.parameters(), 00051 LocalTrajectoryError(m), 00052 *surface, field, 00053 static_cast<SurfaceSide>(ts.surfaceSide())); 00054 00055 }