69 std::vector<edm::OwnVector<TrackingRecHit>> TMRecHits;
77 muonHitRefs.push_back(std::make_pair(mur->
track()->recHitsBegin(), mur->
track()->recHitsEnd()));
79 muonHitRefs.push_back(std::make_pair(allTMRecHits.
data().end(), allTMRecHits.
data().end()));
87 muonHitRefs.push_back(std::make_pair(mur->
outerTrack()->recHitsBegin(), mur->
outerTrack()->recHitsEnd()));
89 muonHitRefs.push_back(std::make_pair(allTMRecHits.
data().end(), allTMRecHits.
data().end()));
97 muonHitRefs.push_back(std::make_pair(mur->
globalTrack()->recHitsBegin(), mur->
globalTrack()->recHitsEnd()));
99 muonHitRefs.push_back(std::make_pair(allTMRecHits.
data().end(), allTMRecHits.
data().end()));
105 std::vector<std::pair<size_t, size_t>> muonHitIndices;
108 std::pair<size_t, size_t>
indices(allTMRecHits.
size(), allTMRecHits.
size());
111 for (std::vector<const TrackingRecHit *>::const_iterator ith = hits.begin(), edh = hits.end(); ith != edh;
117 muonHitIndices.push_back(
indices);
120 typedef std::pair<size_t, size_t> index_pair;
122 for (
std::vector<std::pair<size_t, size_t>>::const_iterator idxs = muonHitIndices.begin(),
123 idxend = muonHitIndices.end();
126 muonHitRefs.push_back(std::make_pair(hitRefBegin + idxs->first, hitRefBegin + idxs->second));
133 <<
"There are " << muons.
size() <<
" selected reco::Muons.";
140 <<
" #" << isel <<
", reco::Muon key = " << mur.
key() <<
", q*p = " << mur->
charge() * mur->
p()
141 <<
", pT = " << mur->
pt() <<
", eta = " << mur->
eta() <<
", phi = " << mur->
phi();
146 <<
"\t this is a Global Muon with valid muon hits";
147 muonHitRefs.push_back(std::make_pair(mur->
globalTrack()->recHitsBegin(), mur->
globalTrack()->recHitsEnd()));
152 edm::LogVerbatim(
"MuonToTrackingParticleAssociatorByHitsImpl") <<
"\t this is a Tracker Muon";
156 for (std::vector<const TrackingRecHit *>::const_iterator ith = hits.begin(), edh = hits.end(); ith != edh;
161 TMRecHits.push_back(TMvec);
163 muonHitRefs.push_back(std::make_pair(TMRecHits.rbegin()->data().begin(), TMRecHits.rbegin()->data().end()));
168 edm::LogVerbatim(
"MuonToTrackingParticleAssociatorByHitsImpl") <<
"\t this is a Standalone muon";
169 muonHitRefs.push_back(std::make_pair(mur->
outerTrack()->recHitsBegin(), mur->
outerTrack()->recHitsEnd()));
173 edm::LogVerbatim(
"MuonToTrackingParticleAssociatorByHitsImpl") <<
"\t what muon is this ?";
175 <<
"isMuon : " << mur->
isMuon() <<
", isPFMuon : " << mur->
isPFMuon()
179 muonHitRefs.push_back(std::make_pair(noTM.
data().end(), noTM.
data().end()));
190 for (
auto it = recSimColl.begin(), ed = recSimColl.end(); it != ed; ++it) {
192 std::vector<std::pair<TrackingParticleRef, double>> &tpAss = recToSim[rec];
193 for (
auto const &
a : it->second) {
194 tpAss.
push_back(std::make_pair(tPC[
a.idx],
a.quality));
198 for (
auto it = simRecColl.begin(), ed = simRecColl.end(); it != ed; ++it) {
200 std::vector<std::pair<edm::RefToBase<reco::Muon>,
double>> &recAss = simToRec[sim];
201 for (
auto const &
a : it->second) {
202 recAss.push_back(std::make_pair(muons[
a.idx],
a.quality));
Log< level::Info, true > LogVerbatim
bool isMuon() const override
bool isNonnull() const
Checks for non-null.
double pt() const final
transverse momentum
TrackerMuonHitExtractor const * m_hitExtractor
const_iterator end() const
TrackRef track() const override
reference to a Track
IndexAssociation associateSimToRecoIndices(const TrackHitsCollection &, const edm::RefVector< TrackingParticleCollection > &, Resources const &) const
bool isTrackerMuon() const override
std::vector< std::pair< trackingRecHit_iterator, trackingRecHit_iterator > > TrackHitsCollection
double p() const final
magnitude of momentum vector
virtual TrackRef outerTrack() const
reference to Track reconstructed in the muon detector only
const_iterator begin() const
IndexAssociation associateRecoToSimIndices(const TrackHitsCollection &, const edm::RefVector< TrackingParticleCollection > &, Resources const &) const
base const & data() const
void push_back(const RefToBase< T > &)
MuonAssociatorByHitsHelper const * m_helper
MuonAssociatorByHitsHelper::Resources m_resources
double phi() const final
momentum azimuthal angle
bool isGlobalMuon() const override
int charge() const final
electric charge
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector
bool isStandAloneMuon() const override
double eta() const final
momentum pseudorapidity