ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
FlavorTagDiscriminants::DL2HighLevel Class Reference

#include <DL2HighLevel.h>

Collaboration diagram for FlavorTagDiscriminants::DL2HighLevel:

Public Member Functions

 DL2HighLevel (const std::string &nn_file_name, FlipTagConfig=FlipTagConfig::STANDARD, std::map< std::string, std::string > remap_scalar={}, TrackLinkType=TrackLinkType::TRACK_PARTICLE, float default_output_value=NAN)
 
 DL2HighLevel (DL2HighLevel &&)
 
 DL2HighLevel (const DL2HighLevel &)
 
 ~DL2HighLevel ()
 
void decorate (const xAOD::BTagging &btag) const
 
void decorate (const xAOD::Jet &jet) const
 
void decorateWithDefaults (const SG::AuxElement &jet) const
 
FTagDataDependencyNames getDataDependencyNames () const
 

Private Attributes

std::shared_ptr< const DL2m_dl2
 

Detailed Description

Definition at line 26 of file DL2HighLevel.h.

Constructor & Destructor Documentation

◆ DL2HighLevel() [1/3]

FlavorTagDiscriminants::DL2HighLevel::DL2HighLevel ( const std::string &  nn_file_name,
FlipTagConfig  flip_config = FlipTagConfig::STANDARD,
std::map< std::string, std::string >  remap_scalar = {},
TrackLinkType  track_link_type = TrackLinkType::TRACK_PARTICLE,
float  default_output_value = NAN 
)

Definition at line 24 of file DL2HighLevel.cxx.

28  :
29  m_dl2(nullptr)
30  {
31  // get the graph
32  std::string nn_path = PathResolverFindCalibFile(nn_file_name);
33  if (nn_path.size() == 0) {
34  throw std::runtime_error("no file found at '" + nn_file_name + "'");
35  }
36  std::ifstream input_stream(nn_path);
37  lwt::GraphConfig config = lwt::parse_json_graph(input_stream);
38 
39  if (config.inputs.size() > 1) {
40  throw std::logic_error("DL2 doesn't support multiple inputs");
41  }
42 
43  auto [input_config, constituents_configs, options] = dataprep::createGetterConfig(
44  config, flip_config, std::move(remap_scalar), track_link_type);
45  options.default_output_value = default_output_value;
46 
47  m_dl2.reset(
48  new DL2(
49  config, // lwtnn config
50  input_config, // EDM input config
51  constituents_configs, // edm track input config
52  options
53  ));
54  }

◆ DL2HighLevel() [2/3]

FlavorTagDiscriminants::DL2HighLevel::DL2HighLevel ( DL2HighLevel &&  )
default

◆ DL2HighLevel() [3/3]

FlavorTagDiscriminants::DL2HighLevel::DL2HighLevel ( const DL2HighLevel )
default

◆ ~DL2HighLevel()

FlavorTagDiscriminants::DL2HighLevel::~DL2HighLevel ( )
default

Member Function Documentation

◆ decorate() [1/2]

void FlavorTagDiscriminants::DL2HighLevel::decorate ( const xAOD::BTagging btag) const

Definition at line 60 of file DL2HighLevel.cxx.

60  {
61  m_dl2->decorate(btag);
62  }

◆ decorate() [2/2]

void FlavorTagDiscriminants::DL2HighLevel::decorate ( const xAOD::Jet jet) const

Definition at line 63 of file DL2HighLevel.cxx.

63  {
64  m_dl2->decorate(jet);
65  }

◆ decorateWithDefaults()

void FlavorTagDiscriminants::DL2HighLevel::decorateWithDefaults ( const SG::AuxElement jet) const

Definition at line 66 of file DL2HighLevel.cxx.

66  {
67  m_dl2->decorateWithDefaults(jet);
68  }

◆ getDataDependencyNames()

FTagDataDependencyNames FlavorTagDiscriminants::DL2HighLevel::getDataDependencyNames ( ) const

Definition at line 70 of file DL2HighLevel.cxx.

71  {
72  return m_dl2->getDataDependencyNames();
73  }

Member Data Documentation

◆ m_dl2

std::shared_ptr<const DL2> FlavorTagDiscriminants::DL2HighLevel::m_dl2
private

Definition at line 42 of file DL2HighLevel.h.


The documentation for this class was generated from the following files:
FlavorTagDiscriminants::dataprep::createGetterConfig
std::tuple< std::vector< FTagInputConfig >, std::vector< ConstituentsInputConfig >, FTagOptions > createGetterConfig(lwt::GraphConfig &graph_config, FlipTagConfig flip_config, std::map< std::string, std::string > remap_scalar, TrackLinkType track_link_type)
Definition: DataPrepUtilities.cxx:235
config
Definition: PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py:1
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
python.AtlRunQueryLib.options
options
Definition: AtlRunQueryLib.py:379
PathResolverFindCalibFile
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.cxx:431
lwtDev::parse_json_graph
GraphConfig parse_json_graph(std::istream &json)
Definition: parse_json.cxx:71
FlavorTagDiscriminants::DL2HighLevel::m_dl2
std::shared_ptr< const DL2 > m_dl2
Definition: DL2HighLevel.h:42