Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
24 m_appliedSystEnum(
NONE),
25 m_NNJvtTool_handle(
"", this),
26 m_jvtSelTool(
"", this),
27 m_jvtEffTool(
"", this),
67 ATH_MSG_ERROR(
"Invalid Jvt tagger selected: " <<
m_tagger <<
"! Choose between CP::JvtTagger::NNJvt, CP::JvtTagger::fJvt and CP::JvtTagger::Jvt (deprecated).");
68 return StatusCode::FAILURE;
73 ATH_MSG_WARNING(
"Only AntiKt4EMPFlowJets are supported, use other jet collections at your own risk.");
77 #ifndef XAOD_STANDALONE
85 if (
m_wp !=
"Default")
91 if (
m_wp !=
"Default")
98 ATH_MSG_WARNING(
"Supplied SF file " <<
m_file <<
" doesn't seem to contain SFs for NNJvt, falling back to dummy SFs ...");
109 ATH_MSG_INFO(
"Configuring JetJvtEfficiency tool for NNJvt algorithm.");
116 if (
m_wp ==
"Default") {
m_wp =
"FixedEffPt"; }
118 if (
m_wp ==
"FixedEffPt") {
119 m_NNJvtCutFile =
"NNJVT.Cuts.FixedEffPt.Offline.Nonprompt_All_MaxW.json";
121 else if (
m_wp ==
"TightFwd") {
122 m_NNJvtCutFile =
"NNJVT.Cuts.TightFwd.Offline.Nonprompt_All_MaxWeight.json";
125 ATH_MSG_ERROR(
"Unkown NNJvt WP " <<
m_wp <<
", choose between FixedEffPt (Default) and TightFwd.");
126 return StatusCode::FAILURE;
136 m_NNJvtParamFile =
"NNJVT.Network.graph.Offline.Nonprompt_All_MaxWeight.json";
141 ATH_MSG_INFO(
"NNJvtTool is empty! Initializing default tool ");
159 ATH_MSG_INFO(
"Configuring JetJvtEfficiency tool for fJvt algorithm.");
175 ATH_MSG_INFO(
"Configuring JetJvtEfficiency tool for Jvt algorithm.");
176 ATH_MSG_WARNING(
"Jvt is deprecated in R22 and no calibrations will be provided, please move to NNJvt.");
195 if (
m_file.find(
"DummySF") != std::string::npos) {
203 return StatusCode::FAILURE;
214 return StatusCode::SUCCESS;
228 (*m_sfDec)(
jet) =
sf;
235 (*m_sfDec)(
jet) =
sf;
247 if(!truthJets ||
tagTruth(
jets,truthJets).isFailure()) {
248 ATH_MSG_ERROR(
"Unable to match truthJets to jets in tagTruth() method");
251 for(
const auto *
const ipart : *
jets) {
257 float current_sf = 0;
275 (*m_sfDec)(*jet) = current_sf;
285 return StatusCode::SUCCESS;
292 return StatusCode::SUCCESS;
296 return StatusCode::SUCCESS;
324 if (
jet.pt()<
m_h_JvtHist->GetXaxis()->GetBinLowEdge(1))
return false;
328 if (
jet.pt() < 20
e3)
return false;
339 for(
const auto *
const jet : *
jets) {
342 for(
const auto *
const tjet : *truthJets) {
343 if (tjet->p4().DeltaR(
jet->p4())<0.3 && tjet->pt()>10
e3) ishs =
true;
344 if (tjet->p4().DeltaR(
jet->p4())<0.6) ispu =
false;
346 (*m_isHSDec)(*jet)=ishs;
349 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
bool m_doTruthRequirement
std::unique_ptr< SG::AuxElement::Decorator< float > > m_sfDec
SG::WriteDecorHandleKey< xAOD::JetContainer > m_passJvtKey
virtual CorrectionCode applyInefficiencyScaleFactor(const xAOD::Jet &jet) override
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::string m_passJvtDecName
StatusCode applySystematicVariation(const CP::SystematicSet &set) override
effects: configure this tool for the given list of systematic variations.
ToolHandle< IJvtEfficiencyTool > m_jvtEffTool
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
Class to wrap a set of SystematicVariations.
ToolHandle< JetPileupTag::JetVertexNNTagger > m_NNJvtTool_handle
Helper class to provide constant type-safe access to aux data.
virtual CorrectionCode getEfficiencyScaleFactor(const xAOD::Jet &jet, float &sf) override
ToolHandle< IAsgSelectionTool > m_jvtSelTool
Select isolated Photons, Electrons and Muons.
virtual bool isInRange(const xAOD::Jet &jet) const override
virtual CorrectionCode applyEfficiencyScaleFactor(const xAOD::Jet &jet) override
virtual StatusCode decorate(const xAOD::JetContainer &jets) const override
Decorate a jet collection without otherwise modifying it.
std::string m_NNJvtParamFile
std::string m_NNJvtCutFile
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
StatusCode tagTruth(const xAOD::IParticleContainer *jets, const xAOD::IParticleContainer *truthJets) override
@ OutOfValidityRange
Input object is out of validity range.
@ Error
Some error happened during the object correction.
Helper class to provide type-safe access to aux data.
std::string m_isHS_decoration_name
virtual CorrectionCode applyAllEfficiencyScaleFactor(const xAOD::IParticleContainer *jets, float &sf) override
virtual bool passesJvtCut(const xAOD::Jet &jet) const override
std::unique_ptr< SG::AuxElement::ConstAccessor< char > > m_passORAcc
virtual StatusCode recalculateScores(const xAOD::JetContainer &jets) const override
::StatusCode StatusCode
StatusCode definition for legacy code.
std::string m_jetContainerName
Handle class for adding a decoration to an object.
bool m_suppressOutputDependence
StatusCode sysApplySystematicVariation(const CP::SystematicSet &) override
effects: configure this tool for the given list of systematic variations.
std::unique_ptr< SG::AuxElement::ConstAccessor< char > > m_isHSAcc
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > m_jetEtaAcc
void setTypeAndName(const std::string &val_typeAndName)
set type and name at the same time
std::unique_ptr< SG::AuxElement::Decorator< char > > m_isHSDec
@ Ok
The correction was done successfully.
std::string m_truthJetContName
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
std::string m_jetJvtMomentName
#define ATH_MSG_WARNING(x)
StatusCode setProperty(const std::string &name, const T &value)
set the given property
Return value from object correction CP tools.
std::unique_ptr< TH2 > m_h_JvtHist
setBGCode setTAP setLVL2ErrorBits bool
std::string m_sf_decoration_name
Jet_v1 Jet
Definition of the current "jet version".
virtual CorrectionCode getInefficiencyScaleFactor(const xAOD::Jet &jet, float &sf) override