diff --git a/PhysicsAnalysis/TopPhys/xAOD/TopCPTools/Root/TopIsolationCPTools.cxx b/PhysicsAnalysis/TopPhys/xAOD/TopCPTools/Root/TopIsolationCPTools.cxx index b59189de88f79d7f61d2d9ef663369e0b55e2d7a..8b15eb30b40169503805c91abceb9a7058a28600 100644 --- a/PhysicsAnalysis/TopPhys/xAOD/TopCPTools/Root/TopIsolationCPTools.cxx +++ b/PhysicsAnalysis/TopPhys/xAOD/TopCPTools/Root/TopIsolationCPTools.cxx @@ -16,6 +16,7 @@ // Isolation include(s): #include "IsolationSelection/IsolationSelectionTool.h" +#include "IsolationSelection/IsolationLowPtPLVTool.h" #include "IsolationCorrections/IsolationCorrectionTool.h" namespace top { @@ -35,7 +36,7 @@ namespace top { return StatusCode::SUCCESS; } - if (!m_config->useElectrons() && m_config->useMuons()) { + if (!m_config->useElectrons() && !m_config->useMuons()) { ATH_MSG_INFO("top::IsolationCPTools: no need to initialise since neither using electrons nor muons"); return StatusCode::SUCCESS; } @@ -93,6 +94,8 @@ namespace top { "TightTrackOnly", "PflowTight", "PflowLoose", + "PLVTight", + "PLVLoose", }}; // Photon Isolation WPs @@ -111,7 +114,16 @@ namespace top { all_isolations.insert(photon_isolations.begin(), photon_isolations.end()); for (const std::string& isoWP : all_isolations) { - std::string tool_name = "CP::IsolationTool_" + isoWP; + std::string tool_name; + if (isoWP.find("PLV")!=std::string::npos){ + tool_name = "CP::IsolationTool_LowPtPLV"; + if(!asg::ToolStore::contains(tool_name)) { + CP::IIsolationLowPtPLVTool* iso_tool = new CP::IsolationLowPtPLVTool(tool_name); + top::check(iso_tool->initialize(), "Failed to initialize " + tool_name); + m_isolationToolsLowPtPLV.push_back(iso_tool); + } + } + tool_name = "CP::IsolationTool_" + isoWP; if (!asg::ToolStore::contains(tool_name)) { CP::IIsolationSelectionTool* iso_tool = new CP::IsolationSelectionTool(tool_name); top::check(asg::setProperty(iso_tool, "CalibFileName", m_isolationCalibFile), diff --git a/PhysicsAnalysis/TopPhys/xAOD/TopCPTools/TopCPTools/TopIsolationCPTools.h b/PhysicsAnalysis/TopPhys/xAOD/TopCPTools/TopCPTools/TopIsolationCPTools.h index c13a147c89ff4b8326fb7351be97952470c10cf0..128c2e2699727d9054821d2ca85fa0f9f2e05f5e 100644 --- a/PhysicsAnalysis/TopPhys/xAOD/TopCPTools/TopCPTools/TopIsolationCPTools.h +++ b/PhysicsAnalysis/TopPhys/xAOD/TopCPTools/TopCPTools/TopIsolationCPTools.h @@ -17,6 +17,7 @@ // Isolation include(s): #include "IsolationSelection/IIsolationSelectionTool.h" +#include "IsolationSelection/IIsolationLowPtPLVTool.h" #include "IsolationCorrections/IIsolationCorrectionTool.h" namespace top { @@ -35,6 +36,7 @@ namespace top { ToolHandle m_isolationCorr; ToolHandleArray m_isolationTools; + ToolHandleArray m_isolationToolsLowPtPLV; StatusCode setupIsolation(); }; diff --git a/PhysicsAnalysis/TopPhys/xAOD/TopConfiguration/Root/ConfigurationSettings.cxx b/PhysicsAnalysis/TopPhys/xAOD/TopConfiguration/Root/ConfigurationSettings.cxx index 83eda1e33c55623b9b298ffa958eb878fb0b7ac9..498743fc8638e26eeabf56541d25bf4f153c0a9d 100644 --- a/PhysicsAnalysis/TopPhys/xAOD/TopConfiguration/Root/ConfigurationSettings.cxx +++ b/PhysicsAnalysis/TopPhys/xAOD/TopConfiguration/Root/ConfigurationSettings.cxx @@ -67,10 +67,10 @@ namespace top { "Electron Efficiency Systematic model E_T binning (option for SIMPLIFIED model, do not specify to use default; format XXX:YYY:ZZZ. e.g. 4000:7000:10000:15000:13000000)", "default"); registerParameter("ElectronIsolation", - "Isolation to use : Gradient, FCLoose, FCTight, FCHighPtCaloOnly, (EXPERIMENTAL: HighPtCaloOnly, Loose, Tight, TightTrackOnly), (DANGEROUS: PflowTight, PflowLoose), None", + "Isolation to use : Gradient, FCLoose, FCTight, FCHighPtCaloOnly, (EXPERIMENTAL: HighPtCaloOnly, Loose, Tight, TightTrackOnly, PLVTight, PLVLoose), (DANGEROUS: PflowTight, PflowLoose), None", "Gradient"); registerParameter("ElectronIsolationLoose", - "Isolation to use : Gradient, FCLoose, FCTight, FCHighPtCaloOnly, (EXPERIMENTAL: HighPtCaloOnly, Loose, Tight, TightTrackOnly), (DANGEROUS: PflowTight, PflowLoose), None", + "Isolation to use : Gradient, FCLoose, FCTight, FCHighPtCaloOnly, (EXPERIMENTAL: HighPtCaloOnly, Loose, Tight, TightTrackOnly, PLVTight, PLVLoose), (DANGEROUS: PflowTight, PflowLoose), None", "None"); registerParameter("ElectronIsolationSF", "Force electron isolation SF (e.g. None). EXPERIMENTAL!", " "); registerParameter("ElectronIsolationSFLoose", "Force electron isolation SF (e.g. None). EXPERIMENTAL!", " "); diff --git a/PhysicsAnalysis/TopPhys/xAOD/TopSystematicObjectMaker/Root/EgammaObjectCollectionMaker.cxx b/PhysicsAnalysis/TopPhys/xAOD/TopSystematicObjectMaker/Root/EgammaObjectCollectionMaker.cxx index e0618fc0f336a93514f72b4550b44a832aa56aaf..ebd4cc251f3fadfa5acf58b430c20b3da31b49f4 100644 --- a/PhysicsAnalysis/TopPhys/xAOD/TopSystematicObjectMaker/Root/EgammaObjectCollectionMaker.cxx +++ b/PhysicsAnalysis/TopPhys/xAOD/TopSystematicObjectMaker/Root/EgammaObjectCollectionMaker.cxx @@ -53,6 +53,9 @@ namespace top { m_isolationTool_HighPtCaloOnly("CP::IsolationTool_HighPtCaloOnly"), m_isolationTool_FCTight("CP::IsolationTool_FCTight"), m_isolationTool_FCLoose("CP::IsolationTool_FCLoose"), + m_isolationTool_PLVTight("CP::IsolationTool_PLVTight"), + m_isolationTool_PLVLoose("CP::IsolationTool_PLVLoose"), + m_isolationTool_LowPtPLV("CP::IsolationTool_LowPtPLV"), m_isolationCorr("CP::IsolationCorrectionTool") { declareProperty("config", m_config); @@ -76,6 +79,9 @@ namespace top { declareProperty("IsolationTool_HighPtCaloOnly", m_isolationTool_HighPtCaloOnly); declareProperty("IsolationTool_FCTight", m_isolationTool_FCTight); declareProperty("IsolationTool_FCLoose", m_isolationTool_FCLoose); + declareProperty("IsolationTool_PLVTight", m_isolationTool_PLVTight); + declareProperty("IsolationTool_PLVLoose", m_isolationTool_PLVLoose); + declareProperty("IsolationTool_LowPtPLV", m_isolationTool_LowPtPLV); declareProperty("IsolationCorrectionTool", m_isolationCorr); } @@ -117,6 +123,9 @@ namespace top { top::check(m_isolationTool_TightTrackOnly.retrieve(), "Failed to retrieve Isolation Tool"); top::check(m_isolationTool_PflowLoose.retrieve(), "Failed to retrieve Isolation Tool"); top::check(m_isolationTool_PflowTight.retrieve(), "Failed to retrieve Isolation Tool"); + top::check(m_isolationTool_PLVTight.retrieve(), "Failed to retrieve Isolation Tool"); + top::check(m_isolationTool_PLVLoose.retrieve(), "Failed to retrieve Isolation Tool"); + top::check(m_isolationTool_LowPtPLV.retrieve(), "Failed to retrieve Isolation Tool"); } top::check(m_isolationCorr.retrieve(), "Failed to retrieve Isolation Correction Tool"); @@ -287,6 +296,8 @@ namespace top { static SG::AuxElement::Accessor AnalysisTop_Isol_TightTrackOnly("AnalysisTop_Isol_TightTrackOnly"); static SG::AuxElement::Accessor AnalysisTop_Isol_PflowTight("AnalysisTop_Isol_PflowTight"); static SG::AuxElement::Accessor AnalysisTop_Isol_PflowLoose("AnalysisTop_Isol_PflowLoose"); + static SG::AuxElement::Accessor AnalysisTop_Isol_PLVTight("AnalysisTop_Isol_PLVTight"); + static SG::AuxElement::Accessor AnalysisTop_Isol_PLVLoose("AnalysisTop_Isol_PLVLoose"); const xAOD::EventInfo* eventInfo(nullptr); @@ -381,6 +392,12 @@ namespace top { if (electron->isAvailable("PromptLeptonVeto")) // r21 electron->auxdecor("AnalysisTop_Isol_PromptLeptonVeto") = (electron->auxdata("PromptLeptonVeto") < -0.5) ? 1 : 0; + + // New PLV: https://twiki.cern.ch/twiki/bin/view/AtlasProtected/PromptLeptonTaggerIFF + // For PLV isolation, we need to compute additional variables in the low-pT regime (<12 GeV) + top::check(m_isolationTool_LowPtPLV->augmentPLV(*electron), "Failed to augment electron with LowPtPLV decorations"); + AnalysisTop_Isol_PLVTight(*electron) = (m_isolationTool_PLVTight->accept(*electron) ? 1 : 0); + AnalysisTop_Isol_PLVLoose(*electron) = (m_isolationTool_PLVLoose->accept(*electron) ? 1 : 0); } ///-- set links to original objects- needed for MET calculation --/// diff --git a/PhysicsAnalysis/TopPhys/xAOD/TopSystematicObjectMaker/TopSystematicObjectMaker/EgammaObjectCollectionMaker.h b/PhysicsAnalysis/TopPhys/xAOD/TopSystematicObjectMaker/TopSystematicObjectMaker/EgammaObjectCollectionMaker.h index 5557c238649a492fb873f550b466db1c54db8900..84a0fb24a6e0f99b029e4fc041949dccfc17f24a 100644 --- a/PhysicsAnalysis/TopPhys/xAOD/TopSystematicObjectMaker/TopSystematicObjectMaker/EgammaObjectCollectionMaker.h +++ b/PhysicsAnalysis/TopPhys/xAOD/TopSystematicObjectMaker/TopSystematicObjectMaker/EgammaObjectCollectionMaker.h @@ -33,6 +33,7 @@ #include "EgammaAnalysisInterfaces/IEgammaCalibrationAndSmearingTool.h" #include "EgammaAnalysisInterfaces/IElectronPhotonShowerShapeFudgeTool.h" #include "IsolationSelection/IIsolationSelectionTool.h" +#include "IsolationSelection/IIsolationLowPtPLVTool.h" #include "IsolationCorrections/IIsolationCorrectionTool.h" // Forward declaration(s): @@ -116,6 +117,10 @@ namespace top { ToolHandle m_isolationTool_HighPtCaloOnly; ToolHandle m_isolationTool_FCTight; ToolHandle m_isolationTool_FCLoose; + ToolHandle m_isolationTool_PLVTight; + ToolHandle m_isolationTool_PLVLoose; + + ToolHandle m_isolationTool_LowPtPLV; ToolHandle m_isolationCorr;