Skip to content

Commit

Permalink
Merge pull request #14147 from sarafiorendi/muonValidationStage2L1
Browse files Browse the repository at this point in the history
update muon validation plots to Stage2L1 + update HLT DQM plots (backport of #14146)
  • Loading branch information
cmsbuild committed May 11, 2016
2 parents 031916f + e6c5a60 commit a04f10e
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 22 deletions.
4 changes: 2 additions & 2 deletions DQMOffline/Trigger/python/HLTMuonOfflineAnalyzer_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
"HLT_IsoTkMu20_v",
"HLT_IsoMu22_v",
"HLT_IsoTkMu22_v",
"HLT_IsoMu22_eta2p1_v",
"HLT_IsoTkMu22_eta2p1_v",
"HLT_IsoMu18_v",
"HLT_IsoTkMu18_v",
"HLT_OldIsoMu18_v",
"HLT_OldIsoTkMu18_v",
"HLT_L1SingleMu16_v",
"HLT_L2Mu10_v",
"HLT_HIL1DoubleMu0", #for HI
Expand Down
8 changes: 4 additions & 4 deletions HLTriggerOffline/Muon/interface/HLTMuonPlotter.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
#include "DataFormats/Candidate/interface/Particle.h"
#include "DataFormats/Candidate/interface/Candidate.h"
#include "DataFormats/HepMCCandidate/interface/GenParticle.h"
#include "DataFormats/L1Trigger/interface/L1MuonParticle.h"
#include "DataFormats/L1Trigger/interface/L1MuonParticleFwd.h"
#include "DataFormats/L1Trigger/interface/Muon.h"

#include "DataFormats/RecoCandidate/interface/RecoChargedCandidate.h"
#include "DataFormats/RecoCandidate/interface/RecoChargedCandidateFwd.h"
#include "DataFormats/HLTReco/interface/TriggerEventWithRefs.h"
Expand Down Expand Up @@ -84,7 +84,7 @@ class HLTMuonPlotter {

struct MatchStruct {
const reco::Candidate * candBase;
const l1extra::L1MuonParticle * candL1;
const l1t::Muon * candL1;
std::vector<const reco::RecoChargedCandidate *> candHlt;
MatchStruct() {
candBase = 0;
Expand Down Expand Up @@ -113,7 +113,7 @@ class HLTMuonPlotter {
edm::Handle<trigger::TriggerEventWithRefs>);
void findMatches(
std::vector<MatchStruct> &,
const std::vector<l1extra::L1MuonParticleRef>&,
const l1t::MuonVectorRef& candsL1,
const std::vector< std::vector< const reco::RecoChargedCandidate *> >&
);
void bookHist(DQMStore::IBooker &, std::string,
Expand Down
2 changes: 1 addition & 1 deletion HLTriggerOffline/Muon/python/hltMuonValidator_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

hltProcessName = cms.string("HLT"),
hltPathsToCheck = cms.vstring(
"HLT_(L[12])?(OldIso)?(Iso)?(Tk)?Mu[0-9]*(Open)?(_NoVertex)?(_eta2p1)?(_v[0-9]*)?$",
"HLT_(L[12])?(Iso)?(Tk)?Mu[0-9]*(Open)?(_NoVertex)?(_eta2p1)?(_v[0-9]*)?$",
"HLT_Mu17_NoFilters?(_v[0-9]*)?$",
"HLT_Dimuon0_Jpsi_v10",
"HLT_Dimuon13_Jpsi_Barrel_v5",
Expand Down
27 changes: 14 additions & 13 deletions HLTriggerOffline/Muon/src/HLTMuonPlotter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ using namespace std;
using namespace edm;
using namespace reco;
using namespace trigger;
using namespace l1extra;



Expand Down Expand Up @@ -189,7 +188,7 @@ HLTMuonPlotter::analyze(const Event & iEvent, const EventSetup & iSetup)
const size_t nSteps = stepLabels_.size();
const size_t nStepsHlt = nSteps - 2;
const int nObjectsToPassPath = (isDoubleMuonPath) ? 2 : 1;
vector< L1MuonParticleRef > candsL1;
l1t::MuonVectorRef candsL1;
vector< vector< RecoChargedCandidateRef > > refsHlt(nStepsHlt);
vector< vector< const RecoChargedCandidate * > > candsHlt(nStepsHlt);

Expand Down Expand Up @@ -312,7 +311,7 @@ boost::tuple<
void
HLTMuonPlotter::findMatches(
vector<MatchStruct> & matches,
const std::vector<L1MuonParticleRef>& candsL1,
const l1t::MuonVectorRef& candsL1,
const std::vector< vector< const RecoChargedCandidate *> >& candsHlt)
{

Expand All @@ -321,7 +320,7 @@ HLTMuonPlotter::findMatches(
set<size_t> indicesL1;
for (size_t i = 0; i < candsL1.size(); i++)
indicesL1.insert(i);

vector< set<size_t> > indicesHlt(candsHlt.size());
for (size_t i = 0; i < candsHlt.size(); i++)
for (size_t j = 0; j < candsHlt[i].size(); j++)
Expand All @@ -334,27 +333,29 @@ HLTMuonPlotter::findMatches(
double bestDeltaR = cutsDr_[0];
size_t bestMatch = kNull;
for (it = indicesL1.begin(); it != indicesL1.end(); it++) {
if (candsL1[*it].isAvailable()) {
if (candsL1[*it].isAvailable()) {
double dR = deltaR(cand->eta(), cand->phi(),
candsL1[*it]->eta(), candsL1[*it]->phi());
if (dR < bestDeltaR) {
bestMatch = *it;
bestDeltaR = dR;
}
// TrajectoryStateOnSurface propagated;
// float dR = 999., dPhi = 999.;
// bool isValid = l1Matcher_.match(* cand, * candsL1[*it],
// dR, dPhi, propagated);
// if (isValid && dR < bestDeltaR) {
// bestMatch = *it;
// bestDeltaR = dR;
// }
// TrajectoryStateOnSurface propagated;
// float dR = 999., dPhi = 999.;
// bool isValid = l1Matcher_.match(* cand, * candsL1[*it],
// dR, dPhi, propagated);
// if (isValid && dR < bestDeltaR) {
// bestMatch = *it;
// bestDeltaR = dR;
// }
} else {
LogWarning("HLTMuonPlotter")
<< "Ref candsL1[*it]: product not available "
<< *it;
}
}


if (bestMatch != kNull)
matches[i].candL1 = & * candsL1[bestMatch];
indicesL1.erase(bestMatch);
Expand Down
4 changes: 2 additions & 2 deletions HLTriggerOffline/Muon/src/HLTMuonValidator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,13 @@ HLTMuonValidator::stepLabels(const vector<string>& modules) {
else
steps.push_back("L2Iso");
}
else if ((modules[i].find("pfecalIsoRhoFiltered") != string::npos)||(modules[i].find("pfecalOldIsoRhoFiltered") != string::npos)) {
else if ((modules[i].find("pfecalIsoRhoFiltered") != string::npos)) {
if (modules[i].find("L3") != string::npos)
steps.push_back("L3EcalIso");
else if (modules[i].find("TkFiltered") != string::npos)
steps.push_back("TkEcalIso");
}
else if ((modules[i].find("pfhcalIsoRhoFiltered") != string::npos)||(modules[i].find("pfhcalOldIsoRhoFiltered") != string::npos)) {
else if ((modules[i].find("pfhcalIsoRhoFiltered") != string::npos)) {
if (modules[i].find("L3") != string::npos)
steps.push_back("L3HcalIso");
else if (modules[i].find("TkFiltered") != string::npos)
Expand Down

0 comments on commit a04f10e

Please sign in to comment.