108 m_globalMuons(iConfig.getParameter<
edm::
InputTag>(
"globalMuons")),
109 m_globalMuonTracks(iConfig.getParameter<
edm::
InputTag>(
"globalMuonTracks")),
110 m_refitTracker(iConfig.getParameter<
bool>(
"refitTrackerTrack")),
119 produces<std::vector<Trajectory>>();
120 produces<TrajTrackAssociationCollection>();
152 auto trajectoryCollection = std::make_unique<std::vector<Trajectory>>();
162 reco::TrackCollection::const_iterator globalMuonTrack = globalMuonTracks->begin();
163 for (; globalMuonTrack != globalMuonTracks->end(); ++globalMuonTrack) {
165 if (fabs(
globalMuon->combinedMuon()->phi() - globalMuonTrack->phi()) < 1
e-10 &&
166 fabs(
globalMuon->combinedMuon()->eta() - globalMuonTrack->eta()) < 1
e-10)
169 if (globalMuonTrack == globalMuonTracks->end()) {
170 throw cms::Exception(
"BadConfig") <<
"The tracks label doesn't correspond to the same objects as the muons label" 178 if (trackerTrajectories.size() == 1) {
179 const Trajectory trackerTrajectory = *(trackerTrajectories.begin());
212 std::vector<TrajectoryStateOnSurface> TSOSes;
213 for (
auto const&
hit :
globalMuon->combinedMuon()->recHits()) {
217 bool extrapolated =
false;
226 if (extrapolated && extrapolation.
isValid()) {
228 TSOSes.push_back(extrapolation);
233 if (!muonHits.
empty()) {
238 for (
unsigned int i = 0;
i < muonHits.
size();
i++) {
244 trajectoryCollection->push_back(trajectory);
248 reference_map[trajCounter] = trackCounter;
254 unsigned int numTrajectories = trajectoryCollection->size();
260 auto trajTrackMap = std::make_unique<TrajTrackAssociationCollection>();
262 for (trajCounter = 0; trajCounter < numTrajectories; trajCounter++) {
265 trajTrackMap->insert(
edm::Ref<std::vector<Trajectory>>(ohTrajs, trajCounter),
const edm::EDGetTokenT< reco::TrackCollection > trackToken_
T getParameter(std::string const &) const
std::remove_cv< typename std::remove_reference< argument_type >::type >::type key_type
TrajectoryStateOnSurface const & forwardPredictedState() const
Access to forward predicted state (from fitter or builder)
std::vector< Track > TrackCollection
collection of Tracks
const edm::InputTag m_globalMuons
~TrackerToMuonPropagator() override
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > m_esTokenDT
std::vector< Muon > MuonCollection
collection of Muon objects
const edm::ESGetToken< Propagator, TrackingComponentsRecord > m_esTokenProp
const edm::ESGetToken< CSCGeometry, MuonGeometryRecord > m_esTokenCSC
TrackTransformer * m_trackTransformer
RecHitPointer build(const TrackingRecHit *p, edm::ESHandle< GlobalTrackingGeometry > trackingGeometry) const
Call the MuonTransientTrackingRecHit::specificBuild.
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > m_esTokenTk
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > m_esTokenGTGeo
const GeomDet * idToDet(DetId) const override
void produce(edm::Event &, const edm::EventSetup &) override
const edm::EDGetTokenT< reco::MuonCollection > muonToken_
#define DEFINE_FWK_MODULE(type)
TrackerToMuonPropagator(const edm::ParameterSet &)
bool getData(T &iHolder) const
const TrackerGeomDet * idToDet(DetId) const override
const Plane & surface() const
The nominal surface of the GeomDet.
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > m_esTokenMF
constexpr uint32_t rawId() const
get the raw id
TrackingRecHit::ConstRecHitPointer ConstRecHitPointer
const edm::InputTag m_globalMuonTracks
TrajectoryMeasurement const & firstMeasurement() const
const bool m_refitTracker
void push(const TrajectoryMeasurement &tm)
ConstRecHitPointer const & recHit() const
math::Error< dimension >::type CovarianceMatrix
5 parameter covariance matrix
const GeomDet * idToDet(DetId) const override