ATLAS Offline Software
DiTauDiscriminantTool.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef DITAURECTOOLS_DITAUDISCRIMINANTTOOL_H
8 #define DITAURECTOOLS_DITAUDISCRIMINANTTOOL_H
9 
17 // Framework include(s):
18 #include "AsgTools/AsgTool.h"
19 
20 // Core include(s):
21 
22 // EDM include(s):
24 
25 // Local include(s):
27 
28 // MVAUtils includes
29 #include "MVAUtils/BDT.h"
30 
31 #include <string>
32 #include <map>
33 
34 
35 namespace DiTauRecTools
36 {
37 
38 
41  , public asg::AsgTool
42 {
46 
47 public:
48 
49  DiTauDiscriminantTool( const std::string& name );
50 
51  virtual ~DiTauDiscriminantTool();
52 
53  // initialize the tool
54  virtual StatusCode initialize() override;
55 
56  // get ID score depricated
57  double getJetBDTScore(const xAOD::DiTauJet& xDiTau);
58 
59  // calculate and decorate BDTJetScore
60  virtual StatusCode execute(const xAOD::DiTauJet& xDiTau) override;
61 
62 private:
63 
65 
66  void setIDVariables(const xAOD::DiTauJet& xDiTau);
67 
68  // const xAOD::DiTauJetContainer* m_xDiTauContainer;
69 
70  // steering variables
71  std::string m_sWeightsFile;
72  std::string m_sBDTScoreName;
73 
74  //MVAUtils::BDT* m_bdt; //!
75  std::unique_ptr<MVAUtils::BDT> m_bdt;
76 
77  std::map<TString, float*> m_mIDVariables;
78  std::map<TString, float*> m_mIDSpectators;
79 
80  inline float& setVar(const TString& var) { return *(m_mIDVariables[var]); }
81 
82  std::vector<std::string> m_vVarNames;
83 
84 }; // class DiTauDiscriminantTool
85 
86 }
87 #endif // DITAURECTOOLS_DITAUDISCRIMINANTTOOL_H
beamspotnt.var
var
Definition: bin/beamspotnt.py:1394
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
DiTauRecTools::DiTauDiscriminantTool::m_sBDTScoreName
std::string m_sBDTScoreName
Definition: DiTauDiscriminantTool.h:72
DiTauRecTools::DiTauDiscriminantTool::m_mIDVariables
std::map< TString, float * > m_mIDVariables
Definition: DiTauDiscriminantTool.h:77
DiTauRecTools::DiTauDiscriminantTool::parseWeightsFile
StatusCode parseWeightsFile()
Definition: DiTauDiscriminantTool.cxx:119
DiTauJetContainer.h
DiTauRecTools::DiTauDiscriminantTool::setIDVariables
void setIDVariables(const xAOD::DiTauJet &xDiTau)
Definition: DiTauDiscriminantTool.cxx:134
DiTauRecTools::DiTauDiscriminantTool::m_sWeightsFile
std::string m_sWeightsFile
Definition: DiTauDiscriminantTool.h:71
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
DiTauRecTools::IDiTauToolBase
Definition: IDiTauToolBase.h:20
DiTauRecTools::DiTauDiscriminantTool
Definition: DiTauDiscriminantTool.h:42
DiTauRecTools::DiTauDiscriminantTool::execute
virtual StatusCode execute(const xAOD::DiTauJet &xDiTau) override
Declare the interface that the class provides.
Definition: DiTauDiscriminantTool.cxx:103
BDT.h
DiTauRecTools::DiTauDiscriminantTool::m_mIDSpectators
std::map< TString, float * > m_mIDSpectators
Definition: DiTauDiscriminantTool.h:78
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
DiTauRecTools
Implementation of boosted di-tau ID.
Definition: DiTauDiscriminantTool.h:36
DiTauRecTools::DiTauDiscriminantTool::getJetBDTScore
double getJetBDTScore(const xAOD::DiTauJet &xDiTau)
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
DiTauRecTools::DiTauDiscriminantTool::m_vVarNames
std::vector< std::string > m_vVarNames
Definition: DiTauDiscriminantTool.h:82
xAOD::DiTauJet_v1
Definition: DiTauJet_v1.h:31
DiTauRecTools::DiTauDiscriminantTool::setVar
float & setVar(const TString &var)
not-stateless, many such examples need to be fixed for r22
Definition: DiTauDiscriminantTool.h:80
AsgTool.h
IDiTauToolBase.h
DiTauRecTools::DiTauDiscriminantTool::m_bdt
std::unique_ptr< MVAUtils::BDT > m_bdt
Definition: DiTauDiscriminantTool.h:75
DiTauRecTools::DiTauDiscriminantTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: DiTauDiscriminantTool.cxx:36