CMS 3D CMS Logo

Functions
trajectoryStateTransform Namespace Reference

Functions

FreeTrajectoryState initialFreeState (const reco::Track &tk, const MagneticField *field, bool withErr=true)
 
FreeTrajectoryState initialFreeStateL1TTrack (const TTTrack< Ref_Phase2TrackerDigi_ > &tk, const MagneticField *field, bool withErr=false)
 
FreeTrajectoryState innerFreeState (const reco::Track &tk, const MagneticField *field, bool withErr=true)
 
TrajectoryStateOnSurface innerStateOnSurface (const reco::Track &tk, const TrackingGeometry &geom, const MagneticField *field, bool withErr=true)
 
FreeTrajectoryState outerFreeState (const reco::Track &tk, const MagneticField *field, bool withErr=true)
 
TrajectoryStateOnSurface outerStateOnSurface (const reco::Track &tk, const TrackingGeometry &geom, const MagneticField *field, bool withErr=true)
 
PTrajectoryStateOnDet persistentState (const TrajectoryStateOnSurface &ts, unsigned int detid)
 
TrajectoryStateOnSurface transientState (const PTrajectoryStateOnDet &ts, const Surface *surface, const MagneticField *field)
 

Function Documentation

◆ initialFreeState()

FreeTrajectoryState trajectoryStateTransform::initialFreeState ( const reco::Track tk,
const MagneticField field,
bool  withErr = true 
)

◆ initialFreeStateL1TTrack()

FreeTrajectoryState trajectoryStateTransform::initialFreeStateL1TTrack ( const TTTrack< Ref_Phase2TrackerDigi_ > &  tk,
const MagneticField field,
bool  withErr = false 
)

Definition at line 70 of file TrajectoryStateTransform.cc.

72  {
74  GlobalPoint gpos(pos);
75  GlobalVector gmom = tk.momentum();
76  int charge = tk.rInv() > 0.f ? 1 : -1;
77 
78  GlobalTrajectoryParameters par(gpos, gmom, charge, field);
79  if (!withErr)
80  return FreeTrajectoryState(par);
82  mat *= 1e-8;
83  return FreeTrajectoryState(par, mat);
84  }

References ALCARECOTkAlJpsiMuMu_cff::charge, MillePedeFileConverter_cfg::e, TTTrack< T >::momentum(), TTTrack< T >::POCA(), and TTTrack< T >::rInv().

Referenced by SeedGeneratorFromL1TTracksEDProducer::produce().

◆ innerFreeState()

FreeTrajectoryState trajectoryStateTransform::innerFreeState ( const reco::Track tk,
const MagneticField field,
bool  withErr = true 
)

◆ innerStateOnSurface()

TrajectoryStateOnSurface trajectoryStateTransform::innerStateOnSurface ( const reco::Track tk,
const TrackingGeometry geom,
const MagneticField field,
bool  withErr = true 
)

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

Definition at line 110 of file TrajectoryStateTransform.cc.

113  {
114  const Surface& surface = geom.idToDet(DetId(tk.extra()->innerDetId()))->surface();
115  return TrajectoryStateOnSurface(innerFreeState(tk, field, withErr), surface);
116  }

References reco::Track::extra(), relativeConstraints::geom, and innerFreeState().

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

◆ outerFreeState()

FreeTrajectoryState trajectoryStateTransform::outerFreeState ( const reco::Track tk,
const MagneticField field,
bool  withErr = true 
)

◆ outerStateOnSurface()

TrajectoryStateOnSurface trajectoryStateTransform::outerStateOnSurface ( const reco::Track tk,
const TrackingGeometry geom,
const MagneticField field,
bool  withErr = true 
)

◆ persistentState()

PTrajectoryStateOnDet trajectoryStateTransform::persistentState ( const TrajectoryStateOnSurface ts,
unsigned int  detid 
)

should check if corresponds to m

should check if corresponds to m

Definition at line 14 of file TrajectoryStateTransform.cc.

14  {
15  int surfaceSide = static_cast<int>(ts.surfaceSide());
16  auto pt = ts.globalMomentum().perp();
17 
18  if (ts.hasError()) {
19  AlgebraicSymMatrix55 const& m = ts.localError().matrix();
20 
21  int dim = 5;
22  float localErrors[15];
23 
24  int k = 0;
25  for (int i = 0; i < dim; i++) {
26  for (int j = 0; j <= i; j++) {
27  localErrors[k++] = m(i, j);
28  }
29  }
30  return PTrajectoryStateOnDet(ts.localParameters(), pt, localErrors, detid, surfaceSide);
31  }
32  return PTrajectoryStateOnDet(ts.localParameters(), pt, detid, surfaceSide);
33  }

References TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::hasError(), mps_fire::i, dqmiolumiharvest::j, dqmdumpme::k, TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localParameters(), visualization-live-secondInstance_cfg::m, LocalTrajectoryError::matrix(), PV3DBase< T, PVType, FrameType >::perp(), DiDispStaMuonMonitor_cfi::pt, and TrajectoryStateOnSurface::surfaceSide().

Referenced by SeedForPhotonConversion1Leg::buildSeed(), SeedFromConsecutiveHitsCreator::buildSeed(), SeedFromGenericPairOrTriplet::buildSeed(), SeedForPhotonConversionFromQuadruplets::buildSeed(), SeedFromNuclearInteraction::construct(), MkFitOutputConverter::convertCandidates(), RPCSeedPattern::createFakeSeed(), MuonSeedFromRecHits::createSeed(), MuonSeedCreator::createSeed(), OutInConversionSeedFinder::createSeed(), RPCSeedPattern::createSeed(), SeedingOTEDProducer::createSeed(), InOutConversionSeedFinder::createSeed(), TSGFromPropagation::createSeed(), FastTSGFromPropagation::createSeed(), OutsideInMuonSeeder::doLayer(), SeedGeneratorFromL1TTracksEDProducer::findSeedsOnLayer(), TSGForOI::findSeedsOnLayer(), SeedFromProtoTrack::init(), CalibrationTrackSelectorFromDetIdList::makeCandidate(), reco::modules::CosmicTrackSplitter::makeCandidate(), reco::modules::TrackerTrackHitFilter::makeCandidate(), CosmicSeedCreator::makeSeed(), SETSeedFinder::makeSeed(), TSGForOI::makeSeedsFromHits(), TSGForOIFromL2::makeSeedsFromHits(), TSGForOIFromL2::makeSeedsWithoutHits(), TrackMerger::merge(), GlobalTrackerMuonAlignment::muonFitter(), MuonReSeeder::produce(), SETMuonSeedProducer::produce(), SeedProducerFromSoA::produce(), TrackCandidateProducer::produce(), TrajectorySeedFromMuonProducer::produce(), L2MuonSeedGeneratorFromL1T::produce(), L2MuonSeedGenerator::produce(), ConvBremSeedProducer::produce(), L2MuonSeedGeneratorFromL1TkMu::produce(), TrackerToMuonPropagator::produce(), CSCOverlapsTrackPreparation::produce(), cms::CosmicTrackFinder::produce(), cms::CkfTrackCandidateMakerBase::produceBase(), TSGForRoadSearch::pushTrajectorySeed(), TrackInfoProducerAlgorithm::run(), SeedGeneratorForCRack::seeds(), SeedGeneratorForCosmics::seeds(), SimpleCosmicBONSeeder::seeds(), GlobalTrackerMuonAlignment::trackFitter(), InOutConversionTrackFinder::tracks(), OutInConversionTrackFinder::tracks(), StandAloneMuonTrajectoryBuilder::trajectories(), and CosmicMuonSeedGenerator::tsosToSeed().

◆ transientState()

TrajectoryStateOnSurface trajectoryStateTransform::transientState ( const PTrajectoryStateOnDet ts,
const Surface surface,
const MagneticField field 
)

Definition at line 35 of file TrajectoryStateTransform.cc.

37  {
39  bool errInv = true;
40  if (ts.hasError()) {
41  errInv = false;
42  int dim = 5;
43  int k = 0;
44  for (int i = 0; i < dim; i++) {
45  for (int j = 0; j <= i; j++) {
46  m(i, j) = ts.error(k++); // NOTE: here we do a cast float => double.
47  }
48  }
49  }
50 
53  *surface,
54  field,
55  static_cast<SurfaceSide>(ts.surfaceSide()));
56  }

References PTrajectoryStateOnDet::error(), PTrajectoryStateOnDet::hasError(), mps_fire::i, dqmiolumiharvest::j, dqmdumpme::k, visualization-live-secondInstance_cfg::m, PTrajectoryStateOnDet::parameters(), and PTrajectoryStateOnDet::surfaceSide().

Referenced by MuonSeedsAnalyzer::analyze(), TrackBuildingAnalyzer::analyze(), ElectronSeedAnalyzer::analyze(), TestHits::analyze(), TestSmoothHits::analyze(), SeedMultiplicityAnalyzer::analyze(), TrackerSeedCleaner::clean(), MkFitInputConverter::convertSeeds(), MuonCkfTrajectoryBuilder::findCompatibleMeasurements(), BaseCkfTrajectoryBuilder::findStateAndLayers(), MuonSeedTrack::getSeedTSOS(), MuonTrackAnalyzer::getSeedTSOS(), ConversionSeedFilter::getTSOS(), SeedMatcher::matchRecHitCombinations(), CtfSpecialSeedGenerator::postCheck(), TrackProducerWithSCAssociation::produce(), ConversionSeedFilterCharge::produce(), FakeTrackProducer< T >::produce(), TrackCandidateProducer::produce(), TrackFromSeedProducer::produce(), BaseCkfTrajectoryBuilder::seedMeasurements(), MuonSeedCleaner::SeedMomentum(), MuonSeedCleaner::SeedPosition(), SeedTransformer::seedTransientState(), SeedToTrackProducer::seedTransientState(), CosmicTrajectoryBuilder::startingTSOS(), CRackTrajectoryBuilder::startingTSOS(), FastTSGFromPropagation::trackerSeeds(), and CosmicMuonTrajectoryBuilder::trajectories().

reco::Track::outerPosition
const math::XYZPoint & outerPosition() const
position of the outermost hit
Definition: Track.h:62
Vector3DBase
Definition: Vector3DBase.h:8
reco::Track::outerMomentum
const math::XYZVector & outerMomentum() const
momentum vector at the outermost hit position
Definition: Track.h:65
mps_fire.i
i
Definition: mps_fire.py:428
PTrajectoryStateOnDet::error
float & error(int i)
Definition: PTrajectoryStateOnDet.h:63
trajectoryStateTransform::outerFreeState
FreeTrajectoryState outerFreeState(const reco::Track &tk, const MagneticField *field, bool withErr=true)
Definition: TrajectoryStateTransform.cc:98
TTTrack::momentum
GlobalVector momentum() const
Track momentum.
Definition: TTTrack.h:287
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
pos
Definition: PixelAliasList.h:18
Surface
Definition: Surface.h:36
SurfaceSideDefinition::SurfaceSide
SurfaceSide
Definition: SurfaceSideDefinition.h:8
LocalTrajectoryError::matrix
const AlgebraicSymMatrix55 & matrix() const
Definition: LocalTrajectoryError.h:60
TTTrack::rInv
double rInv() const
Track curvature.
Definition: TTTrack.h:292
reco::Track::extra
const TrackExtraRef & extra() const
reference to "extra" object
Definition: Track.h:139
AlgebraicMatrixID
ROOT::Math::SMatrixIdentity AlgebraicMatrixID
Definition: AlgebraicROOTObjects.h:72
DetId
Definition: DetId.h:17
TTTrack::POCA
GlobalPoint POCA() const
POCA.
Definition: TTTrack.h:322
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
reco::Track::innerMomentum
const math::XYZVector & innerMomentum() const
momentum vector at the innermost hit position
Definition: Track.h:59
CurvilinearTrajectoryError
Definition: CurvilinearTrajectoryError.h:27
TrajectoryStateOnSurface::hasError
bool hasError() const
Definition: TrajectoryStateOnSurface.h:56
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
reco::TrackBase::charge
int charge() const
track electric charge
Definition: TrackBase.h:596
GlobalTrajectoryParameters
Definition: GlobalTrajectoryParameters.h:15
reco::TrackBase::covariance
CovarianceMatrix covariance() const
return track covariance matrix
Definition: TrackBase.h:716
dqmdumpme.k
k
Definition: dqmdumpme.py:60
Point3DBase< float, GlobalTag >
TrajectoryStateOnSurface::localParameters
const LocalTrajectoryParameters & localParameters() const
Definition: TrajectoryStateOnSurface.h:73
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
LocalTrajectoryError
Definition: LocalTrajectoryError.h:20
reco::Track::innerPosition
const math::XYZPoint & innerPosition() const
position of the innermost hit
Definition: Track.h:56
submitPVResolutionJobs.err
err
Definition: submitPVResolutionJobs.py:85
reco::TrackBase::vertex
const Point & vertex() const
reference point on the track. This method is DEPRECATED, please use referencePoint() instead
Definition: TrackBase.h:676
trajectoryStateTransform::innerFreeState
FreeTrajectoryState innerFreeState(const reco::Track &tk, const MagneticField *field, bool withErr=true)
Definition: TrajectoryStateTransform.cc:86
TrajectoryStateOnSurface::globalMomentum
GlobalVector globalMomentum() const
Definition: TrajectoryStateOnSurface.h:66
PTrajectoryStateOnDet::hasError
bool hasError() const
Definition: PTrajectoryStateOnDet.h:62
PTrajectoryStateOnDet::parameters
const LocalTrajectoryParameters & parameters() const
Definition: PTrajectoryStateOnDet.h:60
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
PTrajectoryStateOnDet
Definition: PTrajectoryStateOnDet.h:10
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
reco::TrackBase::momentum
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:664
TrajectoryStateOnSurface::localError
const LocalTrajectoryError & localError() const
Definition: TrajectoryStateOnSurface.h:77
AlgebraicSymMatrix55
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
Definition: AlgebraicROOTObjects.h:23
TrajectoryStateOnSurface::surfaceSide
SurfaceSide surfaceSide() const
Position relative to material, defined relative to momentum vector.
Definition: TrajectoryStateOnSurface.h:89
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
Basic3DVector< float >
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
InvalidError
Definition: TrivialError.h:8