 |
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),
66 ATH_MSG_ERROR(
"Invalid Jvt tagger selected: " <<
m_tagger <<
"! Choose between CP::JvtTagger::NNJvt, CP::JvtTagger::fJvt and CP::JvtTagger::Jvt (deprecated).");
67 return StatusCode::FAILURE;
72 ATH_MSG_WARNING(
"Only AntiKt4EMPFlowJets are supported, use other jet collections at your own risk.");
76 #ifndef XAOD_STANDALONE
84 if (
m_wp !=
"Default")
90 if (
m_wp !=
"Default")
97 ATH_MSG_WARNING(
"Supplied SF file " <<
m_file <<
" doesn't seem to contain SFs for NNJvt, falling back to dummy SFs ...");
108 ATH_MSG_INFO(
"Configuring JetJvtEfficiency tool for NNJvt algorithm.");
115 if (
m_wp ==
"Default") {
m_wp =
"FixedEffPt"; }
117 if (
m_wp ==
"FixedEffPt") {
118 m_NNJvtCutFile =
"NNJVT.Cuts.FixedEffPt.Offline.Nonprompt_All_MaxW.json";
120 else if (
m_wp ==
"TightFwd") {
121 m_NNJvtCutFile =
"NNJVT.Cuts.TightFwd.Offline.Nonprompt_All_MaxWeight.json";
124 ATH_MSG_ERROR(
"Unkown NNJvt WP " <<
m_wp <<
", choose between FixedEffPt (Default) and TightFwd.");
125 return StatusCode::FAILURE;
135 m_NNJvtParamFile =
"NNJVT.Network.graph.Offline.Nonprompt_All_MaxWeight.json";
140 ATH_MSG_INFO(
"NNJvtTool is empty! Initializing default tool ");
155 ATH_MSG_INFO(
"Configuring JetJvtEfficiency tool for fJvt algorithm.");
171 ATH_MSG_INFO(
"Configuring JetJvtEfficiency tool for Jvt algorithm.");
172 ATH_MSG_WARNING(
"Jvt is deprecated in R22 and no calibrations will be provided, please move to NNJvt.");
191 if (
m_file.find(
"DummySF") != std::string::npos) {
199 return StatusCode::FAILURE;
210 return StatusCode::SUCCESS;
224 (*m_sfDec)(
jet) =
sf;
231 (*m_sfDec)(
jet) =
sf;
243 if(!truthJets ||
tagTruth(
jets,truthJets).isFailure()) {
244 ATH_MSG_ERROR(
"Unable to match truthJets to jets in tagTruth() method");
247 for(
const auto *
const ipart : *
jets) {
253 float current_sf = 0;
271 (*m_sfDec)(*jet) = current_sf;
281 return StatusCode::SUCCESS;
288 return StatusCode::SUCCESS;
292 return StatusCode::SUCCESS;
320 if (
jet.pt()<
m_h_JvtHist->GetXaxis()->GetBinLowEdge(1))
return false;
324 if (
jet.pt() < 20
e3)
return false;
335 for(
const auto *
const jet : *
jets) {
338 for(
const auto *
const tjet : *truthJets) {
339 if (tjet->p4().DeltaR(
jet->p4())<0.3 && tjet->pt()>10
e3) ishs =
true;
340 if (tjet->p4().DeltaR(
jet->p4())<0.6) ispu =
false;
342 (*m_isHSDec)(*jet)=ishs;
345 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
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.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
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