ATLAS Offline Software
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
GlobalSim::jJetInputAlgTool Class Reference

#include <jJetInputAlgTool.h>

Inheritance diagram for GlobalSim::jJetInputAlgTool:
Collaboration diagram for GlobalSim::jJetInputAlgTool:

Public Member Functions

 jJetInputAlgTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~jJetInputAlgTool ()=default
 
StatusCode initialize () override
 
virtual StatusCode run (const EventContext &ctx) const override
 
virtual std::string toString () const override
 

Private Attributes

SG::ReadHandleKey< xAOD::jFexSRJetRoIContainerm_jJetRoIKey
 
SG::WriteHandleKey< GlobalSim::jJetTOBArraym_jJetTOBArrayWriteKey
 

Static Private Attributes

static constexpr int s_Et_conversion {2}
 
static constexpr double s_EtDouble_conversion {0.1}
 
static constexpr double s_phiDouble_conversion {0.05}
 
static constexpr double s_etaDouble_conversion {0.025}
 

Detailed Description

Definition at line 24 of file jJetInputAlgTool.h.

Constructor & Destructor Documentation

◆ jJetInputAlgTool()

GlobalSim::jJetInputAlgTool::jJetInputAlgTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 14 of file jJetInputAlgTool.cxx.

16  :
17  base_class(type, name, parent){
18  }

◆ ~jJetInputAlgTool()

virtual GlobalSim::jJetInputAlgTool::~jJetInputAlgTool ( )
virtualdefault

Member Function Documentation

◆ initialize()

StatusCode GlobalSim::jJetInputAlgTool::initialize ( )
override

Definition at line 20 of file jJetInputAlgTool.cxx.

20  {
21  CHECK(m_jJetRoIKey.initialize());
23 
24  return StatusCode::SUCCESS;
25  }

◆ run()

StatusCode GlobalSim::jJetInputAlgTool::run ( const EventContext &  ctx) const
overridevirtual

Definition at line 28 of file jJetInputAlgTool.cxx.

28  {
29 
31  ctx);
32  CHECK(jJetRoIContainer.isValid());
33 
34  auto jJets = std::make_unique<GlobalSim::jJetTOBArray>("InputjJets", 60);
35 
36  for(const xAOD::jFexSRJetRoI* jFexRoI : *jJetRoIContainer){
37 
38  /*
39  * jFexNumber(): 8 bit unsigned int
40  * et(): MeV
41  * tobEt(): et in units of 200 MeV
42  * globalEta(): simplified global eta in units of 0.1
43  * (fcal straightened out,
44  * not suitable for use in L1TopoSim)
45  * globalPhi(): simplified global phi in units of 0.1
46  * (fcal straightened out,
47  * not suitable for use in L1TopoSim)
48  */
49 
50  ATH_MSG_DEBUG( "EDM jFex Jet Number: "
51  << +jFexRoI->jFexNumber()
52  << " et: "
53  << jFexRoI->et()
54  << " tobEt: "
55  << jFexRoI->tobEt()
56  << " globalEta: "
57  << jFexRoI->globalEta()
58  << " globalPhi: "
59  << jFexRoI->globalPhi()
60  );
61 
62  unsigned int EtTopo = jFexRoI->tobEt() * s_Et_conversion;
63  unsigned int phiTopo = TSU::toTopoPhi(jFexRoI->phi());
64  int etaTopo = TSU::toTopoEta(jFexRoI->eta());
65 
66  // Avoid the events with 0 Et (events below threshold)
67  if (EtTopo==0) continue;
68 
69  TCS::jJetTOB jet( EtTopo, etaTopo, phiTopo );
70  jet.setEtDouble(static_cast<double>(EtTopo * s_EtDouble_conversion));
71  jet.setEtaDouble(static_cast<double>(etaTopo * s_etaDouble_conversion));
72  jet.setPhiDouble(static_cast<double>(phiTopo * s_phiDouble_conversion));
73 
74  jJets-> push_back(jet);
75  }
76 
78  ctx);
79  CHECK(h_write.record(std::move(jJets)));
80 
81 
82  return StatusCode::SUCCESS;
83  }

◆ toString()

std::string GlobalSim::jJetInputAlgTool::toString ( ) const
overridevirtual

Definition at line 85 of file jJetInputAlgTool.cxx.

85  {
86  std::stringstream ss;
87  ss << "jJetInputAlgTool. " << name() <<'\n'
88  << m_jJetRoIKey << '\n'
89  << m_jJetTOBArrayWriteKey << '\n';
90 
91  return ss.str();
92  }

Member Data Documentation

◆ m_jJetRoIKey

SG::ReadHandleKey<xAOD::jFexSRJetRoIContainer> GlobalSim::jJetInputAlgTool::m_jJetRoIKey
private
Initial value:
{this,
"jFexSRJetRoIKey", "L1_jFexSRJetRoI", "jFEX Jet EDM"}

Definition at line 44 of file jJetInputAlgTool.h.

◆ m_jJetTOBArrayWriteKey

SG::WriteHandleKey<GlobalSim::jJetTOBArray> GlobalSim::jJetInputAlgTool::m_jJetTOBArrayWriteKey
private
Initial value:
{this, "TOBArrayWriteKey", "",
"key to write out an jJetTOBArray"}

Definition at line 48 of file jJetInputAlgTool.h.

◆ s_Et_conversion

constexpr int GlobalSim::jJetInputAlgTool::s_Et_conversion {2}
staticconstexprprivate

Definition at line 52 of file jJetInputAlgTool.h.

◆ s_etaDouble_conversion

constexpr double GlobalSim::jJetInputAlgTool::s_etaDouble_conversion {0.025}
staticconstexprprivate

Definition at line 55 of file jJetInputAlgTool.h.

◆ s_EtDouble_conversion

constexpr double GlobalSim::jJetInputAlgTool::s_EtDouble_conversion {0.1}
staticconstexprprivate

Definition at line 53 of file jJetInputAlgTool.h.

◆ s_phiDouble_conversion

constexpr double GlobalSim::jJetInputAlgTool::s_phiDouble_conversion {0.05}
staticconstexprprivate

Definition at line 54 of file jJetInputAlgTool.h.


The documentation for this class was generated from the following files:
xAOD::jFexSRJetRoI_v1
Class describing properties of a LVL1 jFEX global Trigger Object (TOB) in the xAOD format.
Definition: jFexSRJetRoI_v1.h:22
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
GlobalSim::jJetInputAlgTool::s_EtDouble_conversion
static constexpr double s_EtDouble_conversion
Definition: jJetInputAlgTool.h:53
GlobalSim::jJetInputAlgTool::s_etaDouble_conversion
static constexpr double s_etaDouble_conversion
Definition: jJetInputAlgTool.h:55
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
TSU::toTopoEta
int toTopoEta(float eta)
Definition: Conversions.cxx:27
GlobalSim::jJetInputAlgTool::m_jJetTOBArrayWriteKey
SG::WriteHandleKey< GlobalSim::jJetTOBArray > m_jJetTOBArrayWriteKey
Definition: jJetInputAlgTool.h:48
TCS::jJetTOB
Definition: jJetTOB.h:16
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
GlobalSim::jJetInputAlgTool::m_jJetRoIKey
SG::ReadHandleKey< xAOD::jFexSRJetRoIContainer > m_jJetRoIKey
Definition: jJetInputAlgTool.h:44
test_pyathena.parent
parent
Definition: test_pyathena.py:15
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
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
GlobalSim::jJetInputAlgTool::s_Et_conversion
static constexpr int s_Et_conversion
Definition: jJetInputAlgTool.h:52
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
GlobalSim::jJetInputAlgTool::s_phiDouble_conversion
static constexpr double s_phiDouble_conversion
Definition: jJetInputAlgTool.h:54
TSU::toTopoPhi
unsigned int toTopoPhi(float phi)
Definition: Conversions.cxx:20