ATLAS Offline Software
Loading...
Searching...
No Matches
BDTVertexWeightCalculator.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRKVERTEXWEIGHTCALCULATORS_BDTVERTEXWEIGHTCALCULATOR_H
6#define TRKVERTEXWEIGHTCALCULATORS_BDTVERTEXWEIGHTCALCULATOR_H
7
10#include <AsgTools/AsgTool.h>
13
14#include <memory>
15#include <string>
16
18
19namespace MVAUtils {
20class BDT;
21}
22
34 : public asg::AsgTool,
35 virtual public Trk::IVertexWeightCalculator {
36 ASG_TOOL_CLASS(BDTVertexWeightCalculator, IVertexWeightCalculator)
37 public:
38 BDTVertexWeightCalculator(const std::string& name);
39 virtual ~BDTVertexWeightCalculator() override;
40 virtual StatusCode initialize() override;
45 virtual double estimateSignalCompatibility(
46 const xAOD::Vertex& vertex) const override;
47 const xAOD::Vertex* getVertex(const xAOD::VertexContainer& vertices) const;
48
49 private:
51 this, "PointingVertexContainerKey", "PhotonPointingVertices",
52 "The container with the vertex build with (photon) pointing"};
61 Gaudi::Property<std::string> m_bdt_file{this, "BDTFile", "",
62 "BDT ROOT filename"};
63 Gaudi::Property<std::string> m_bdt_name{this, "BDTName", "BDT",
64 "BDT tree name"};
65
66 std::unique_ptr<MVAUtils::BDT> m_bdt;
67
68 std::vector<float> get_input_values(const xAOD::Vertex& vertex) const;
69 StatusCode initialize_BDT();
70};
71
72#endif // TRKVERTEXWEIGHTCALCULATORS_BDTVERTEXWEIGHTCALCULATOR_H
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid from which a ReadHandle is made.
SG::ReadDecorHandleKey< xAOD::VertexContainer > m_photons_py_key
virtual ~BDTVertexWeightCalculator() override
const xAOD::Vertex * getVertex(const xAOD::VertexContainer &vertices) const
SG::ReadDecorHandleKey< xAOD::VertexContainer > m_photons_px_key
SG::ReadHandleKey< xAOD::VertexContainer > m_pointingVertexContainerKey
BDTVertexWeightCalculator(const std::string &name)
SG::ReadDecorHandleKey< xAOD::VertexContainer > m_nphotons_good_key
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
std::unique_ptr< MVAUtils::BDT > m_bdt
std::vector< float > get_input_values(const xAOD::Vertex &vertex) const
Gaudi::Property< std::string > m_bdt_file
SG::ReadDecorHandleKey< xAOD::VertexContainer > m_photons_pz_key
virtual double estimateSignalCompatibility(const xAOD::Vertex &vertex) const override
Estimate the compatibility of the vertex with a hard scatter vertex, with respect to pileup vertices.
Gaudi::Property< std::string > m_bdt_name
Simplified Boosted Regression Tree, support TMVA, lgbm, and xgboost.
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid from which a ReadHandle is made.
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Vertex_v1 Vertex
Define the latest version of the vertex class.