![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
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>();
91 return StatusCode::FAILURE;
106 ATH_MSG_ERROR(
"Hardscatter vertex decoration cannot be empty!");
107 return StatusCode::FAILURE;
122 return StatusCode::SUCCESS;
133 return StatusCode::SUCCESS;
140 const EventContext& ctx = Gaudi::Hive::currentContext();
146 ATH_MSG_ERROR(
"Could not open event info, returning nullptr!");
152 ATH_MSG_ERROR(
"Hardscatter vertex link is not valid, returning nullptr!");
159 if (
m_mode == InDet::InDetHardScatterSelectionTool::Mode::SumPtw ){
163 ATH_MSG_ERROR (
"HardScatterSelectionTool configured to use jet collection "<<
m_jetContKey.key()<<
", but collection is not found!");
165 jetCont = jetContHandle.
cptr();
168 float maxsum = -999.0;
170 for (
const auto *
const vtx : *vtxCont) {
174 if (
m_mode == InDet::InDetHardScatterSelectionTool::Mode::SumPtw ){
175 for (
const auto& trkLink : vtx->trackParticleLinks()) {
176 if (!trkLink.isValid())
continue;
191 sum =
m_sum->add(
sum, (*trkLink)->pt(),jetPt,minDr );
201 for (
const auto& trkLink : vtx->trackParticleLinks()) {
202 if (trkLink.isValid()) {
227 const EventContext& ctx = Gaudi::Hive::currentContext();
230 ATH_MSG_ERROR(
"Could not open primary vertex container, returning nullptr!");
240 const EventContext& ctx = Gaudi::Hive::currentContext();
251 return hardscatterLink;
256 const EventContext& ctx = Gaudi::Hive::currentContext();
259 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 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.