ATLAS Offline Software
DiTauDiscriminantTool.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2024 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 // Local include(s):
22 
23 // MVAUtils includes
24 #include "MVAUtils/BDT.h"
25 
26 #include <string>
27 #include <map>
28 
29 
30 namespace DiTauRecTools
31 {
32 
33 
36  , public asg::AsgTool
37 {
41 
42 public:
43 
44  DiTauDiscriminantTool( const std::string& name );
45 
46  virtual ~DiTauDiscriminantTool();
47 
48  // initialize the tool
49  virtual StatusCode initialize() override;
50 
51  // get ID score depricated
52  double getJetBDTScore(const xAOD::DiTauJet& xDiTau);
53 
54  // calculate and decorate BDTJetScore
55  virtual StatusCode execute(const xAOD::DiTauJet& xDiTau) override;
56 
57 private:
58 
60 
61  void setIDVariables(const xAOD::DiTauJet& xDiTau);
62 
63  // steering variables
64  std::string m_sWeightsFile;
65  std::string m_sBDTScoreName;
66 
67  //MVAUtils::BDT* m_bdt; //!
68  std::unique_ptr<MVAUtils::BDT> m_bdt;
69 
70  std::map<TString, float*> m_mIDVariables;
71  std::map<TString, float*> m_mIDSpectators;
72 
73  inline float& setVar(const TString& var) { return *(m_mIDVariables[var]); }
74 
75  std::vector<std::string> m_vVarNames;
76 
77 }; // class DiTauDiscriminantTool
78 
79 }
80 #endif // DITAURECTOOLS_DITAUDISCRIMINANTTOOL_H
BDT.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:65
DiTauRecTools::DiTauDiscriminantTool::m_mIDVariables
std::map< TString, float * > m_mIDVariables
Definition: DiTauDiscriminantTool.h:70
DiTauRecTools::DiTauDiscriminantTool::parseWeightsFile
StatusCode parseWeightsFile()
Definition: DiTauDiscriminantTool.cxx:118
DiTauRecTools::DiTauDiscriminantTool::setIDVariables
void setIDVariables(const xAOD::DiTauJet &xDiTau)
Definition: DiTauDiscriminantTool.cxx:133
DiTauRecTools::DiTauDiscriminantTool::m_sWeightsFile
std::string m_sWeightsFile
Definition: DiTauDiscriminantTool.h:64
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:37
DiTauRecTools::DiTauDiscriminantTool::execute
virtual StatusCode execute(const xAOD::DiTauJet &xDiTau) override
Declare the interface that the class provides.
Definition: DiTauDiscriminantTool.cxx:102
DiTauRecTools::DiTauDiscriminantTool::m_mIDSpectators
std::map< TString, float * > m_mIDSpectators
Definition: DiTauDiscriminantTool.h:71
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
DiTauRecTools
Implementation of boosted di-tau ID.
Definition: DiTauDiscriminantTool.h:31
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:75
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:73
AsgTool.h
IDiTauToolBase.h
DiTauRecTools::DiTauDiscriminantTool::m_bdt
std::unique_ptr< MVAUtils::BDT > m_bdt
Definition: DiTauDiscriminantTool.h:68
DiTauRecTools::DiTauDiscriminantTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: DiTauDiscriminantTool.cxx:35