Skip to content

Commit

Permalink
fixing PNET DQM module
Browse files Browse the repository at this point in the history
  • Loading branch information
rgerosa committed Sep 6, 2022
1 parent 2edfc21 commit 32d1757
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
9 changes: 8 additions & 1 deletion DQMOffline/Trigger/plugins/ParticleNetJetTagMonitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,7 @@ void ParticleNetJetTagMonitor::analyze(edm::Event const& iEvent, edm::EventSetup
std::fabs(e.gsfTrack()->dz(pv->position())) <= maxLeptonDzCut_)
vetoElectrons.push_back(e);
}

if (ntagelectrons_ >= 0 and int(tagElectrons.size()) != ntagelectrons_)
return;
selectionFlowStatus++;
Expand Down Expand Up @@ -858,15 +859,21 @@ void ParticleNetJetTagMonitor::analyze(edm::Event const& iEvent, edm::EventSetup
// match reco and hlt objects considering only the first ntrigobjecttomatch jets for both reco and HLT. Each of them must be matched
std::vector<int> matched_obj;
for (size_t jreco = 0; jreco < ntrigobjecttomatch_; jreco++) {
if (jreco >= jetPNETScoreSortedIndices.size())
break;
float minDR = 1000;
int match_index = -1;
for (size_t jhlt = 0; jhlt < ntrigobjecttomatch_; jhlt++) {
if (jhlt >= jetPNETScoreSortedIndicesHLT.size())
break;
if (std::find(matched_obj.begin(), matched_obj.end(), jhlt) != matched_obj.end())
continue;
float dR = reco::deltaR(selectedJets[jetPNETScoreSortedIndices.at(jreco)].p4(),
jetHLTRefs.at(jetPNETScoreSortedIndicesHLT.at(jhlt))->p4());
if (dR < hltRecoDeltaRmax_ and dR < minDR)
if (dR < hltRecoDeltaRmax_ and dR < minDR) {
match_index = jhlt;
minDR = dR;
}
}
if (match_index >= 0)
matched_obj.push_back(match_index);
Expand Down
8 changes: 4 additions & 4 deletions DQMOffline/Trigger/python/ParticleNetAK4BTagMonitoring_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,16 @@
jet2EtaBinning = [-2.5,-2.25,-2.0,-1.75,-1.5,-1.25,-1.0,-0.75,-0.5,-0.25,0.,0.25,0.5,0.75,1.0,1.25,1.5,1.75,2.0,2.25,2.5],
jet1PNETscoreBinning = [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.75,0.8,0.85,0.9,0.925,0.95,0.975,1],
jet2PNETscoreBinning = [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.75,0.8,0.85,0.9,0.925,0.95,0.975,1],
jet1PNETscoreTransBinning = [0,0.1,0.2,0.3,0.4,0.6,0.8,1.0,1.25,1.50,1.75,2.25,2.75,4],
jet2PNETscoreTransBinning = [0,0.1,0.2,0.3,0.4,0.6,0.8,1.0,1.25,1.50,1.75,2.25,2.75,4],
jet1PNETscoreTransBinning = [0,0.1,0.2,0.3,0.4,0.6,0.8,1.0,1.25,1.50,1.75,2.25,2.75,3.5,6],
jet2PNETscoreTransBinning = [0,0.1,0.2,0.3,0.4,0.6,0.8,1.0,1.25,1.50,1.75,2.25,2.75,3.5,6],
jet1PtBinning2d = [20,30,40,50,75,100,150,250,500],
jet2PtBinning2d = [20,30,40,50,75,100,125,150,250],
jet1EtaBinning2d = [-2.5,-2.0,-1.5,-1.0,-0.5,0.,0.5,1.0,1.5,2.0,2.5],
jet2EtaBinning2d = [-2.5,-2.0,-1.5,-1.0,-0.5,0.,0.5,1.0,1.5,2.0,2.5],
jet1PNETscoreBinning2d = [0,0.15,0.30,0.45,0.60,0.75,0.85,0.90,0.95,0.975,1],
jet2PNETscoreBinning2d = [0,0.15,0.30,0.45,0.60,0.75,0.85,0.90,0.95,0.975,1],
jet1PNETscoreTransBinning2d = [0,0.15,0.30,0.45,0.60,0.75,1,1.5,2,2.5,4],
jet2PNETscoreTransBinning2d = [0,0.15,0.30,0.45,0.60,0.75,1,1.5,2,2.5,4],
jet1PNETscoreTransBinning2d = [0,0.15,0.30,0.45,0.60,0.75,1,1.5,2,2.5,3.25,6],
jet2PNETscoreTransBinning2d = [0,0.15,0.30,0.45,0.60,0.75,1,1.5,2,2.5,3.25,6],
## trigger for numerator and denominator
numGenericTriggerEvent = dict(
hltPaths = ["HLT_Mu8_TrkIsoVVL_Ele23_CaloIdL_TrackIdL_IsoVL_DZ_PFDiJet30_PFBTagParticleNet_2BTagSum0p65_v*"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@
jet2EtaBinning = [],
jet1PNETscoreBinning = [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.75,0.8,0.85,0.9,0.925,0.95,0.975,1],
jet2PNETscoreBinning = [],
jet1PNETscoreTransBinning = [0,0.1,0.2,0.3,0.4,0.6,0.8,1.0,1.25,1.50,1.75,2.25,2.75,4],
jet1PNETscoreTransBinning = [0,0.1,0.2,0.3,0.4,0.6,0.8,1.0,1.25,1.50,1.75,2.25,2.75,3.5,6],
jet2PNETscoreTransBinning = [],
jet1PtBinning2d = [180,220,260,300,340,400,500,750,1250],
jet2PtBinning2d = [],
jet1EtaBinning2d = [-2.5,-2.0,-1.5,-1.0,-0.5,0.,0.5,1.0,1.5,2.0,2.5],
jet2EtaBinning2d = [],
jet1PNETscoreBinning2d = [0,0.15,0.30,0.45,0.60,0.75,0.85,0.90,0.95,0.975,1],
jet2PNETscoreBinning2d = [],
jet1PNETscoreTransBinning2d = [0,0.15,0.30,0.45,0.60,0.75,1,1.5,2,2.5,4],
jet1PNETscoreTransBinning2d = [0,0.15,0.30,0.45,0.60,0.75,1,1.5,2,2.5,3.25,6],
jet2PNETscoreTransBinning2d = [],
## trigger for numerator and denominator
numGenericTriggerEvent = dict(
Expand Down

0 comments on commit 32d1757

Please sign in to comment.