CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
TrajectoryStateTransform Class Reference

#include <TrajectoryStateTransform.h>

Public Member Functions

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

Detailed Description

Definition at line 13 of file TrajectoryStateTransform.h.

Member Function Documentation

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(), reco::TrackBase::momentum(), Gflash::par, pos, and reco::TrackBase::vertex().

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

59 {
61  GlobalPoint gpos( pos);
62  Basic3DVector<float> mom( tk.momentum());
63  GlobalVector gmom( mom);
64  GlobalTrajectoryParameters par( gpos, gmom, tk.charge(), field);
66  return FreeTrajectoryState( par, err);
67 }
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:149
CovarianceMatrix covariance() const
return track covariance matrix
Definition: TrackBase.h:175
const Point & vertex() const
reference point on the track. This method is DEPRECATED, please use referencePoint() instead ...
Definition: TrackBase.h:155
int charge() const
track electric charge
Definition: TrackBase.h:112
const double par[8 *NPar][4]
FreeTrajectoryState TrajectoryStateTransform::innerFreeState ( const reco::Track tk,
const MagneticField field 
) const

Definition at line 69 of file TrajectoryStateTransform.cc.

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

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

71 {
73  GlobalPoint gpos( pos);
75  GlobalVector gmom( mom);
76  GlobalTrajectoryParameters par( gpos, gmom, tk.charge(), field);
77  CurvilinearTrajectoryError err( tk.extra()->innerStateCovariance());
78  return FreeTrajectoryState( par, err);
79 }
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:112
const double par[8 *NPar][4]
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(), and GeomDet::surface().

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

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

Definition at line 82 of file TrajectoryStateTransform.cc.

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

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

84 {
86  GlobalPoint gpos( pos);
88  GlobalVector gmom( mom);
89  GlobalTrajectoryParameters par( gpos, gmom, tk.charge(), field);
90  CurvilinearTrajectoryError err( tk.extra()->outerStateCovariance());
91  return FreeTrajectoryState( par, err);
92 }
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:112
const double par[8 *NPar][4]
TrajectoryStateOnSurface TrajectoryStateTransform::outerStateOnSurface ( const reco::Track tk,
const TrackingGeometry geom,
const MagneticField field 
) const
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 cond::rpcobgas::detid, i, j, gen::k, TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localParameters(), m, LocalTrajectoryError::matrix(), and TrajectoryStateOnSurface::surfaceSide().

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

15 {
17 
18  int dim = 5;
19 
20  float localErrors[15];
21  int k = 0;
22  for (int i=0; i<dim; i++) {
23  for (int j=0; j<=i; j++) {
24  localErrors[k++] = m(i,j);
25  }
26  }
27  int surfaceSide = static_cast<int>(ts.surfaceSide());
28 
29  return new PTrajectoryStateOnDet( ts.localParameters(),
30  localErrors, detid,
31  surfaceSide);
32 }
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 
) const

Definition at line 35 of file TrajectoryStateTransform.cc.

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

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

38 {
39  int dim = 5;
41  const std::vector<float> &errs = ts.errorMatrix();
42  int k = 0;
43  for (int i=0; i<dim; i++) {
44  for (int j=0; j<=i; j++) {
45  m(i,j) = errs[k++]; // NOTE: here we do a cast float => double.
46  }
47  }
48 
49 
52  *surface, field,
53  static_cast<SurfaceSide>(ts.surfaceSide()));
54 
55 }
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 int surfaceSide() const
const std::vector< float > & errorMatrix() const
const LocalTrajectoryParameters & parameters() const