114 produces<std::vector<Trajectory>>();
115 produces<TrajTrackAssociationCollection>();
150 auto trajectoryCollection = std::make_unique<std::vector<Trajectory>>();
160 reco::TrackCollection::const_iterator globalMuonTrack = globalMuonTracks->begin();
161 for (; globalMuonTrack != globalMuonTracks->end(); ++globalMuonTrack) {
163 if (fabs(
globalMuon->combinedMuon()->phi() - globalMuonTrack->phi()) < 1
e-10 &&
164 fabs(
globalMuon->combinedMuon()->eta() - globalMuonTrack->eta()) < 1
e-10)
167 if (globalMuonTrack == globalMuonTracks->end()) {
168 throw cms::Exception(
"BadConfig") <<
"The tracks label doesn't correspond to the same objects as the muons label" 176 if (trackerTrajectories.size() == 1) {
177 const Trajectory trackerTrajectory = *(trackerTrajectories.begin());
210 std::vector<TrajectoryStateOnSurface> TSOSes;
211 for (
auto const&
hit :
globalMuon->combinedMuon()->recHits()) {
215 bool extrapolated =
false;
224 if (extrapolated && extrapolation.
isValid()) {
226 TSOSes.push_back(extrapolation);
231 if (!muonHits.
empty()) {
236 for (
unsigned int i = 0;
i < muonHits.
size();
i++) {
242 trajectoryCollection->push_back(trajectory);
246 reference_map[trajCounter] = trackCounter;
252 unsigned int numTrajectories = trajectoryCollection->size();
258 auto trajTrackMap = std::make_unique<TrajTrackAssociationCollection>();
260 for (trajCounter = 0; trajCounter < numTrajectories; trajCounter++) {
263 trajTrackMap->insert(
edm::Ref<std::vector<Trajectory>>(ohTrajs, trajCounter),
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)
edm::InputTag m_globalMuons
~TrackerToMuonPropagator() override
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > m_esTokenDT
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
edm::InputTag m_globalMuonTracks
const GeomDet * idToDet(DetId) const override
void produce(edm::Event &, const edm::EventSetup &) override
#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
TrajectoryMeasurement const & firstMeasurement() const
void push(const TrajectoryMeasurement &tm)
ConstRecHitPointer const & recHit() const
math::Error< dimension >::type CovarianceMatrix
5 parameter covariance matrix
const GeomDet * idToDet(DetId) const override