ATLAS Offline Software
Loading...
Searching...
No Matches
InDetHardScatterSelectionTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef INDETHARDSCATTERSELECTIONTOOL_INDETHARDSCATTERSELECTIONTOOL_H
6#define INDETHARDSCATTERSELECTIONTOOL_INDETHARDSCATTERSELECTIONTOOL_H
7
8// Framework include(s):
9#include "AsgTools/AsgTool.h"
10#include "AthLinks/ElementLink.h"
11#include "GaudiKernel/ToolHandle.h"
14
15// EDM include(s):
19#include "xAODJet/JetFwd.h"
22
23// Tool include(s)
26
27
28// STL includes:
29#include <memory>
30#include <string>
31
32// Forward declaration(s):
33namespace InDet {
35}
36
41
42namespace InDet {
43
46 : public asg::AsgTool,
48 {
49
51
52
53 // Public methods:
55 public:
56
59
60 enum Mode {
61 SumPt2 = 0,
62 SumPt = 1,
63 SumPtw = 2,
64 HSGN2 = 3,
65 };
66
68
70
71 class Sum {
72 public:
73 virtual ~Sum() = default;
76 // the first argument a is previous cumulative sum, b is track_pT, third argument is jet_pT for sumpTw and fourth argument is the mindR for sumpTw
78 virtual float add(const float a, const float b, const float, const float )const = 0 ;
79 };
80
82
85
87 InDetHardScatterSelectionTool(const std::string& name);
88
91
93
96
98 virtual StatusCode initialize() override;
99
101 virtual StatusCode finalize() override;
102
104
107
109 const xAOD::Vertex* getHardScatter(const xAOD::VertexContainer* vtxCont) const override;
110 const xAOD::Vertex* getHardScatter() const override;
111
115
117
119 // Private data:
121
122 private:
123
126
128 std::unique_ptr<Sum> m_sum;
129
131 bool m_doTrkSelection = false;
132
134 SG::ReadHandleKey<xAOD::EventInfo> m_evtInfoKey {this, "EventInfo", "EventInfo", "EventInfo key"};
135 SG::ReadHandleKey<xAOD::VertexContainer> m_vtxContKey{this, "VertexContainer", "PrimaryVertices", "Name of the primary vertex container"};
136 SG::ReadHandleKey<xAOD::JetContainer> m_jetContKey{ this, "JetContainer", "AntiKt4EMTopoJets", "Name of the jet container" };
137
138 BooleanProperty m_redoHardScatter{ this, "RedoHardScatter", false, "If true, redo the hardscatter selection using sumpt2 or sumpt or sumptw"};
139 IntegerProperty m_mode{ this, "SelectionMode", InDet::InDetHardScatterSelectionTool::Mode::SumPt2, "Mode for selecting the hardscatter: sumpt2[0] or sumpt[1] or sumptw[2]"};
140 ToolHandle<InDet::IInDetTrackSelectionTool> m_trkSelectTool{this, "TrackSelectionTool", "InDet::InDetTrackSelectionTool/TrackSelectionTool", "Track selection tool to use"};
141 BooleanProperty m_returnDeco{ this, "ReturnDeco", false, "If true, return the hardscatter as the vertex decorated with some boolean"};
142 SG::ReadDecorHandleKey<xAOD::EventInfo> m_hardScatterDecoKey{this, "HardScatterLinkDeco", m_evtInfoKey, "hardScatterVertexLink", "The decoration name of the ElementLink to the hardscatter vertex (applied to xAOD::EventInfo)"};
143 FloatProperty m_jetMinPt{this, "jetMinPt", 15000.0, "minimum jet pt"};
144 FloatProperty m_jetTrkMaxDr{this, "jetTrkMaxDr", 0.8, "max dR between jet & Trk"};
145 FloatProperty m_trkMaxPt{this, "trkMaxPt", 10045000, "max track pt"};
146
148 SG::ReadDecorHandleKey<xAOD::VertexContainer> m_gnnScoreKey {this, "GNNKey", m_vtxContKey, "HSGN2_phsvertex", "Name of the hard-scatter GNN decoration"};
149
151
152 }; // class: InDetHardScatterSelectionTool
153} // namespace: InDet
154
155#endif // end: INDETHARDSCATTERSELECTIONTOOL_INDETHARDSCATTERSELECTIONTOOL_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.
static Double_t a
Interface for track selection tool.
virtual float add(const float a, const float b, const float, const float) const =0
The method is used within a loop of tracks, takes pT of the track and previous cumulative sum [sumpT2...
ToolHandle< InDet::IInDetTrackSelectionTool > m_trkSelectTool
SG::ReadHandleKey< xAOD::JetContainer > m_jetContKey
const xAOD::Vertex * getHardScatter() const override
SG::ReadDecorHandleKey< xAOD::VertexContainer > m_gnnScoreKey
xAOD::EventInfo ReadDecorHandleKey
InDetHardScatterSelectionTool(const std::string &name)
Constructor.
SG::ReadHandleKey< xAOD::VertexContainer > m_vtxContKey
bool m_doTrkSelection
A flag which will be true if an InDetTrackSelectionTool was provided.
SG::ReadHandleKey< xAOD::EventInfo > m_evtInfoKey
xAOD::EventInfo ReadHandleKey
virtual StatusCode finalize() override
Function finalizing the tool.
SG::ReadDecorHandleKey< xAOD::EventInfo > m_hardScatterDecoKey
std::unique_ptr< Sum > m_sum
A helper class which either sums pt2 or pt or ptw.
virtual StatusCode initialize() override
Function initialising the tool.
ElementLink< xAOD::VertexContainer > getHardScatterLink() const override
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
Primary Vertex Finder.
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Vertex_v1 Vertex
Define the latest version of the vertex class.