Skip to content
Snippets Groups Projects
Commit 836569f0 authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

Merge branch 'cherry-pick-32978' into 'master'

Cherry pick !32978 to master

See merge request !33100
parents 1495ed8f ad137673
No related branches found
No related tags found
No related merge requests found
Showing
with 163 additions and 0 deletions
......@@ -42,13 +42,17 @@ atlas_add_library( FlavorTagDiscriminants
Root/DL2Tool.cxx
Root/customGetter.cxx
Root/FlipTagEnums.cxx
Root/VRJetOverlapDecorator.cxx
Root/VRJetOverlapDecoratorTool.cxx
Root/HbbTag.cxx
Root/HbbTagTool.cxx
Root/HbbTagConfig.cxx
Root/HbbGraphConfig.cxx
Root/VRJetOverlapDecorator.cxx
INCLUDE_DIRS ${LWTNN_INCLUDE_DIRS}
PUBLIC_HEADERS FlavorTagDiscriminants
LINK_LIBRARIES AsgTools xAODBase xAODJet xAODMuon xAODEventInfo PathResolver
JetInterface
${LWTNN_LIBRARIES})
if (NOT XAOD_STANDALONE)
......
......@@ -8,6 +8,7 @@
// This file includes all the header files that you need to create
// dictionaries for.
#include "FlavorTagDiscriminants/HbbTagTool.h"
#include "FlavorTagDiscriminants/DL2Tool.h"
#include "FlavorTagDiscriminants/BTagAugmenterTool.h"
#include "FlavorTagDiscriminants/BTagMuonAugmenterTool.h"
......
......@@ -23,6 +23,7 @@ namespace FlavorTagDiscriminants {
{
public:
HbbTag(const HbbTagConfig& config);
~HbbTag();
void decorate(const xAOD::Jet& jet) const;
private:
......
// for text editors: this file is -*- C++ -*-
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#ifndef HBB_TAG_TOOL_H
#define HBB_TAG_TOOL_H
#include "AsgTools/AsgTool.h"
#include "JetInterface/IJetDecorator.h"
namespace FlavorTagDiscriminants {
class HbbTag;
struct HbbTagProperties {
std::string nnFile;
};
class HbbTagTool : public asg::AsgTool, virtual public IJetDecorator
{
ASG_TOOL_CLASS(HbbTagTool, IJetDecorator )
public:
HbbTagTool(const std::string& name);
~HbbTagTool();
StatusCode initialize() override;
// returns 0 for success
StatusCode decorate(const xAOD::JetContainer& jets) const override;
private:
HbbTagProperties m_props;
std::unique_ptr<HbbTag> m_hbb;
};
}
#endif
// for text editors: this file is -*- C++ -*-
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#ifndef VR_JET_OVERLAP_DECORATOR_TOOL_H
#define VR_JET_OVERLAP_DECORATOR_TOOL_H
#include "AsgTools/AsgTool.h"
#include "JetInterface/IJetDecorator.h"
class VRJetOverlapDecorator;
namespace FlavorTagDiscriminants {
class VRJetOverlapDecoratorTool : public asg::AsgTool, virtual public IJetDecorator
{
ASG_TOOL_CLASS(VRJetOverlapDecoratorTool, IJetDecorator )
public:
VRJetOverlapDecoratorTool(const std::string& name);
~VRJetOverlapDecoratorTool();
StatusCode initialize() override;
// returns 0 for success
StatusCode decorate(const xAOD::JetContainer& jets) const override;
private:
std::unique_ptr<VRJetOverlapDecorator> m_dec;
};
}
#endif
......@@ -73,6 +73,30 @@ Some components of Hbb tagging also live here. These include:
flavor tagging inputs. It also uses `HbbGraphConfig` and
`HbbConstants`.
- `HbbTagTool`: ASG Tool interface around `HbbTag`.
- `VRJetOverlapDecorator`: Adds decorations which quantify the
degree of overlap between VR subjets. The validity of flavor
tagging calibrations depends on this overlap being small. Two
numbers in particular are added:
- `relativeDeltaRToVRJet`: smallest value of `dR / jet_radius`,
considering this jet paired with every other jet in the
event. Here `dR` is the angular separation between the two
jets, while `jet_radius` is the smallest the of the two jet
radii.
- `deltaRToVRJet`: corresponds to the `dR` to whatever jet has
the smallest _relative_ delta R. This isn't necessarily the
smallest delta R.
A smaller value in either of these corresponds to a larger
overlap. In general we recommend removing any jet where
`relativeDeltaRToVRJet < 1.0`.
- `VRJetOverlapDecoratorTool`: ASG interface around the class
above.
### Other Files ###
......
......@@ -87,6 +87,7 @@ namespace FlavorTagDiscriminants {
m_outputs.emplace_back(node_name, node_writer);
}
}
HbbTag::~HbbTag() {}
void HbbTag::decorate(const xAOD::Jet& jet) const {
namespace hk = hbb_key;
......
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#include "FlavorTagDiscriminants/HbbTagTool.h"
#include "FlavorTagDiscriminants/HbbTag.h"
namespace FlavorTagDiscriminants {
HbbTagTool::HbbTagTool(const std::string& name):
asg::AsgTool(name),
m_props(),
m_hbb(nullptr)
{
declareProperty("nnFile", m_props.nnFile);
}
HbbTagTool::~HbbTagTool() {}
StatusCode HbbTagTool::initialize() {
ATH_MSG_INFO("Initialize HbbTag from: " + m_props.nnFile);
m_hbb.reset(new HbbTag(HbbTagConfig(m_props.nnFile)));
return StatusCode::SUCCESS;
}
StatusCode HbbTagTool::decorate(const xAOD::JetContainer& jets) const {
for (const xAOD::Jet* jet: jets) {
m_hbb->decorate(*jet);
}
return StatusCode::SUCCESS;
}
}
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#include "FlavorTagDiscriminants/VRJetOverlapDecoratorTool.h"
#include "FlavorTagDiscriminants/VRJetOverlapDecorator.h"
namespace FlavorTagDiscriminants {
VRJetOverlapDecoratorTool::VRJetOverlapDecoratorTool(const std::string& name):
asg::AsgTool(name),
m_dec(nullptr)
{
}
VRJetOverlapDecoratorTool::~VRJetOverlapDecoratorTool() {}
StatusCode VRJetOverlapDecoratorTool::initialize() {
m_dec.reset(new VRJetOverlapDecorator);
return StatusCode::SUCCESS;
}
StatusCode VRJetOverlapDecoratorTool::decorate(const xAOD::JetContainer& jets) const {
m_dec->decorate(jets);
return StatusCode::SUCCESS;
}
}
......@@ -2,12 +2,16 @@
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#include "FlavorTagDiscriminants/VRJetOverlapDecoratorTool.h"
#include "FlavorTagDiscriminants/HbbTagTool.h"
#include "FlavorTagDiscriminants/DL2Tool.h"
#include "FlavorTagDiscriminants/BTagAugmenterTool.h"
#include "FlavorTagDiscriminants/BTagMuonAugmenterTool.h"
using namespace FlavorTagDiscriminants;
DECLARE_COMPONENT(VRJetOverlapDecoratorTool)
DECLARE_COMPONENT(HbbTagTool)
DECLARE_COMPONENT(DL2Tool)
DECLARE_COMPONENT(BTagAugmenterTool)
DECLARE_COMPONENT(BTagMuonAugmenterTool)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment