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

#include <AugmentationToolLeadingJets.h>

Inheritance diagram for DerivationFramework::AugmentationToolLeadingJets:
Collaboration diagram for DerivationFramework::AugmentationToolLeadingJets:

Public Member Functions

virtual StatusCode initialize () override final
 
virtual StatusCode addBranches (const EventContext &ctx) const override final
 

Private Attributes

SG::ReadHandleKey< xAOD::JetContainerm_jetKey { this, "JetKey", "AntiKt4EMTopoJets", "" }
 
SG::WriteDecorHandleKey< xAOD::JetContainerm_decorationKey { this, "DecorationKey", m_jetKey, "DFDecoratorLeadingJets", "" }
 

Detailed Description

Definition at line 18 of file AugmentationToolLeadingJets.h.

Member Function Documentation

◆ addBranches()

StatusCode DerivationFramework::AugmentationToolLeadingJets::addBranches ( const EventContext &  ctx) const
finaloverridevirtual

Definition at line 24 of file AugmentationToolLeadingJets.cxx.

25  {
26  // Set up the decorators
28 
29  // CALCULATION OF THE NEW VARIABLE
30  // Get Primary vertex
32  int counter=0;
33  for ( unsigned int i =0 ; i < jets->size() ; i++){
34  auto jet = (*jets)[i] ;
35  if (fabs(jet->eta()) < 2.5){
36  decorator(*jet) = (counter <2); // pick the two leading jets only
37  counter+=1;
38  } else {
39  decorator(*jet) = 0; // pick the two leading jets only
40  }
41  }
42  return StatusCode::SUCCESS;
43  }

◆ initialize()

StatusCode DerivationFramework::AugmentationToolLeadingJets::initialize ( )
finaloverridevirtual

Definition at line 16 of file AugmentationToolLeadingJets.cxx.

17  {
21  return StatusCode::SUCCESS;
22  }

Member Data Documentation

◆ m_decorationKey

SG::WriteDecorHandleKey<xAOD::JetContainer> DerivationFramework::AugmentationToolLeadingJets::m_decorationKey { this, "DecorationKey", m_jetKey, "DFDecoratorLeadingJets", "" }
private

Definition at line 29 of file AugmentationToolLeadingJets.h.

◆ m_jetKey

SG::ReadHandleKey<xAOD::JetContainer> DerivationFramework::AugmentationToolLeadingJets::m_jetKey { this, "JetKey", "AntiKt4EMTopoJets", "" }
private

Definition at line 27 of file AugmentationToolLeadingJets.h.


The documentation for this class was generated from the following files:
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
initialize
void initialize()
Definition: run_EoverP.cxx:894
DerivationFramework::AugmentationToolLeadingJets::m_decorationKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decorationKey
Definition: AugmentationToolLeadingJets.h:30
defineDB.jets
jets
Definition: JetTagCalibration/share/defineDB.py:24
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
lumiFormat.i
int i
Definition: lumiFormat.py:85
DerivationFramework::AugmentationToolLeadingJets::m_jetKey
SG::ReadHandleKey< xAOD::JetContainer > m_jetKey
Definition: AugmentationToolLeadingJets.h:28
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
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.
test_pyathena.counter
counter
Definition: test_pyathena.py:15