34 : m_hitExtractor(&iHitExtractor), m_resources(iResources), m_helper(iHelper) {}
54 std::vector<edm::OwnVector<TrackingRecHit>> TMRecHits;
62 muonHitRefs.push_back(std::make_pair(mur->
track()->recHitsBegin(), mur->
track()->recHitsEnd()));
64 muonHitRefs.push_back(std::make_pair(allTMRecHits.
data().end(), allTMRecHits.
data().end()));
72 muonHitRefs.push_back(std::make_pair(mur->
outerTrack()->recHitsBegin(), mur->
outerTrack()->recHitsEnd()));
74 muonHitRefs.push_back(std::make_pair(allTMRecHits.
data().end(), allTMRecHits.
data().end()));
82 muonHitRefs.push_back(std::make_pair(mur->
globalTrack()->recHitsBegin(), mur->
globalTrack()->recHitsEnd()));
84 muonHitRefs.push_back(std::make_pair(allTMRecHits.
data().end(), allTMRecHits.
data().end()));
90 std::vector<std::pair<size_t, size_t>> muonHitIndices;
93 std::pair<size_t, size_t>
indices(allTMRecHits.
size(), allTMRecHits.
size());
96 for (std::vector<const TrackingRecHit *>::const_iterator ith =
hits.begin(), edh =
hits.end(); ith != edh;
102 muonHitIndices.push_back(
indices);
105 typedef std::pair<size_t, size_t> index_pair;
107 for (
std::vector<std::pair<size_t, size_t>>::const_iterator idxs = muonHitIndices.begin(),
108 idxend = muonHitIndices.end();
111 muonHitRefs.push_back(std::make_pair(hitRefBegin + idxs->first, hitRefBegin + idxs->second));
118 <<
"There are " <<
muons.size() <<
" selected reco::Muons.";
125 <<
" #" << isel <<
", reco::Muon key = " << mur.
key() <<
", q*p = " << mur->
charge() * mur->
p()
126 <<
", pT = " << mur->
pt() <<
", eta = " << mur->
eta() <<
", phi = " << mur->
phi();
131 <<
"\t this is a Global Muon with valid muon hits";
132 muonHitRefs.push_back(std::make_pair(mur->
globalTrack()->recHitsBegin(), mur->
globalTrack()->recHitsEnd()));
137 edm::LogVerbatim(
"MuonToTrackingParticleAssociatorByHitsImpl") <<
"\t this is a Tracker Muon";
141 for (std::vector<const TrackingRecHit *>::const_iterator ith =
hits.begin(), edh =
hits.end(); ith != edh;
146 TMRecHits.push_back(TMvec);
148 muonHitRefs.push_back(std::make_pair(TMRecHits.rbegin()->data().begin(), TMRecHits.rbegin()->data().end()));
153 edm::LogVerbatim(
"MuonToTrackingParticleAssociatorByHitsImpl") <<
"\t this is a Standalone muon";
154 muonHitRefs.push_back(std::make_pair(mur->
outerTrack()->recHitsBegin(), mur->
outerTrack()->recHitsEnd()));
158 edm::LogVerbatim(
"MuonToTrackingParticleAssociatorByHitsImpl") <<
"\t what muon is this ?";
160 <<
"isMuon : " << mur->
isMuon() <<
", isPFMuon : " << mur->
isPFMuon()
164 muonHitRefs.push_back(std::make_pair(noTM.
data().end(), noTM.
data().end()));
175 for (
auto it = recSimColl.begin(), ed = recSimColl.end(); it != ed; ++it) {
177 std::vector<std::pair<TrackingParticleRef, double>> &tpAss = recToSim[rec];
178 for (
auto const &
a : it->second) {
179 tpAss.push_back(std::make_pair(tPC[
a.idx],
a.quality));
183 for (
auto it = simRecColl.begin(), ed = simRecColl.end(); it != ed; ++it) {
185 std::vector<std::pair<edm::RefToBase<reco::Muon>,
double>> &recAss = simToRec[
sim];
186 for (
auto const &
a : it->second) {
199 for (
unsigned int j = 0;
j < tPCH->size();
j++)
203 for (
size_t i = 0;
i < tCH->size(); ++
i)