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

#include <cTauInputAlgTool.h>

Inheritance diagram for GlobalSim::cTauInputAlgTool:
Collaboration diagram for GlobalSim::cTauInputAlgTool:

Public Member Functions

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

Private Member Functions

StatusCode jFex_cTaus (GlobalSim::cTauTOBArray &, const EventContext &) const
 
StatusCode eFex_cTaus (GlobalSim::cTauTOBArray &, const EventContext &) const
 

Private Attributes

SG::ReadHandleKey< xAOD::jFexTauRoIContainerm_jTauRoIKey
 
SG::WriteHandleKey< GlobalSim::cTauTOBArraym_cTauTOBArrayWriteKey
 
SG::ReadHandleKey< xAOD::eFexTauRoIContainerm_eTauRoIKey {this, "eTauRoIKey", "L1_eTauRoI", "eFex eTau container key"}
 

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 31 of file cTauInputAlgTool.h.

Constructor & Destructor Documentation

◆ cTauInputAlgTool()

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

Definition at line 16 of file cTauInputAlgTool.cxx.

18  :
19  base_class(type, name, parent){
20  }

◆ ~cTauInputAlgTool()

virtual GlobalSim::cTauInputAlgTool::~cTauInputAlgTool ( )
virtualdefault

Member Function Documentation

◆ eFex_cTaus()

StatusCode GlobalSim::cTauInputAlgTool::eFex_cTaus ( GlobalSim::cTauTOBArray cTaus,
const EventContext &  ctx 
) const
private

Definition at line 45 of file cTauInputAlgTool.cxx.

46  {
47 
49  eTauContainer(m_eTauRoIKey, ctx);
50 
51  CHECK(eTauContainer.isValid());
52 
53  for(const auto eFexTauRoI : *eTauContainer){
54 
55 
56  /*
57  * eFexNumber() : 8 bit unsigned integer eFEX number
58  * et() : et value of the Tau cluster in MeV
59  * etTOB() : et value of the Tau cluster in units of 100 MeV
60  * eta() : floating point global eta
61  * phi() : floating point global phi
62  * iEtaTopo() : 40 x eta (custom function for L1Topo)
63  * iPhiTopo() : 20 x phi (custom function for L1Topo)
64  * tauOneThresholds() : rCore or BDT working point
65  * (eTau algo agnostic accessor)
66  * tauTwoThresholds() : rHad
67  */
68 
69  ATH_MSG_DEBUG( "EDM eFex Number: "
71  << " et: "
72  << eFexTauRoI->et()
73  << " etTOB: "
74  << eFexTauRoI->etTOB()
75  << " eta: "
76  << eFexTauRoI->eta()
77  << " phi: "
78  << eFexTauRoI->phi()
79  << " iEtaTopo: "
80  << eFexTauRoI->iEtaTopo()
81  << " iPhiTopo: "
82  << eFexTauRoI->iPhiTopo()
83  << " rCore: "
85  << " rHad: "
87  );
88 
89 
90  unsigned int EtTopo = eFexTauRoI->etTOB();
91  int etaTopo = eFexTauRoI->iEtaTopo();
92  int phiTopo = eFexTauRoI->iPhiTopo();
93  unsigned int rCore = eFexTauRoI->tauOneThresholds();
94  unsigned int rHad = eFexTauRoI->tauTwoThresholds();
95 
96  //Tau TOB
97  TCS::eTauTOB eTau(EtTopo,
98  etaTopo,
99  static_cast<unsigned int>(phiTopo),
100  TCS::ETAU);
101 
102  eTau.setEtDouble(static_cast<double>(EtTopo * s_EtDouble_conversion));
103  eTau.setEtaDouble(static_cast<double>(etaTopo * s_etaDouble_conversion));
104  eTau.setPhiDouble(static_cast<double>(phiTopo * s_phiDouble_conversion));
105  eTau.setRCore(rCore);
106  eTau.setRHad(rHad);
107 
108  TCS::cTauTOB cTau(eTau.Et(), eTau.eta(), eTau.phi(), TCS::ETAU);
109  cTau.setEtDouble( eTau.EtDouble() );
110  cTau.setEtaDouble( eTau.etaDouble() );
111  cTau.setPhiDouble( eTau.phiDouble() );
112  cTau.setRCore( eTau.rCore() );
113  cTau.setRHad( eTau.rHad() );
114 
115  cTaus.push_back(cTau);
116  }
117  return StatusCode::SUCCESS;
118  }

◆ initialize()

StatusCode GlobalSim::cTauInputAlgTool::initialize ( )
override

Definition at line 22 of file cTauInputAlgTool.cxx.

22  {
23  CHECK(m_eTauRoIKey.initialize());
24  CHECK(m_jTauRoIKey.initialize());
26 
27  return StatusCode::SUCCESS;
28  }

◆ jFex_cTaus()

StatusCode GlobalSim::cTauInputAlgTool::jFex_cTaus ( GlobalSim::cTauTOBArray cTaus,
const EventContext &  ctx 
) const
private

Definition at line 120 of file cTauInputAlgTool.cxx.

121  {
122 
124  jTauRoIContainer(m_jTauRoIKey, ctx);
125 
126  CHECK(jTauRoIContainer.isValid());
127 
128 
129  for(const auto jFexTauRoI : *jTauRoIContainer){
130 
131 
132  /*
133  * jFexNumber() 8 bit unsigned integer jFEX number
134  * et() et value of the Tau cluster in MeV
135  * tobEt() et value of the Tau cluster in units of 200 MeV
136  * globalEta() simplified global eta in units of 0.1
137  * (fcal straightened out, not suitable for use
138  * in L1TopoSim)
139  * globalPhi() simplified global phi in units of 0.1
140  * (fcal straightened out,
141  * not suitable for use in L1TopoSim)
142  * isolation isolation value in units of 200 MeV
143  */
144 
145  ATH_MSG_DEBUG( "EDM jFex Number: "
146  << jFexTauRoI->jFexNumber()
147  << " et: "
148  << jFexTauRoI->et()
149  << " topEt: "
150  << jFexTauRoI->tobEt()
151  << " globalEta: "
152  << jFexTauRoI->globalEta()
153  << " globalPhi: "
154  << jFexTauRoI->globalPhi()
155  << " isolation: "
156  << jFexTauRoI->tobIso()
157  );
158 
159 
160  unsigned int EtTopo = jFexTauRoI->tobEt() * s_Et_conversion;
161  unsigned int phiTopo = TSU::toTopoPhi(jFexTauRoI->phi());
162  int etaTopo = TSU::toTopoEta(jFexTauRoI->eta());
163  unsigned int isolation = jFexTauRoI->tobIso() * s_Et_conversion;
164 
165  if (EtTopo == 0) {continue;}
166 
167  TCS::jTauTOB jTau(EtTopo, etaTopo, phiTopo);
168  jTau.setEtDouble(static_cast<double>(EtTopo * s_EtDouble_conversion));
169  jTau.setEtaDouble(static_cast<double>(etaTopo * s_etaDouble_conversion));
170  jTau.setPhiDouble(static_cast<double>(phiTopo * s_phiDouble_conversion));
171  jTau.setEtIso(isolation);
172 
173  TCS::cTauTOB cTau(jTau.Et(), jTau.eta(), jTau.phi(), TCS::JTAU);
174  cTau.setEtDouble( jTau.EtDouble() );
175  cTau.setEtaDouble( jTau.etaDouble() );
176  cTau.setPhiDouble( jTau.phiDouble() );
177  cTau.setEtIso( jTau.EtIso() );
178  cTaus.push_back(cTau);
179  }
180  return StatusCode::SUCCESS;
181 
182  }

◆ run()

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

Definition at line 30 of file cTauInputAlgTool.cxx.

30  {
31 
32  auto cTaus = std::make_unique<GlobalSim::cTauTOBArray>("InputcTaus", 120);
33 
34  CHECK(eFex_cTaus(*cTaus, ctx));
35  CHECK(jFex_cTaus(*cTaus, ctx));
36 
38  ctx);
39  CHECK(h_write.record(std::move(cTaus)));
40 
41  return StatusCode::SUCCESS;
42  }

◆ toString()

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

Definition at line 184 of file cTauInputAlgTool.cxx.

184  {
185  std::stringstream ss;
186  ss << "cTauInputAlgTool: '" << name() << '\n'
187  << m_jTauRoIKey << '\n'
188  << m_eTauRoIKey << '\n'
189  << m_cTauTOBArrayWriteKey << '\n';
190  return ss.str();
191  }

Member Data Documentation

◆ m_cTauTOBArrayWriteKey

SG::WriteHandleKey<GlobalSim::cTauTOBArray> GlobalSim::cTauInputAlgTool::m_cTauTOBArrayWriteKey
private
Initial value:
{this, "TOBArrayWriteKey", "",
"key to write out a cTauTOBArray"}

Definition at line 57 of file cTauInputAlgTool.h.

◆ m_eTauRoIKey

SG::ReadHandleKey<xAOD::eFexTauRoIContainer> GlobalSim::cTauInputAlgTool::m_eTauRoIKey {this, "eTauRoIKey", "L1_eTauRoI", "eFex eTau container key"}
private

Definition at line 61 of file cTauInputAlgTool.h.

◆ m_jTauRoIKey

SG::ReadHandleKey<xAOD::jFexTauRoIContainer> GlobalSim::cTauInputAlgTool::m_jTauRoIKey
private
Initial value:
{this, "jTauRoIKey", "L1_jFexTauRoI",
"jFex jTau container key"}

Definition at line 53 of file cTauInputAlgTool.h.

◆ s_Et_conversion

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

Definition at line 64 of file cTauInputAlgTool.h.

◆ s_etaDouble_conversion

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

Definition at line 69 of file cTauInputAlgTool.h.

◆ s_EtDouble_conversion

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

Definition at line 67 of file cTauInputAlgTool.h.

◆ s_phiDouble_conversion

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

Definition at line 68 of file cTauInputAlgTool.h.


The documentation for this class was generated from the following files:
xAOD::eFexTauRoI_v1::iEtaTopo
int iEtaTopo() const
Getter for integer phi index (0-63)
Definition: eFexTauRoI_v1.cxx:284
xAOD::eFexTauRoI_v1::et
float et() const
TOB ET (decoded from TOB, stored for convenience)
GlobalSim::cTauInputAlgTool::m_jTauRoIKey
SG::ReadHandleKey< xAOD::jFexTauRoIContainer > m_jTauRoIKey
Definition: cTauInputAlgTool.h:53
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
xAOD::jFexTauRoI_v1::eta
float eta() const
xAOD::jFexTauRoI_v1::jFexNumber
uint8_t jFexNumber() const
xAOD::eFexTauRoI_v1::eta
float eta() const
setter for the above
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
xAOD::eFexTauRoI_v1::tauTwoThresholds
unsigned int tauTwoThresholds() const
Tau Condition 2 (generic) results.
Definition: eFexTauRoI_v1.cxx:209
GlobalSim::cTauInputAlgTool::s_EtDouble_conversion
static constexpr double s_EtDouble_conversion
Definition: cTauInputAlgTool.h:67
TSU::toTopoEta
int toTopoEta(float eta)
Definition: Conversions.cxx:27
xAOD::jFexTauRoI_v1::globalPhi
uint globalPhi() const
xAOD::jFexTauRoI_v1::tobIso
uint16_t tobIso() const
GlobalSim::cTauInputAlgTool::m_cTauTOBArrayWriteKey
SG::WriteHandleKey< GlobalSim::cTauTOBArray > m_cTauTOBArrayWriteKey
Definition: cTauInputAlgTool.h:57
xAOD::jFexTauRoI_v1::globalEta
int globalEta() const
xAOD::jFexTauRoI_v1::et
unsigned int et() const
Methods that require combining results or applying scales.
Definition: jFexTauRoI_v1.cxx:114
xAOD::eFexTauRoI
eFexTauRoI_v1 eFexTauRoI
Define the latest version of the eFexTauRoI class.
Definition: eFexTauRoI.h:16
GlobalSim::cTauInputAlgTool::jFex_cTaus
StatusCode jFex_cTaus(GlobalSim::cTauTOBArray &, const EventContext &) const
Definition: cTauInputAlgTool.cxx:120
xAOD::eFexTauRoI_v1::tauOneThresholds
unsigned int tauOneThresholds() const
Tau Condition 1 (generic) results.
Definition: eFexTauRoI_v1.cxx:205
GlobalSim::cTauInputAlgTool::s_etaDouble_conversion
static constexpr double s_etaDouble_conversion
Definition: cTauInputAlgTool.h:69
xAOD::eFexTauRoI_v1::iPhiTopo
int iPhiTopo() const
Return phi index in the range used by L1Topo (0->127)
Definition: eFexTauRoI_v1.cxx:276
xAOD::jFexTauRoI_v1::tobEt
uint16_t tobEt() const
TCS::eTauTOB
Definition: eTauTOB.h:13
GlobalSim::cTauInputAlgTool::eFex_cTaus
StatusCode eFex_cTaus(GlobalSim::cTauTOBArray &, const EventContext &) const
Definition: cTauInputAlgTool.cxx:45
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
TCS::jTauTOB
Definition: jTauTOB.h:16
GlobalSim::cTauInputAlgTool::s_Et_conversion
static constexpr int s_Et_conversion
Definition: cTauInputAlgTool.h:64
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
xAOD::jFexTauRoI_v1::phi
float phi() const
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::cTauInputAlgTool::s_phiDouble_conversion
static constexpr double s_phiDouble_conversion
Definition: cTauInputAlgTool.h:68
xAOD::eFexTauRoI_v1::phi
float phi() const
Seed supercell index within central tower (0 -> 3)
xAOD::eFexTauRoI_v1::eFexNumber
unsigned int eFexNumber() const
eFEX number
Definition: eFexTauRoI_v1.cxx:118
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
GlobalSim::cTauInputAlgTool::m_eTauRoIKey
SG::ReadHandleKey< xAOD::eFexTauRoIContainer > m_eTauRoIKey
Definition: cTauInputAlgTool.h:61
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
xAOD::eFexTauRoI_v1::etTOB
unsigned int etTOB() const
Cluster ET (TOB ET scale, 100 MeV/count)
Definition: eFexTauRoI_v1.cxx:159
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TCS::ETAU
@ ETAU
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:22
xAOD::jFexTauRoI
jFexTauRoI_v1 jFexTauRoI
Define the latest version of the jFexSRJetRoI class
Definition: jFexTauRoI.h:13
TCS::DataArrayImpl::push_back
virtual void push_back(const DATA &tob)
Definition: DataArrayImpl.h:57
TCS::JTAU
@ JTAU
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:13
TCS::cTauTOB
Definition: cTauTOB.h:13
TSU::toTopoPhi
unsigned int toTopoPhi(float phi)
Definition: Conversions.cxx:20