104 produces<std::vector<Trajectory> >();
105 produces<TrajTrackAssociationCollection>();
157 auto trajectoryCollection = std::make_unique<std::vector<Trajectory>>();
167 reco::TrackCollection::const_iterator globalMuonTrack = globalMuonTracks->begin();
168 for (; globalMuonTrack != globalMuonTracks->end(); ++globalMuonTrack) {
170 if (fabs(
globalMuon->combinedMuon()->phi() - globalMuonTrack->phi()) < 1
e-10 &&
171 fabs(
globalMuon->combinedMuon()->eta() - globalMuonTrack->eta()) < 1
e-10)
break;
173 if (globalMuonTrack == globalMuonTracks->end()) {
174 throw cms::Exception(
"BadConfig") <<
"The tracks label doesn't correspond to the same objects as the muons label" << std::endl;
181 if (trackerTrajectories.size() == 1) {
182 const Trajectory trackerTrajectory = *(trackerTrajectories.begin());
211 std::vector<TrajectoryStateOnSurface> TSOSes;
213 DetId id = (*hit)->geographicalId();
216 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++) {
T getParameter(std::string const &) const
RecHitPointer build(const TrackingRecHit *p, edm::ESHandle< GlobalTrackingGeometry > trackingGeometry) const
Call the MuonTransientTrackingRecHit::specificBuild.
std::remove_cv< typename std::remove_reference< argument_type >::type >::type key_type
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
ConstRecHitPointer const & recHit() const
const GeomDet * idToDet(DetId) const override
#define DEFINE_FWK_MODULE(type)
edm::InputTag m_globalMuons
~TrackerToMuonPropagator() override
const Plane & surface() const
The nominal surface of the GeomDet.
uint32_t rawId() const
get the raw id
TrackTransformer * m_trackTransformer
edm::InputTag m_globalMuonTracks
void produce(edm::Event &, const edm::EventSetup &) override
TrackerToMuonPropagator(const edm::ParameterSet &)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
TrajectoryStateOnSurface const & forwardPredictedState() const
Access to forward predicted state (from fitter or builder)
TrajectoryMeasurement const & firstMeasurement() const
TrackingRecHit::ConstRecHitPointer ConstRecHitPointer
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
const GeomDet * idToDet(DetId) const override
const TrackerGeomDet * idToDet(DetId) const override
void push(const TrajectoryMeasurement &tm)
TrackingRecHitCollection::base::const_iterator trackingRecHit_iterator
iterator over a vector of reference to TrackingRecHit in the same collection
math::Error< dimension >::type CovarianceMatrix
5 parameter covariance matrix