ATLAS Offline Software
Loading...
Searching...
No Matches
PhotonSingleBDTCalculator.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
26
27#ifndef ELECTRONPHOTONSELECTORTOOLS_PHOTONSINGLEBDTCALCULATOR_H
28#define ELECTRONPHOTONSELECTORTOOLS_PHOTONSINGLEBDTCALCULATOR_H
29
31#include "AsgTools/AsgTool.h"
32#include <memory>
33#include <string>
34#include <vector>
35
36namespace MVAUtils {
37 class BDT;
38}
39
40class TFile;
41class TTree;
42
43namespace PhotonIDBDT {
44
47
48public:
49 PhotonSingleBDTCalculator(const std::string& name);
50 virtual ~PhotonSingleBDTCalculator() override;
51
52 virtual StatusCode initialize() override;
53
55 StatusCode computeScore(const std::vector<float>& vars, float& score) const;
56
57private:
58 StatusCode loadBDT();
59
60 Gaudi::Property<std::string> m_modelFile {
61 this, "ModelFile", "", "ROOT file containing the BDT TTree"
62 };
63
64 Gaudi::Property<std::string> m_bdtTreeName {
65 this, "BDTTreeName", "lgbm", "Name of the TTree containing the BDT (e.g. lgbm)"
66 };
67
68 // Private members
69 std::unique_ptr<TFile> m_file;
70 TTree* m_tree{nullptr};
71 std::unique_ptr<MVAUtils::BDT> m_bdt;
72
73};
74
75} // namespace PhotonIDBDT
76
77#endif
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
virtual ~PhotonSingleBDTCalculator() override
StatusCode computeScore(const std::vector< float > &vars, float &score) const
Evaluate the BDT score for a photon.
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
Base class for the dual-use tool interface classes.
Definition IAsgTool.h:41