 |
ATLAS Offline Software
|
Go to the documentation of this file.
24 class SumPt2 :
public Sum {
26 virtual float add(
const float a,
const float b,
const float,
const float)
const override final {
30 class SumPt :
public Sum {
32 virtual float add(
const float a,
const float b,
const float,
const float )
const override final {
36 class SumPtw :
public Sum {
38 virtual float add(
const float a,
const float b,
const float jet_pt,
const float mindR )
const override final {
39 return a + (
b *
b * jet_pt *jet_pt )/(mindR+0.0001);
67 ATH_MSG_ERROR(
"RedoHardScatter and ReturnDeco cannot both be set to true.");
68 return StatusCode::FAILURE;
77 case InDet::InDetHardScatterSelectionTool::Mode::SumPt2: {
78 m_sum = std::make_unique<::SumPt2>();
81 case InDet::InDetHardScatterSelectionTool::Mode::SumPt: {
82 m_sum = std::make_unique<::SumPt>();
85 case InDet::InDetHardScatterSelectionTool::Mode::SumPtw: {
86 m_sum = std::make_unique<::SumPtw>();
89 case InDet::InDetHardScatterSelectionTool::Mode::HSGN2: {
94 return StatusCode::FAILURE;
119 return StatusCode::SUCCESS;
130 return StatusCode::SUCCESS;
137 const EventContext& ctx = Gaudi::Hive::currentContext();
143 ATH_MSG_ERROR(
"Could not open event info, returning nullptr!");
149 ATH_MSG_ERROR(
"Hardscatter vertex link is not valid, returning nullptr!");
156 if (
m_mode == InDet::InDetHardScatterSelectionTool::Mode::SumPtw ){
162 jetCont = jetContHandle.
cptr();
165 float maxsum = -999.0;
166 float max_gnn_score = -999.0;
168 for (
const auto *
const vtx : *vtxCont) {
172 if (
m_mode == InDet::InDetHardScatterSelectionTool::Mode::SumPtw ){
173 for (
const auto& trkLink : vtx->trackParticleLinks()) {
174 if (!trkLink.isValid())
continue;
189 sum =
m_sum->add(
sum, (*trkLink)->pt(),jetPt,minDr );
197 else if (
m_mode == InDet::InDetHardScatterSelectionTool::Mode::HSGN2 ) {
199 float gnn_score = acc_gnn(*vtx);
200 if (gnn_score > max_gnn_score) {
201 max_gnn_score = gnn_score;
207 for (
const auto& trkLink : vtx->trackParticleLinks()) {
208 if (trkLink.isValid()) {
233 const EventContext& ctx = Gaudi::Hive::currentContext();
236 ATH_MSG_ERROR(
"Could not open primary vertex container, returning nullptr!");
246 const EventContext& ctx = Gaudi::Hive::currentContext();
257 return hardscatterLink;
262 const EventContext& ctx = Gaudi::Hive::currentContext();
265 ATH_MSG_ERROR(
"Could not open primary vertex container, returning empty ElementLink!");
bool toContainedElement(BaseConstReference data, ElementType element, IProxyDict *sg=0)
Set from element pointer and a reference to the container (storable)
const_pointer_type cptr()
Dereference the pointer.
const std::string & key() const
Return the StoreGate ID for the referenced object.
bool empty() const
Test if the key is blank.
bool isValid() const
Test to see if the link can be dereferenced.
Handle class for reading a decoration on an object.
double deltaR(double rapidity1, double phi1, double rapidity2, double phi2)
from bare bare rapidity,phi
::StatusCode StatusCode
StatusCode definition for legacy code.
const_pointer_type get() const
Dereference the pointer, but don't cache anything.
bool add(const std::string &hname, TKey *tobj)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
ElementLink implementation for ROOT usage.
Class describing a Vertex.