ATLAS Offline Software
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 
19 namespace MVAUtils {
20 class 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"};
54  this, "NGoodPhotonsKey", m_pointingVertexContainerKey, "nphotons_good"};
56  this, "PhotonsPxKey", m_pointingVertexContainerKey, "photons_px"};
58  this, "PhotonsPyKey", m_pointingVertexContainerKey, "photons_py"};
60  this, "PhotonsPzKey", m_pointingVertexContainerKey, "photons_pz"};
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;
70 };
71 
72 #endif // TRKVERTEXWEIGHTCALCULATORS_BDTVERTEXWEIGHTCALCULATOR_H
BDTVertexWeightCalculator::m_photons_px_key
SG::ReadDecorHandleKey< xAOD::VertexContainer > m_photons_px_key
Definition: BDTVertexWeightCalculator.h:55
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
PropertyWrapper.h
MVAUtils
Definition: InDetTrkInJetType.h:48
BDTVertexWeightCalculator::BDTVertexWeightCalculator
BDTVertexWeightCalculator(const std::string &name)
Definition: BDTVertexWeightCalculator.cxx:21
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
BDTVertexWeightCalculator
A tool to select the primary vertex associated to the hard-scatter using a BDT.
Definition: BDTVertexWeightCalculator.h:35
IVertexWeightCalculator.h
BDTVertexWeightCalculator::m_bdt_file
Gaudi::Property< std::string > m_bdt_file
Definition: BDTVertexWeightCalculator.h:61
ReadDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
BDTVertexWeightCalculator::initialize_BDT
StatusCode initialize_BDT()
Definition: BDTVertexWeightCalculator.cxx:40
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
BDTVertexWeightCalculator::m_nphotons_good_key
SG::ReadDecorHandleKey< xAOD::VertexContainer > m_nphotons_good_key
Definition: BDTVertexWeightCalculator.h:53
BDTVertexWeightCalculator::estimateSignalCompatibility
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.
Definition: BDTVertexWeightCalculator.cxx:114
BDTVertexWeightCalculator::get_input_values
std::vector< float > get_input_values(const xAOD::Vertex &vertex) const
Definition: BDTVertexWeightCalculator.cxx:71
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
BDTVertexWeightCalculator::~BDTVertexWeightCalculator
virtual ~BDTVertexWeightCalculator() override
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
BDTVertexWeightCalculator::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: BDTVertexWeightCalculator.cxx:26
BDTVertexWeightCalculator::m_photons_pz_key
SG::ReadDecorHandleKey< xAOD::VertexContainer > m_photons_pz_key
Definition: BDTVertexWeightCalculator.h:59
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
VertexContainer.h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
BDTVertexWeightCalculator::getVertex
const xAOD::Vertex * getVertex(const xAOD::VertexContainer &vertices) const
Definition: BDTVertexWeightCalculator.cxx:125
Trk::IVertexWeightCalculator
Definition: IVertexWeightCalculator.h:40
BDTVertexWeightCalculator::m_bdt_name
Gaudi::Property< std::string > m_bdt_name
Definition: BDTVertexWeightCalculator.h:63
SG::ReadDecorHandleKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Definition: StoreGate/StoreGate/ReadDecorHandleKey.h:85
AsgTool.h
BDTVertexWeightCalculator::m_bdt
std::unique_ptr< MVAUtils::BDT > m_bdt
Definition: BDTVertexWeightCalculator.h:66
BDTVertexWeightCalculator::m_photons_py_key
SG::ReadDecorHandleKey< xAOD::VertexContainer > m_photons_py_key
Definition: BDTVertexWeightCalculator.h:57
BDTVertexWeightCalculator::m_pointingVertexContainerKey
SG::ReadHandleKey< xAOD::VertexContainer > m_pointingVertexContainerKey
Definition: BDTVertexWeightCalculator.h:50
xAOD::DiTauJetParameters::BDT
@ BDT
Definition: DiTauDefs.h:44