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_
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)
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
const GeomDet * idToDet(DetId) const override
const edm::EDGetTokenT< reco::MuonCollection > muonToken_
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
const bool m_refitTracker
ConstRecHitPointer const & recHit() const
math::Error< dimension >::type CovarianceMatrix
5 parameter covariance matrix
const GeomDet * idToDet(DetId) const override