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

#include <eEmInputAlgTool.h>

Inheritance diagram for GlobalSim::eEmInputAlgTool:
Collaboration diagram for GlobalSim::eEmInputAlgTool:

Public Member Functions

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

Private Attributes

SG::ReadHandleKey< xAOD::eFexEMRoIContainerm_eEmRoIKey {this, "eFexEMRoIKey", "L1_eEMRoI", "eFEXEM EDM"}
 
SG::WriteHandleKey< GlobalSim::eEmTOBArraym_eEmTOBArrayWriteKey
 

Static Private Attributes

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 eEmInputAlgTool.h.

Constructor & Destructor Documentation

◆ eEmInputAlgTool()

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

Definition at line 12 of file eEmInputAlgTool.cxx.

14  :
15  base_class(type, name, parent){
16  }

◆ ~eEmInputAlgTool()

virtual GlobalSim::eEmInputAlgTool::~eEmInputAlgTool ( )
virtualdefault

Member Function Documentation

◆ initialize()

StatusCode GlobalSim::eEmInputAlgTool::initialize ( )
override

Definition at line 18 of file eEmInputAlgTool.cxx.

18  {
19  CHECK(m_eEmRoIKey.initialize());
21 
22  return StatusCode::SUCCESS;
23  }

◆ run()

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

Definition at line 25 of file eEmInputAlgTool.cxx.

25  {
27  eEmRoIontainer(m_eEmRoIKey, ctx);
28 
29  CHECK(eEmRoIontainer.isValid());
30 
31  auto eEms = std::make_unique<GlobalSim::eEmTOBArray>("InputeEms", 60);
32  for(const auto eFexRoI : *eEmRoIontainer){
33 
34 
35  /*
36  * eFexNumber() : 8 bit unsigned integer eFEX number
37  * et() : et value of the EM cluster in MeV
38  * etTOB() : et value of the EM cluster in units of 100 MeV
39  * eta() : floating point global eta
40  * phi() : floating point global phi
41  * iEtaTopo() : 40 x eta (custom function for L1Topo)
42  * iPhiTopo() : 20 x phi (custom function for L1Topo)
43  * RetaThresholds() : jet disc 1
44  * RhadThresholds() : jet disc 2
45  * WstotThresholds() : jet disc 3
46  */
47 
48  ATH_MSG_DEBUG( "EDM eFex Number: "
49  << eFexRoI->eFexNumber()
50  << " et: "
51  << eFexRoI->et()
52  << " etTOB: "
53  << eFexRoI->etTOB()
54  << " eta: "
55  << eFexRoI->eta()
56  << " phi: "
57  << eFexRoI->phi()
58  << " iEtaTopo: "
59  << eFexRoI->iEtaTopo()
60  << " iPhiTopo: "
61  << eFexRoI->iPhiTopo()
62  << " reta: "
63  << eFexRoI->RetaThresholds()
64  << " rhad: "
65  << eFexRoI->RhadThresholds()
66  << " wstot: "
67  << eFexRoI->WstotThresholds()
68  );
69 
70 
71  unsigned int EtTopo = eFexRoI->etTOB();
72  int etaTopo = eFexRoI->iEtaTopo();
73  int phiTopo = eFexRoI->iPhiTopo();
74  unsigned int reta = eFexRoI->RetaThresholds();
75  unsigned int rhad = eFexRoI->RhadThresholds();
76  unsigned int wstot = eFexRoI->WstotThresholds();
77 
78  //Em TOB
79  TCS::eEmTOB eem(EtTopo, etaTopo, static_cast<unsigned int>(phiTopo), TCS::EEM , static_cast<long int>(eFexRoI->word0()));
80  eem.setEtDouble(static_cast<double>(EtTopo * s_EtDouble_conversion));
81  eem.setEtaDouble(static_cast<double>(etaTopo * s_etaDouble_conversion));
82  eem.setPhiDouble(static_cast<double>(phiTopo * s_phiDouble_conversion));
83  eem.setReta(reta);
84  eem.setRhad(rhad);
85  eem.setWstot(wstot);
86 
87  eEms->push_back(eem);
88  }
89 
91  ctx);
92  CHECK(h_write.record(std::move(eEms)));
93 
94  return StatusCode::SUCCESS;
95  }

◆ toString()

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

Definition at line 97 of file eEmInputAlgTool.cxx.

97  {
98  std::stringstream ss;
99  ss << "eEmInputAlgTool: name" << name() << '\n'
100  << m_eEmRoIKey << '\n'
101  << m_eEmTOBArrayWriteKey << '\n';
102  return ss.str();
103  }

Member Data Documentation

◆ m_eEmRoIKey

SG::ReadHandleKey<xAOD::eFexEMRoIContainer> GlobalSim::eEmInputAlgTool::m_eEmRoIKey {this, "eFexEMRoIKey", "L1_eEMRoI", "eFEXEM EDM"}
private

Definition at line 45 of file eEmInputAlgTool.h.

◆ m_eEmTOBArrayWriteKey

SG::WriteHandleKey<GlobalSim::eEmTOBArray> GlobalSim::eEmInputAlgTool::m_eEmTOBArrayWriteKey
private
Initial value:
{this, "TOBArrayWriteKey", "",
"key to write out an eEmTOBArray"}

Definition at line 48 of file eEmInputAlgTool.h.

◆ s_etaDouble_conversion

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

Definition at line 53 of file eEmInputAlgTool.h.

◆ s_EtDouble_conversion

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

Definition at line 51 of file eEmInputAlgTool.h.

◆ s_phiDouble_conversion

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

Definition at line 52 of file eEmInputAlgTool.h.


The documentation for this class was generated from the following files:
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
xAOD::wstot
setEt setPhi setE277 setWeta2 setEta1 setE2tsts1 wstot
Definition: TrigEMCluster_v1.cxx:49
GlobalSim::eEmInputAlgTool::m_eEmTOBArrayWriteKey
SG::WriteHandleKey< GlobalSim::eEmTOBArray > m_eEmTOBArrayWriteKey
Definition: eEmInputAlgTool.h:48
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TCS::eEmTOB
Definition: eEmTOB.h:13
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::eEmInputAlgTool::s_phiDouble_conversion
static constexpr double s_phiDouble_conversion
Definition: eEmInputAlgTool.h:52
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
GlobalSim::eEmInputAlgTool::m_eEmRoIKey
SG::ReadHandleKey< xAOD::eFexEMRoIContainer > m_eEmRoIKey
Definition: eEmInputAlgTool.h:45
GlobalSim::eEmInputAlgTool::s_EtDouble_conversion
static constexpr double s_EtDouble_conversion
Definition: eEmInputAlgTool.h:51
GlobalSim::eEmInputAlgTool::s_etaDouble_conversion
static constexpr double s_etaDouble_conversion
Definition: eEmInputAlgTool.h:53
TCS::EEM
@ EEM
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:21