120 template <
typename T>
123 const std::vector<T> &
values,
130 using namespace reco;
137 deltaR_(
pset.getParameter<double>(
"deltaR")),
138 minL1Quality_(
pset.getParameter<int32_t>(
"MinL1Quality")),
140 min_N_L2(
pset.getParameter<
int>(
"MinN_L2")),
141 max_Eta_L2(
pset.getParameter<double>(
"MaxEta_L2")),
142 min_Nhits_L2(
pset.getParameter<
int>(
"MinNhits_L2")),
143 max_Dr_L2(
pset.getParameter<double>(
"MaxDr_L2")),
144 max_Dz_L2(
pset.getParameter<double>(
"MaxDz_L2")),
145 min_Pt_L2(
pset.getParameter<double>(
"MinPt_L2")),
146 nsigma_Pt_L2(
pset.getParameter<double>(
"NSigmaPt_L2")),
147 min_N_L3(
pset.getParameter<
int>(
"MinN_L3")),
148 max_Eta_L3(
pset.getParameter<double>(
"MaxEta_L3")),
149 min_Nhits_L3(
pset.getParameter<
int>(
"MinNhits_L3")),
150 max_Dr_L3(
pset.getParameter<double>(
"MaxDr_L3")),
151 max_Dz_L3(
pset.getParameter<double>(
"MaxDz_L3")),
152 min_Pt_L3(
pset.getParameter<double>(
"MinPt_L3")),
153 nsigma_Pt_L3(
pset.getParameter<double>(
"NSigmaPt_L3")),
161 metname =
"TriggerMatcherToHLTDebug";
163 produces<edm::ValueMap<int> >(
"propagatesToM2");
164 produces<edm::ValueMap<int> >(
"hasL1Particle");
165 produces<edm::ValueMap<int> >(
"hasL1Filtered");
166 produces<edm::ValueMap<int> >(
"hasL2Seed");
167 produces<edm::ValueMap<int> >(
"hasL2Muon");
168 produces<edm::ValueMap<int> >(
"hasL2MuonFiltered");
169 produces<edm::ValueMap<int> >(
"hasL3Seed");
170 produces<edm::ValueMap<int> >(
"hasL3Track");
171 produces<edm::ValueMap<int> >(
"hasL3Muon");
172 produces<edm::ValueMap<int> >(
"hasL3MuonFiltered");
174 produces<edm::ValueMap<reco::CandidatePtr> >(
"l1Candidate");
175 produces<edm::ValueMap<reco::CandidatePtr> >(
"l2Candidate");
176 produces<edm::ValueMap<reco::CandidatePtr> >(
"l3Candidate");
215 size_t nmu =
muons->size();
216 std::vector<int> propagatesToM2(nmu), hasL1Particle(nmu), hasL1Filtered(nmu);
217 std::vector<int> hasL2Seed(nmu), hasL2Muon(nmu), hasL2MuonFiltered(nmu);
218 std::vector<int> hasL3Seed(nmu), hasL3Track(nmu), hasL3TrackFiltered(nmu), hasL3Muon(nmu), hasL3MuonFiltered(nmu);
219 std::vector<reco::CandidatePtr> l1ptr(nmu), l2ptr(nmu), l3ptr(nmu);
221 for (
size_t i = 0;
i < nmu; ++
i) {
228 propagatesToM2[
i] = 1;
232 l1extra::L1MuonParticleCollection::const_iterator it;
233 L2MuonTrajectorySeedCollection::const_iterator iSeed;
234 L3MuonTrajectorySeedCollection::const_iterator iSeedL3;
235 RecoChargedCandidateCollection::const_iterator iL2Muon;
236 reco::TrackCollection::const_iterator tktrackL3;
237 RecoChargedCandidateCollection::const_iterator iL3Muon;
244 double L1phi = (*it).phi();
245 double L1eta = (*it).eta();
246 double L1pt = (*it).pt();
247 double dR =
deltaR(etaTk, phiTk, L1eta, L1phi);
253 if (!hasL1Particle[
i])
257 if ((
quality <= 3) || (L1pt < 7))
259 if (!hasL1Filtered[
i])
266 for (iSeed = L2Seeds->begin(); iSeed != L2Seeds->end(); ++iSeed) {
270 <<
"You're using a different L1 collection than the one used by L2 seeds.\n";
271 if (l1FromSeed.
key() != thisL1.
key())
280 for (iL2Muon =
L2Muons->begin(); iL2Muon !=
L2Muons->end(); ++iL2Muon) {
293 for (
size_t jjj = 0; jjj <
seeds.size(); jjj++) {
294 if (
seeds[jjj]->l1Particle() != l1FromSeed)
307 double Eta_L2 = L2Track.
eta();
308 double Pt_L2 = L2Track.
pt();
310 double BSPos_L2 = L2Track.
dxy(
beamSpot.position());
311 double dz_L2 = L2Track.
dz();
312 double err0_L2 = L2Track.
error(0);
313 double abspar0_L2 = fabs(L2Track.
parameter(0));
314 double ptLx_L2 = Pt_L2;
323 if (!hasL2MuonFiltered[
i]) {
327 hasL2MuonFiltered[
i]++;
334 for (iSeedL3 = L3Seeds->begin(); iSeedL3 != L3Seeds->end(); ++iSeedL3) {
335 TrackRef staTrack = iSeedL3->l2Track();
336 if (staTrack != L2FilteredRef)
346 for (tktrackL3 = L3TkTracks->begin(); tktrackL3 != L3TkTracks->end(); ++tktrackL3) {
349 TrackRef staTrack2 = l3seedRef->l2Track();
351 if (staTrack2 != L2FilteredRef)
353 if (!hasL3Track[
i]) {
361 for (iL3Muon =
L3Muons->begin(); iL3Muon !=
L3Muons->end(); ++iL3Muon) {
364 TrackRef staTrack3 = l3seedRef2->l2Track();
366 if (staTrack3 != L2FilteredRef)
378 double Eta_L3 = L3Track.
eta();
379 double Pt_L3 = L3Track.
pt();
381 double BSPos_L3 = L3Track.
dxy(
beamSpot.position());
382 double dz_L3 = L3Track.
dz();
383 double err0_L3 = L3Track.
error(0);
384 double abspar0_L3 = fabs(L3Track.
parameter(0));
385 double ptLx_L3 = Pt_L3;
392 if (!hasL3MuonFiltered[
i]) {
397 hasL3MuonFiltered[
i]++;
407 storeValueMap<int>(
event,
muons, propagatesToM2,
"propagatesToM2");
408 storeValueMap<int>(
event,
muons, hasL1Particle,
"hasL1Particle");
409 storeValueMap<int>(
event,
muons, hasL1Filtered,
"hasL1Filtered");
410 storeValueMap<int>(
event,
muons, hasL2Seed,
"hasL2Seed");
411 storeValueMap<int>(
event,
muons, hasL2Muon,
"hasL2Muon");
412 storeValueMap<int>(
event,
muons, hasL2MuonFiltered,
"hasL2MuonFiltered");
413 storeValueMap<int>(
event,
muons, hasL3Seed,
"hasL3Seed");
414 storeValueMap<int>(
event,
muons, hasL3Track,
"hasL3Track");
415 storeValueMap<int>(
event,
muons, hasL3Muon,
"hasL3Muon");
416 storeValueMap<int>(
event,
muons, hasL3MuonFiltered,
"hasL3MuonFiltered");
417 storeValueMap<reco::CandidatePtr>(
event,
muons, l1ptr,
"l1Candidate");
418 storeValueMap<reco::CandidatePtr>(
event,
muons, l2ptr,
"l2Candidate");
419 storeValueMap<reco::CandidatePtr>(
event,
muons, l3ptr,
"l3Candidate");
426 template <
typename T>
429 const std::vector<T> &
values,
433 unique_ptr<ValueMap<T> > valMap(
new ValueMap<T>());