ATLAS Offline Software
DL2Tool.h
Go to the documentation of this file.
1 // for text editors: this file is -*- C++ -*-
2 /*
3  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
4 */
5 
6 #ifndef DL2_TOOL_H
7 #define DL2_TOOL_H
8 
9 #include "AsgTools/AsgTool.h"
12 
13 namespace FlavorTagDiscriminants {
14 
15  class DL2HighLevel;
16 
17  struct DL2Properties {
18  std::string nnFile;
19  std::string flipTagConfig;
20  std::map<std::string,std::string> variableRemapping;
21  std::string trackLinkType;
22  float default_output_value = NAN;
23  };
24 
25  class DL2Tool : public asg::AsgTool,
26  virtual public IBTagDecorator,
27  virtual public IJetTagConditionalDecorator
28  {
30  public:
31  DL2Tool(const std::string& name);
32  ~DL2Tool();
33 
34  StatusCode initialize() override;
35 
36  // returns 0 for success
37  virtual void decorate(const xAOD::BTagging& btag) const override;
38  virtual void decorate(const xAOD::Jet& jet) const override;
39  virtual void decorateWithDefaults(const SG::AuxElement& jet) const override;
40 
41  virtual std::set<std::string> getDecoratorKeys() const override;
42  virtual std::set<std::string> getAuxInputKeys() const override;
43  virtual std::set<std::string> getConstituentAuxInputKeys() const override;
44  private:
46  std::unique_ptr<DL2HighLevel> m_dl2;
47  };
48 
49 }
50 #endif
IJetTagConditionalDecorator
Definition: IJetTagConditionalDecorator.h:27
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
FlavorTagDiscriminants::DL2Tool::m_dl2
std::unique_ptr< DL2HighLevel > m_dl2
Definition: DL2Tool.h:46
FlavorTagDiscriminants
This file contains "getter" functions used for accessing tagger inputs from the EDM.
Definition: AssociationEnums.h:11
ASG_TOOL_CLASS2
#define ASG_TOOL_CLASS2(CLASSNAME, INT1, INT2)
Definition: AsgToolMacros.h:77
FlavorTagDiscriminants::DL2Tool::initialize
StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: DL2Tool.cxx:23
SG::AuxElement
Base class for elements of a container that can have aux data.
Definition: AuxElement.h:472
FlavorTagDiscriminants::DL2Properties::trackLinkType
std::string trackLinkType
Definition: DL2Tool.h:21
FlavorTagDiscriminants::DL2Properties::default_output_value
float default_output_value
Definition: DL2Tool.h:22
FlavorTagDiscriminants::DL2Tool::~DL2Tool
~DL2Tool()
Definition: DL2Tool.cxx:21
IJetTagConditionalDecorator.h
FlavorTagDiscriminants::DL2Tool::decorateWithDefaults
virtual void decorateWithDefaults(const SG::AuxElement &jet) const override
Method to decorate a jet with defaults.
Definition: DL2Tool.cxx:54
FlavorTagDiscriminants::DL2Tool
Definition: DL2Tool.h:28
FlavorTagDiscriminants::DL2Tool::DL2Tool
DL2Tool(const std::string &name)
Definition: DL2Tool.cxx:10
FlavorTagDiscriminants::DL2Properties::nnFile
std::string nnFile
Definition: DL2Tool.h:18
FlavorTagDiscriminants::DL2Tool::decorate
virtual void decorate(const xAOD::BTagging &btag) const override
Method to decorate a jet.
Definition: DL2Tool.cxx:44
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
FlavorTagDiscriminants::DL2Tool::m_props
DL2Properties m_props
Definition: DL2Tool.h:45
FlavorTagDiscriminants::DL2Tool::getAuxInputKeys
virtual std::set< std::string > getAuxInputKeys() const override
Definition: DL2Tool.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
FlavorTagDiscriminants::DL2Properties::variableRemapping
std::map< std::string, std::string > variableRemapping
Definition: DL2Tool.h:20
IBTagDecorator.h
FlavorTagDiscriminants::DL2Properties
Definition: DL2Tool.h:17
FlavorTagDiscriminants::DL2Properties::flipTagConfig
std::string flipTagConfig
Definition: DL2Tool.h:19
xAOD::BTagging_v1
Definition: BTagging_v1.h:39
IBTagDecorator
Definition: IBTagDecorator.h:16
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
FlavorTagDiscriminants::DL2Tool::getDecoratorKeys
virtual std::set< std::string > getDecoratorKeys() const override
Definition: DL2Tool.cxx:60
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
AsgTool.h
FlavorTagDiscriminants::DL2Tool::getConstituentAuxInputKeys
virtual std::set< std::string > getConstituentAuxInputKeys() const override
Definition: DL2Tool.cxx:66