From a08c4744f3cf936be8e35ba5ff50c7759ac18b05 Mon Sep 17 00:00:00 2001 From: aspiezia Date: Tue, 15 Oct 2019 16:08:10 +0200 Subject: [PATCH 1/2] switching deepTau version from v2 to v2p1 for CMSSW10_6_X --- .../RecoTau/interface/TauValidationMiniAOD.h | 2 +- .../RecoTau/src/TauValidationMiniAOD.cc | 68 +++++++++---------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/Validation/RecoTau/interface/TauValidationMiniAOD.h b/Validation/RecoTau/interface/TauValidationMiniAOD.h index 86972a14bd127..6da18c559771a 100644 --- a/Validation/RecoTau/interface/TauValidationMiniAOD.h +++ b/Validation/RecoTau/interface/TauValidationMiniAOD.h @@ -62,7 +62,7 @@ class TauValidationMiniAOD : public DQMEDAnalyzer { edm::EDGetTokenT > tauCollection_; edm::EDGetTokenT > refCollectionInputTagToken_; std::map ptMap, etaMap, phiMap, massMap, decayModeFindingMap, decayModeMap, - byDeepTau2017v2VSerawMap, byDeepTau2017v2VSjetrawMap, byDeepTau2017v2VSmurawMap, summaryMap; + byDeepTau2017v2p1VSerawMap, byDeepTau2017v2p1VSjetrawMap, byDeepTau2017v2p1VSmurawMap, summaryMap; edm::ParameterSet histoSettings_; std::string extensionName_; std::vector discriminators_; diff --git a/Validation/RecoTau/src/TauValidationMiniAOD.cc b/Validation/RecoTau/src/TauValidationMiniAOD.cc index 31f14addbaf11..d96d1fc29842e 100644 --- a/Validation/RecoTau/src/TauValidationMiniAOD.cc +++ b/Validation/RecoTau/src/TauValidationMiniAOD.cc @@ -35,7 +35,7 @@ void TauValidationMiniAOD::bookHistograms(DQMStore::IBooker& ibooker, edm::Run const& iRun, edm::EventSetup const& /* iSetup */) { MonitorElement *ptTemp, *etaTemp, *phiTemp, *massTemp, *decayModeFindingTemp, *decayModeTemp, - *byDeepTau2017v2VSerawTemp, *byDeepTau2017v2VSjetrawTemp, *byDeepTau2017v2VSmurawTemp, *summaryTemp; + *byDeepTau2017v2p1VSerawTemp, *byDeepTau2017v2p1VSjetrawTemp, *byDeepTau2017v2p1VSmurawTemp, *summaryTemp; ibooker.setCurrentFolder("RecoTauV/miniAODValidation" + extensionName_); //summary plots @@ -76,17 +76,17 @@ void TauValidationMiniAOD::bookHistograms(DQMStore::IBooker& ibooker, histoInfo decayModeHinfo = (histoSettings_.exists("decayMode")) ? histoInfo(histoSettings_.getParameter("decayMode")) : histoInfo(11, -0.5, 10.5); - histoInfo byDeepTau2017v2VSerawHinfo = - (histoSettings_.exists("byDeepTau2017v2VSeraw")) - ? histoInfo(histoSettings_.getParameter("byDeepTau2017v2VSeraw")) + histoInfo byDeepTau2017v2p1VSerawHinfo = + (histoSettings_.exists("byDeepTau2017v2p1VSeraw")) + ? histoInfo(histoSettings_.getParameter("byDeepTau2017v2p1VSeraw")) : histoInfo(200, 0., 1.); - histoInfo byDeepTau2017v2VSjetrawHinfo = - (histoSettings_.exists("byDeepTau2017v2VSjetraw")) - ? histoInfo(histoSettings_.getParameter("byDeepTau2017v2VSjetraw")) + histoInfo byDeepTau2017v2p1VSjetrawHinfo = + (histoSettings_.exists("byDeepTau2017v2p1VSjetraw")) + ? histoInfo(histoSettings_.getParameter("byDeepTau2017v2p1VSjetraw")) : histoInfo(200, 0., 1.); - histoInfo byDeepTau2017v2VSmurawHinfo = - (histoSettings_.exists("byDeepTau2017v2VSmuraw")) - ? histoInfo(histoSettings_.getParameter("byDeepTau2017v2VSmuraw")) + histoInfo byDeepTau2017v2p1VSmurawHinfo = + (histoSettings_.exists("byDeepTau2017v2p1VSmuraw")) + ? histoInfo(histoSettings_.getParameter("byDeepTau2017v2p1VSmuraw")) : histoInfo(200, 0., 1.); ptTemp = ibooker.book1D("tau_pt", "tau_pt", ptHinfo.nbins, ptHinfo.min, ptHinfo.max); etaTemp = ibooker.book1D("tau_eta", "tau_eta", etaHinfo.nbins, etaHinfo.min, etaHinfo.max); @@ -99,30 +99,30 @@ void TauValidationMiniAOD::bookHistograms(DQMStore::IBooker& ibooker, decayModeFindingHinfo.max); decayModeTemp = ibooker.book1D("tau_decayMode", "tau_decayMode", decayModeHinfo.nbins, decayModeHinfo.min, decayModeHinfo.max); - byDeepTau2017v2VSerawTemp = ibooker.book1D("tau_byDeepTau2017v2VSeraw", - "tau_byDeepTau2017v2VSeraw", - byDeepTau2017v2VSerawHinfo.nbins, - byDeepTau2017v2VSerawHinfo.min, - byDeepTau2017v2VSerawHinfo.max); - byDeepTau2017v2VSjetrawTemp = ibooker.book1D("tau_byDeepTau2017v2VSjetraw", - "tau_byDeepTau2017v2VSjetraw", - byDeepTau2017v2VSjetrawHinfo.nbins, - byDeepTau2017v2VSjetrawHinfo.min, - byDeepTau2017v2VSjetrawHinfo.max); - byDeepTau2017v2VSmurawTemp = ibooker.book1D("tau_byDeepTau2017v2VSmuraw", - "tau_byDeepTau2017v2VSmuraw", - byDeepTau2017v2VSmurawHinfo.nbins, - byDeepTau2017v2VSmurawHinfo.min, - byDeepTau2017v2VSmurawHinfo.max); + byDeepTau2017v2p1VSerawTemp = ibooker.book1D("tau_byDeepTau2017v2p1VSeraw", + "tau_byDeepTau2017v2p1VSeraw", + byDeepTau2017v2p1VSerawHinfo.nbins, + byDeepTau2017v2p1VSerawHinfo.min, + byDeepTau2017v2p1VSerawHinfo.max); + byDeepTau2017v2p1VSjetrawTemp = ibooker.book1D("tau_byDeepTau2017v2p1VSjetraw", + "tau_byDeepTau2017v2p1VSjetraw", + byDeepTau2017v2p1VSjetrawHinfo.nbins, + byDeepTau2017v2p1VSjetrawHinfo.min, + byDeepTau2017v2p1VSjetrawHinfo.max); + byDeepTau2017v2p1VSmurawTemp = ibooker.book1D("tau_byDeepTau2017v2p1VSmuraw", + "tau_byDeepTau2017v2p1VSmuraw", + byDeepTau2017v2p1VSmurawHinfo.nbins, + byDeepTau2017v2p1VSmurawHinfo.min, + byDeepTau2017v2p1VSmurawHinfo.max); ptMap.insert(std::make_pair("", ptTemp)); etaMap.insert(std::make_pair("", etaTemp)); phiMap.insert(std::make_pair("", phiTemp)); massMap.insert(std::make_pair("", massTemp)); decayModeFindingMap.insert(std::make_pair("", decayModeFindingTemp)); decayModeMap.insert(std::make_pair("", decayModeTemp)); - byDeepTau2017v2VSerawMap.insert(std::make_pair("", byDeepTau2017v2VSerawTemp)); - byDeepTau2017v2VSjetrawMap.insert(std::make_pair("", byDeepTau2017v2VSjetrawTemp)); - byDeepTau2017v2VSmurawMap.insert(std::make_pair("", byDeepTau2017v2VSmurawTemp)); + byDeepTau2017v2p1VSerawMap.insert(std::make_pair("", byDeepTau2017v2p1VSerawTemp)); + byDeepTau2017v2p1VSjetrawMap.insert(std::make_pair("", byDeepTau2017v2p1VSjetrawTemp)); + byDeepTau2017v2p1VSmurawMap.insert(std::make_pair("", byDeepTau2017v2p1VSmurawTemp)); } void TauValidationMiniAOD::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) { @@ -163,12 +163,12 @@ void TauValidationMiniAOD::analyze(const edm::Event& iEvent, const edm::EventSet decayModeMap.find("")->second->Fill(matchedTau->decayMode()); if (matchedTau->isTauIDAvailable("decayModeFinding")) decayModeFindingMap.find("")->second->Fill(matchedTau->tauID("decayModeFinding")); - if (matchedTau->isTauIDAvailable("byDeepTau2017v2VSeraw")) - byDeepTau2017v2VSerawMap.find("")->second->Fill(matchedTau->tauID("byDeepTau2017v2VSeraw")); - if (matchedTau->isTauIDAvailable("byDeepTau2017v2VSjetraw")) - byDeepTau2017v2VSjetrawMap.find("")->second->Fill(matchedTau->tauID("byDeepTau2017v2VSjetraw")); - if (matchedTau->isTauIDAvailable("byDeepTau2017v2VSmuraw")) - byDeepTau2017v2VSmurawMap.find("")->second->Fill(matchedTau->tauID("byDeepTau2017v2VSmuraw")); + if (matchedTau->isTauIDAvailable("byDeepTau2017v2p1VSeraw")) + byDeepTau2017v2p1VSerawMap.find("")->second->Fill(matchedTau->tauID("byDeepTau2017v2p1VSeraw")); + if (matchedTau->isTauIDAvailable("byDeepTau2017v2p1VSjetraw")) + byDeepTau2017v2p1VSjetrawMap.find("")->second->Fill(matchedTau->tauID("byDeepTau2017v2p1VSjetraw")); + if (matchedTau->isTauIDAvailable("byDeepTau2017v2p1VSmuraw")) + byDeepTau2017v2p1VSmurawMap.find("")->second->Fill(matchedTau->tauID("byDeepTau2017v2p1VSmuraw")); int j = 0; for (const auto& it : discriminators_) { string currentDiscriminator = it.getParameter("discriminator"); From cafc91fb5a18438d46a83cafa720c19a74caa8de Mon Sep 17 00:00:00 2001 From: aspiezia Date: Tue, 15 Oct 2019 16:48:36 +0200 Subject: [PATCH 2/2] fix code-format issue --- .../RecoTau/src/TauValidationMiniAOD.cc | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Validation/RecoTau/src/TauValidationMiniAOD.cc b/Validation/RecoTau/src/TauValidationMiniAOD.cc index d96d1fc29842e..88fbb1884a1b5 100644 --- a/Validation/RecoTau/src/TauValidationMiniAOD.cc +++ b/Validation/RecoTau/src/TauValidationMiniAOD.cc @@ -100,20 +100,20 @@ void TauValidationMiniAOD::bookHistograms(DQMStore::IBooker& ibooker, decayModeTemp = ibooker.book1D("tau_decayMode", "tau_decayMode", decayModeHinfo.nbins, decayModeHinfo.min, decayModeHinfo.max); byDeepTau2017v2p1VSerawTemp = ibooker.book1D("tau_byDeepTau2017v2p1VSeraw", - "tau_byDeepTau2017v2p1VSeraw", - byDeepTau2017v2p1VSerawHinfo.nbins, - byDeepTau2017v2p1VSerawHinfo.min, - byDeepTau2017v2p1VSerawHinfo.max); + "tau_byDeepTau2017v2p1VSeraw", + byDeepTau2017v2p1VSerawHinfo.nbins, + byDeepTau2017v2p1VSerawHinfo.min, + byDeepTau2017v2p1VSerawHinfo.max); byDeepTau2017v2p1VSjetrawTemp = ibooker.book1D("tau_byDeepTau2017v2p1VSjetraw", - "tau_byDeepTau2017v2p1VSjetraw", - byDeepTau2017v2p1VSjetrawHinfo.nbins, - byDeepTau2017v2p1VSjetrawHinfo.min, - byDeepTau2017v2p1VSjetrawHinfo.max); + "tau_byDeepTau2017v2p1VSjetraw", + byDeepTau2017v2p1VSjetrawHinfo.nbins, + byDeepTau2017v2p1VSjetrawHinfo.min, + byDeepTau2017v2p1VSjetrawHinfo.max); byDeepTau2017v2p1VSmurawTemp = ibooker.book1D("tau_byDeepTau2017v2p1VSmuraw", - "tau_byDeepTau2017v2p1VSmuraw", - byDeepTau2017v2p1VSmurawHinfo.nbins, - byDeepTau2017v2p1VSmurawHinfo.min, - byDeepTau2017v2p1VSmurawHinfo.max); + "tau_byDeepTau2017v2p1VSmuraw", + byDeepTau2017v2p1VSmurawHinfo.nbins, + byDeepTau2017v2p1VSmurawHinfo.min, + byDeepTau2017v2p1VSmurawHinfo.max); ptMap.insert(std::make_pair("", ptTemp)); etaMap.insert(std::make_pair("", etaTemp)); phiMap.insert(std::make_pair("", phiTemp));