ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
DerivationFramework::HIJetAugmentationTool Class Reference

#include <HIJetAugmentationTool.h>

Inheritance diagram for DerivationFramework::HIJetAugmentationTool:
Collaboration diagram for DerivationFramework::HIJetAugmentationTool:

Public Member Functions

 HIJetAugmentationTool (const std::string &t, const std::string &n, const IInterface *p)
 
 ~HIJetAugmentationTool ()
 
StatusCode initialize ()
 
StatusCode finalize ()
 
virtual StatusCode addBranches (const EventContext &ctx) const
 

Private Attributes

Gaudi::Property< float > m_deltaR
 
SG::ReadHandleKey< xAOD::EventInfom_eventInfoKey
 
SG::ReadHandleKey< xAOD::JetContainerm_hiJet_key
 
SG::ReadHandleKey< xAOD::JetContainerm_caloJet_key
 
PublicToolHandle< IJetUpdateJvtm_jvtUpdateTool
 JVT update tool. More...
 
SG::WriteDecorHandleKey< xAOD::JetContainerm_jvtMatchedKey
 

Detailed Description

Definition at line 26 of file HIJetAugmentationTool.h.

Constructor & Destructor Documentation

◆ HIJetAugmentationTool()

DerivationFramework::HIJetAugmentationTool::HIJetAugmentationTool ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

Definition at line 11 of file HIJetAugmentationTool.cxx.

13  : base_class(t,n,p)
14  {
15  }

◆ ~HIJetAugmentationTool()

DerivationFramework::HIJetAugmentationTool::~HIJetAugmentationTool ( )

Definition at line 18 of file HIJetAugmentationTool.cxx.

19  {
20  }

Member Function Documentation

◆ addBranches()

StatusCode DerivationFramework::HIJetAugmentationTool::addBranches ( const EventContext &  ctx) const
virtual

Definition at line 53 of file HIJetAugmentationTool.cxx.

53  {
55 
56  // Load jet containers
58  if (!hiJets.isValid()) {
59  ATH_MSG_ERROR("Couldn't retrieve JetContainer with key " << m_hiJet_key);
60  return StatusCode::FAILURE;
61  }
63  if (!caloJets.isValid()) {
64  ATH_MSG_ERROR("Couldn't retrieve JetContainer with key "
65  << m_caloJet_key);
66  return StatusCode::FAILURE;
67  }
68 
70 
71  // first loop over calibrated HI jets
72  for (const auto *hjet : *hiJets) {
73  float mindR = 999.;
74  float matchedJvt = -1;
75  // second loop over topo jets
76  for (const auto *tjet : *caloJets) {
77  float newjvt = m_jvtUpdateTool->updateJvt(*tjet);
78 
79  // perform the matching
80  float dR =
81  deltaR(tjet->eta(), hjet->eta(), hjet->phi(), tjet->phi());
82 
83  if (dR < m_deltaR.value() && dR < mindR) {
84  mindR = dR;
85  matchedJvt = newjvt;
86  }
87  }
88 
89  if (mindR < m_deltaR.value()) {
90  (jvtMatchedHandle)(*hjet) = matchedJvt;
91  } else {
92  (jvtMatchedHandle)(*hjet) = -1;
93  }
94 
95  }
96 
97  return StatusCode::SUCCESS;
98  }

◆ finalize()

StatusCode DerivationFramework::HIJetAugmentationTool::finalize ( )

Definition at line 39 of file HIJetAugmentationTool.cxx.

40  {
41 
42  ATH_CHECK(m_jvtUpdateTool->finalize());
43 
44  return StatusCode::SUCCESS;
45  }

◆ initialize()

StatusCode DerivationFramework::HIJetAugmentationTool::initialize ( )

Definition at line 23 of file HIJetAugmentationTool.cxx.

24  {
28  ATH_CHECK(m_jvtUpdateTool.retrieve());
29 
32 
33  ATH_MSG_INFO("DeltaRJetMatching = "<< m_deltaR.value());
34 
35 
36  return StatusCode::SUCCESS;
37  }

Member Data Documentation

◆ m_caloJet_key

SG::ReadHandleKey<xAOD::JetContainer> DerivationFramework::HIJetAugmentationTool::m_caloJet_key
private
Initial value:
{
this, "CaloJetContainerKey", "AntiKt4EMTopoJets"}

Definition at line 47 of file HIJetAugmentationTool.h.

◆ m_deltaR

Gaudi::Property<float> DerivationFramework::HIJetAugmentationTool::m_deltaR
private
Initial value:
{
this, "DeltaRJetMatching", 0.3,
"Maximum distance in eta-phi between two matched jets"}

Definition at line 40 of file HIJetAugmentationTool.h.

◆ m_eventInfoKey

SG::ReadHandleKey<xAOD::EventInfo> DerivationFramework::HIJetAugmentationTool::m_eventInfoKey
private
Initial value:
{this, "EventInfoKey",
"EventInfo", ""}

Definition at line 43 of file HIJetAugmentationTool.h.

◆ m_hiJet_key

SG::ReadHandleKey<xAOD::JetContainer> DerivationFramework::HIJetAugmentationTool::m_hiJet_key
private
Initial value:
{this, "HIJetContainerKey",
"AntiKt4HIJets"}

Definition at line 45 of file HIJetAugmentationTool.h.

◆ m_jvtMatchedKey

SG::WriteDecorHandleKey<xAOD::JetContainer> DerivationFramework::HIJetAugmentationTool::m_jvtMatchedKey
private
Initial value:
{
this, "JVTMatchedName", "JvtMatched",
"SG Key for JVT AuxData"}

Definition at line 56 of file HIJetAugmentationTool.h.

◆ m_jvtUpdateTool

PublicToolHandle<IJetUpdateJvt> DerivationFramework::HIJetAugmentationTool::m_jvtUpdateTool
private
Initial value:
{
this, "JVTToolEMTopo", "JetVertexTaggerTool",
"JVT tool for EMTopo jets"}

JVT update tool.

Definition at line 51 of file HIJetAugmentationTool.h.


The documentation for this class was generated from the following files:
DerivationFramework::HIJetAugmentationTool::m_jvtUpdateTool
PublicToolHandle< IJetUpdateJvt > m_jvtUpdateTool
JVT update tool.
Definition: HIJetAugmentationTool.h:51
DerivationFramework::HIJetAugmentationTool::m_caloJet_key
SG::ReadHandleKey< xAOD::JetContainer > m_caloJet_key
Definition: HIJetAugmentationTool.h:47
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
DerivationFramework::HIJetAugmentationTool::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition: HIJetAugmentationTool.h:43
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
DerivationFramework::HIJetAugmentationTool::m_jvtMatchedKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_jvtMatchedKey
Definition: HIJetAugmentationTool.h:56
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
DerivationFramework::HIJetAugmentationTool::m_hiJet_key
SG::ReadHandleKey< xAOD::JetContainer > m_hiJet_key
Definition: HIJetAugmentationTool.h:45
beamspotman.n
n
Definition: beamspotman.py:727
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition: StoreGate/StoreGate/WriteDecorHandle.h:100
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
DerivationFramework::HIJetAugmentationTool::m_deltaR
Gaudi::Property< float > m_deltaR
Definition: HIJetAugmentationTool.h:40
SG::WriteDecorHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
DerivationFramework::deltaR
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: HIJetAugmentationTool.cxx:47