Loading [MathJax]/extensions/tex2jax.js
 |
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;
109 ATH_MSG_ERROR(
"Hardscatter vertex decoration cannot be empty!");
110 return StatusCode::FAILURE;
128 return StatusCode::SUCCESS;
139 return StatusCode::SUCCESS;
146 const EventContext& ctx = Gaudi::Hive::currentContext();
152 ATH_MSG_ERROR(
"Could not open event info, returning nullptr!");
158 ATH_MSG_ERROR(
"Hardscatter vertex link is not valid, returning nullptr!");
165 if (
m_mode == InDet::InDetHardScatterSelectionTool::Mode::SumPtw ){
171 jetCont = jetContHandle.
cptr();
174 float maxsum = -999.0;
175 float max_gnn_score = -999.0;
177 for (
const auto *
const vtx : *vtxCont) {
181 if (
m_mode == InDet::InDetHardScatterSelectionTool::Mode::SumPtw ){
182 for (
const auto& trkLink : vtx->trackParticleLinks()) {
183 if (!trkLink.isValid())
continue;
198 sum =
m_sum->add(
sum, (*trkLink)->pt(),jetPt,minDr );
206 else if (
m_mode == InDet::InDetHardScatterSelectionTool::Mode::HSGN2 ) {
208 float gnn_score = acc_gnn(*vtx);
209 if (gnn_score > max_gnn_score) {
210 max_gnn_score = gnn_score;
216 for (
const auto& trkLink : vtx->trackParticleLinks()) {
217 if (trkLink.isValid()) {
242 const EventContext& ctx = Gaudi::Hive::currentContext();
245 ATH_MSG_ERROR(
"Could not open primary vertex container, returning nullptr!");
255 const EventContext& ctx = Gaudi::Hive::currentContext();
266 return hardscatterLink;
271 const EventContext& ctx = Gaudi::Hive::currentContext();
274 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.