ATLAS Offline Software
Loading...
Searching...
No Matches
LVL1::gFexInputProvider Class Reference

#include <gFexInputProvider.h>

Inheritance diagram for LVL1::gFexInputProvider:
Collaboration diagram for LVL1::gFexInputProvider:

Public Member Functions

 gFexInputProvider (const std::string &type, const std::string &name, const IInterface *parent)
virtual ~gFexInputProvider ()=default
virtual StatusCode initialize () override final
virtual StatusCode fillTopoInputEvent (TCS::TopoInputEvent &) const override final

Private Member Functions

StatusCode fillSRJet (TCS::TopoInputEvent &inputEvent) const
StatusCode fillLRJet (TCS::TopoInputEvent &inputEvent) const
StatusCode fillXEJWOJ (TCS::TopoInputEvent &inputEvent) const
StatusCode fillMHT (TCS::TopoInputEvent &inputEvent) const
StatusCode fillXENC (TCS::TopoInputEvent &inputEvent) const
StatusCode fillXERHO (TCS::TopoInputEvent &inputEvent) const
StatusCode fillTE (TCS::TopoInputEvent &inputEvent) const
StatusCode fillGESPRESSO (TCS::TopoInputEvent &inputEvent) const
StatusCode fillGRISTRETTO (TCS::TopoInputEvent &inputEvent) const

Private Attributes

ToolHandle< GenericMonitoringToolm_monTool {this, "MonTool", "", "Monitoring tool to create online histograms"}
SG::ReadHandleKey< xAOD::gFexJetRoIContainerm_gJet_EDMKey {this, "gFexSRJetRoIKey", "L1_gFexSRJetRoI", "gFEX Jet EDM"}
SG::ReadHandleKey< xAOD::gFexJetRoIContainerm_gLJet_EDMKey {this, "gFexLRJetRoIKey", "L1_gFexLRJetRoI", "gFEX LJet EDM"}
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainerm_gXEJWOJ_EDMKey {this, "gMETComponentsJwojKey", "L1_gMETComponentsJwoj", "gFEX XEJWOJ EDM"}
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainerm_gMHT_EDMKey {this,"gMHTComponentsJwojKey", "L1_gMHTComponentsJwoj", "gFEX MHT EDM"}
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainerm_gXENC_EDMKey {this, "gMETComponentsNoiseCutKey", "L1_gMETComponentsNoiseCut", "gFEX XENC EDM"}
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainerm_gXERHO_EDMKey {this, "gMETComponentsRmsKey", "L1_gMETComponentsRms", "gFEX RHO ROI EDM"}
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainerm_gTE_EDMKey {this, "gScalarEJwojKey", "L1_gScalarEJwoj", "gFEX TE EDM"}
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainerm_gESPRESSO_EDMKey {this, "gEspressoKey", "L1_gEspresso", "gFEX gESPRESSO EDM"}
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainerm_gRISTRETTO_EDMKey {this, "gRistrettoKey", "L1_gRistretto", "gFEX gRISTRETTO EDM"}

Static Private Attributes

static const int m_EtJet_conversion = 2
static const double m_EtGlobal_conversion = 0.01
static const int m_phi_conversion = 1
static const int m_eta_conversion = 40
static const double m_EtDoubleJet_conversion = 0.1
static const double m_EtDoubleGlobal_conversion = 0.1
static const double m_phiDouble_conversion = 0.05
static const double m_etaDouble_conversion = 0.025

Detailed Description

Definition at line 19 of file gFexInputProvider.h.

Constructor & Destructor Documentation

◆ gFexInputProvider()

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

Definition at line 31 of file gFexInputProvider.cxx.

32 :
33 base_class(type, name, parent)
34{
35 declareInterface<LVL1::IInputTOBConverter>( this );
36}

◆ ~gFexInputProvider()

virtual LVL1::gFexInputProvider::~gFexInputProvider ( )
virtualdefault

Member Function Documentation

◆ fillGESPRESSO()

StatusCode gFexInputProvider::fillGESPRESSO ( TCS::TopoInputEvent & inputEvent) const
private

Definition at line 412 of file gFexInputProvider.cxx.

412 {
413 if (m_gESPRESSO_EDMKey.empty()) {
414 ATH_MSG_DEBUG("gFex ESPRESSO input disabled, skip filling");
415 return StatusCode::SUCCESS;
416 }
417
418 SG::ReadHandle<xAOD::gFexGlobalRoIContainer> gESPRESSO_EDM(m_gESPRESSO_EDMKey);
419 if (! gESPRESSO_EDM.isValid() ) {
420 //gESPRESSO is only active in HI runs and only available from data. If not present simply skip it.
421 ATH_MSG_DEBUG("gFex ESPRESSO input is not available, skip filling");
422 return StatusCode::SUCCESS;
423 }
424
425 for(const xAOD::gFexGlobalRoI* gFexRoI : * gESPRESSO_EDM) {
426
427 auto globalType = gFexRoI->globalType();
428 if ( globalType != 1 ) { continue; } // 1 = scalar values (MET, SumET)
429
430 ATH_MSG_DEBUG( "EDM gFex ESPRESSO type: "
431 << gFexRoI->globalType()
432 << " sumEt: "
433 << gFexRoI->METquantityTwo() // returns sumEt in MeV
434 );
435
436 unsigned int sumEtTopo = gFexRoI->METquantityTwo()*m_EtGlobal_conversion;
437
438 TCS::gTETOB gespresso( sumEtTopo, TCS::GESPRESSO );
439
440 gespresso.setSumEtDouble( static_cast<double>(sumEtTopo*m_EtDoubleGlobal_conversion) );
441
442 inputEvent.setgESPRESSO( gespresso );
443 auto mon_h_gTEsumEt = Monitored::Scalar("gESPRESSOsumEt", gespresso.sumEtDouble());
444 Monitored::Group(m_monTool, mon_h_gTEsumEt);
445
446 }
447
448 return StatusCode::SUCCESS;
449}
#define ATH_MSG_DEBUG(x)
static const double m_EtGlobal_conversion
static const double m_EtDoubleGlobal_conversion
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_gESPRESSO_EDMKey
ToolHandle< GenericMonitoringTool > m_monTool
StatusCode setgESPRESSO(const gTETOB &gESPRESSO)
gFexGlobalRoI_v1 gFexGlobalRoI
Define the latest version of the eFexEMRoI class.

◆ fillGRISTRETTO()

StatusCode gFexInputProvider::fillGRISTRETTO ( TCS::TopoInputEvent & inputEvent) const
private

Definition at line 452 of file gFexInputProvider.cxx.

452 {
453 if (m_gRISTRETTO_EDMKey.empty()) {
454 ATH_MSG_DEBUG("gFex RISTRETTO input disabled, skip filling");
455 return StatusCode::SUCCESS;
456 }
457
458 SG::ReadHandle<xAOD::gFexGlobalRoIContainer> gRISTRETTO_EDM(m_gRISTRETTO_EDMKey);
459 if (! gRISTRETTO_EDM.isValid() ) {
460 //gRISTRETTO is only active in HI runs and only available from data. If not present simply skip it.
461 ATH_MSG_DEBUG("gFex RISTRETTO input is not available, skip filling");
462 return StatusCode::SUCCESS;
463 }
464
465 for(const xAOD::gFexGlobalRoI* gFexRoI : * gRISTRETTO_EDM) {
466
467 auto globalType = gFexRoI->globalType();
468 if ( globalType != 1 ) { continue; } // 1 = scalar values (MET, SumET)
469
470 ATH_MSG_DEBUG( "EDM gFex RISTRETTO type: "
471 << gFexRoI->globalType()
472 << " sumEt: "
473 << gFexRoI->METquantityTwo() // returns sumEt in MeV
474 );
475
476 unsigned int sumEtTopo = gFexRoI->METquantityTwo()*m_EtGlobal_conversion;
477
478 TCS::gTETOB gristretto( sumEtTopo, TCS::GRISTRETTO );
479
480 gristretto.setSumEtDouble( static_cast<double>(sumEtTopo*m_EtDoubleGlobal_conversion) );
481
482 inputEvent.setgRISTRETTO( gristretto );
483 auto mon_h_gTEsumEt = Monitored::Scalar("gRISTRETTOsumEt", gristretto.sumEtDouble());
484 Monitored::Group(m_monTool, mon_h_gTEsumEt);
485
486 }
487
488 return StatusCode::SUCCESS;
489}
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_gRISTRETTO_EDMKey
StatusCode setgRISTRETTO(const gTETOB &gRISTRETTO)

◆ fillLRJet()

StatusCode gFexInputProvider::fillLRJet ( TCS::TopoInputEvent & inputEvent) const
private

Definition at line 120 of file gFexInputProvider.cxx.

120 {
121
122 if (m_gLJet_EDMKey.empty()) {
123 ATH_MSG_DEBUG("gFex LJet input disabled, skip filling");
124 return StatusCode::SUCCESS;
125 }
126
127 SG::ReadHandle<xAOD::gFexJetRoIContainer> gLJet_EDM(m_gLJet_EDMKey);
128 ATH_CHECK(gLJet_EDM.isValid());
129
130 for(const xAOD::gFexJetRoI* gFexRoI : * gLJet_EDM) {
131
132 auto jetType = gFexRoI->gFexType();
133 if ( jetType != 3 ) { continue; } // 3 = gFEX gJet (L1Topo gLJet)
134
135 ATH_MSG_DEBUG( "EDM gFex LJet type: "
136 << gFexRoI->gFexType()
137 << " Et: "
138 << gFexRoI->et() // returns the et value of the jet in units of MeV
139 << " gFexTobEt: "
140 << gFexRoI->gFexTobEt() // returns the et value of the jet in units of 200 MeV
141 << " eta: "
142 << gFexRoI->eta() // returns a floating point eta corresponding to the center of the tower (fixed values, defined in gFexJetRoI_v1.cxx)
143 << " phi: "
144 << gFexRoI->phi() // returns a floating point phi corresponding to the center of the tower
145 << " iPhiTopo: "
146 << gFexRoI->iPhiTopo() // returns an integer phi from 0 to 127
147 );
148
149 unsigned int EtTopo = gFexRoI->gFexTobEt()*m_EtJet_conversion;
150 unsigned int phiTopo = gFexRoI->iPhiTopo()*m_phi_conversion;
151 int etaTopo = static_cast<int>(gFexRoI->eta()*m_eta_conversion);
152
153 TCS::gLJetTOB gJet( EtTopo, etaTopo, phiTopo );
154
155 gJet.setEtDouble( static_cast<double>(EtTopo*m_EtDoubleJet_conversion) );
156 gJet.setEtaDouble( static_cast<double>(etaTopo*m_etaDouble_conversion) );
157 gJet.setPhiDouble( static_cast<double>(phiTopo*m_phiDouble_conversion) );
158
159 inputEvent.addgLJet( gJet );
160 auto mon_h_gLJetPt = Monitored::Scalar("gLJetTOBPt", gJet.EtDouble());
161 auto mon_h_gLJetPhi = Monitored::Scalar("gLJetTOBPhi", gJet.phi());
162 auto mon_h_gLJetEta = Monitored::Scalar("gLJetTOBEta", gJet.eta());
163 Monitored::Group(m_monTool, mon_h_gLJetPt, mon_h_gLJetPhi, mon_h_gLJetEta);
164
165 }
166
167 return StatusCode::SUCCESS;
168
169}
#define ATH_CHECK
Evaluate an expression and check for errors.
static const double m_phiDouble_conversion
static const double m_EtDoubleJet_conversion
static const int m_EtJet_conversion
static const int m_eta_conversion
static const int m_phi_conversion
static const double m_etaDouble_conversion
SG::ReadHandleKey< xAOD::gFexJetRoIContainer > m_gLJet_EDMKey
StatusCode addgLJet(const gLJetTOB &jet)
gFexJetRoI_v1 gFexJetRoI
Define the latest version of the gFexJetRoI class.
Definition gFexJetRoI.h:16

◆ fillMHT()

StatusCode gFexInputProvider::fillMHT ( TCS::TopoInputEvent & inputEvent) const
private

Definition at line 225 of file gFexInputProvider.cxx.

225 {
226
227 if (m_gMHT_EDMKey.empty()) {
228 ATH_MSG_DEBUG("gFex MHT input disabled, skip filling");
229 return StatusCode::SUCCESS;
230 }
231
232 SG::ReadHandle<xAOD::gFexGlobalRoIContainer> gMHT_EDM(m_gMHT_EDMKey);
233 ATH_CHECK(gMHT_EDM.isValid());
234
235 for(const xAOD::gFexGlobalRoI* gFexRoI : * gMHT_EDM) {
236
237 auto globalType = gFexRoI->globalType();
238 if ( globalType != 3 ) { continue; } // 3 = MET hard term components (MHTx, MHTy)
239
240 ATH_MSG_DEBUG( "EDM gFex MHT type: "
241 << gFexRoI->globalType()
242 << " Ex: "
243 << gFexRoI->METquantityOne() // returns the Ex component in MeV
244 << " Ey: "
245 << gFexRoI->METquantityTwo() // returns the Ey component in MeV
246 );
247
248 int ExTopo = gFexRoI->METquantityOne()*m_EtGlobal_conversion;
249 int EyTopo = gFexRoI->METquantityTwo()*m_EtGlobal_conversion;
250
251 unsigned long long ExTopoLong = static_cast<unsigned long long>(ExTopo);
252 unsigned long long EyTopoLong = static_cast<unsigned long long>(EyTopo);
253
254 unsigned long long Et2Topo = ExTopoLong*ExTopoLong + EyTopoLong*EyTopoLong;
255 unsigned int EtTopo = std::sqrt(Et2Topo);
256
257 TCS::gXETOB gxe( -ExTopo, -EyTopo, EtTopo, TCS::GMHT );
258
259 gxe.setExDouble( static_cast<double>(ExTopo*m_EtDoubleGlobal_conversion) );
260 gxe.setEyDouble( static_cast<double>(EyTopo*m_EtDoubleGlobal_conversion) );
261 gxe.setEtDouble( static_cast<double>(EtTopo*m_EtDoubleGlobal_conversion) );
262 gxe.setEt2( Et2Topo );
263
264 inputEvent.setgMHT( gxe );
265 auto mon_h_gMHTPt = Monitored::Scalar("gMHTTOBPt", gxe.EtDouble());
266 auto mon_h_gMHTPhi = Monitored::Scalar("gMHTTOBPhi", atan2(gxe.Ey(), gxe.Ex()));
267 Monitored::Group(m_monTool, mon_h_gMHTPt, mon_h_gMHTPhi);
268
269 }
270
271 return StatusCode::SUCCESS;
272
273}
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_gMHT_EDMKey
StatusCode setgMHT(const gXETOB &gMHT)

◆ fillSRJet()

StatusCode gFexInputProvider::fillSRJet ( TCS::TopoInputEvent & inputEvent) const
private

Definition at line 67 of file gFexInputProvider.cxx.

67 {
68
69 if (m_gJet_EDMKey.empty()) {
70 ATH_MSG_DEBUG("gFex Jet input disabled, skip filling");
71 return StatusCode::SUCCESS;
72 }
73
74 SG::ReadHandle<xAOD::gFexJetRoIContainer> gJet_EDM(m_gJet_EDMKey);
75 ATH_CHECK(gJet_EDM.isValid());
76
77 for(const xAOD::gFexJetRoI* gFexRoI : * gJet_EDM) {
78
79 auto jetType = gFexRoI->gFexType();
80 if ( jetType != 1 and jetType != 2 ) { continue; } // 1 = gFEX gBlockLead, 2 = gFEX gBlockSub (L1Topo gJet)
81
82 ATH_MSG_DEBUG( "EDM gFex Jet type: "
83 << gFexRoI->gFexType()
84 << " Et: "
85 << gFexRoI->et() // returns the et value of the jet in units of MeV
86 << " gFexTobEt: "
87 << gFexRoI->gFexTobEt() // returns the et value of the jet in units of 200 MeV
88 << " eta: "
89 << gFexRoI->eta() // returns a floating point eta corresponding to the center of the tower (fixed values, defined in gFexJetRoI_v1.cxx)
90 << " phi: "
91 << gFexRoI->phi() // returns a floating point phi corresponding to the center of the tower
92 << " iPhiTopo: "
93 << gFexRoI->iPhiTopo() // returns an integer phi from 0 to 127
94 );
95
96 unsigned int EtTopo = gFexRoI->gFexTobEt()*m_EtJet_conversion;
97 unsigned int phiTopo = gFexRoI->iPhiTopo()*m_phi_conversion;
98 int etaTopo = static_cast<int>(gFexRoI->eta()*m_eta_conversion);
99
100 TCS::gJetTOB gJet( EtTopo, etaTopo, phiTopo );
101
102 gJet.setEtDouble( static_cast<double>(EtTopo*m_EtDoubleJet_conversion) );
103 gJet.setEtaDouble( static_cast<double>(etaTopo*m_etaDouble_conversion) );
104 gJet.setPhiDouble( static_cast<double>(phiTopo*m_phiDouble_conversion) );
105
106 inputEvent.addgJet( gJet );
107 auto mon_h_gJetPt = Monitored::Scalar("gJetTOBPt", gJet.EtDouble());
108 auto mon_h_gJetPhi = Monitored::Scalar("gJetTOBPhi", gJet.phi());
109 auto mon_h_gJetEta = Monitored::Scalar("gJetTOBEta", gJet.eta());
110 Monitored::Group(m_monTool, mon_h_gJetPt, mon_h_gJetPhi, mon_h_gJetEta);
111
112 }
113
114 return StatusCode::SUCCESS;
115
116}
SG::ReadHandleKey< xAOD::gFexJetRoIContainer > m_gJet_EDMKey
StatusCode addgJet(const gJetTOB &jet)

◆ fillTE()

StatusCode gFexInputProvider::fillTE ( TCS::TopoInputEvent & inputEvent) const
private

Definition at line 374 of file gFexInputProvider.cxx.

374 {
375
376 if (m_gTE_EDMKey.empty()) {
377 ATH_MSG_DEBUG("gFex TE input disabled, skip filling");
378 return StatusCode::SUCCESS;
379 }
380
381 SG::ReadHandle<xAOD::gFexGlobalRoIContainer> gTE_EDM(m_gTE_EDMKey);
382 ATH_CHECK(gTE_EDM.isValid());
383
384 for(const xAOD::gFexGlobalRoI* gFexRoI : * gTE_EDM) {
385
386 auto globalType = gFexRoI->globalType();
387 if ( globalType != 1 ) { continue; } // 1 = scalar values (MET, SumET)
388
389 ATH_MSG_DEBUG( "EDM gFex TE type: "
390 << gFexRoI->globalType()
391 << " sumEt: "
392 << gFexRoI->METquantityTwo() // returns sumEt in MeV
393 );
394
395 unsigned int sumEtTopo = gFexRoI->METquantityTwo()*m_EtGlobal_conversion;
396
397 TCS::gTETOB gte( sumEtTopo, TCS::GTE );
398
399 gte.setSumEtDouble( static_cast<double>(sumEtTopo*m_EtDoubleGlobal_conversion) );
400
401 inputEvent.setgTE( gte );
402 auto mon_h_gTEsumEt = Monitored::Scalar("gTEsumEt", gte.sumEtDouble());
403 Monitored::Group(m_monTool, mon_h_gTEsumEt);
404
405 }
406
407 return StatusCode::SUCCESS;
408
409}
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_gTE_EDMKey
StatusCode setgTE(const gTETOB &gTE)

◆ fillTopoInputEvent()

StatusCode gFexInputProvider::fillTopoInputEvent ( TCS::TopoInputEvent & inputEvent) const
finaloverridevirtual

Definition at line 492 of file gFexInputProvider.cxx.

492 {
493 ATH_CHECK(fillSRJet(inputEvent));
494 ATH_CHECK(fillLRJet(inputEvent));
495
496 ATH_CHECK(fillXEJWOJ(inputEvent));
497 ATH_CHECK(fillMHT(inputEvent));
498 ATH_CHECK(fillXENC(inputEvent));
499 ATH_CHECK(fillXERHO(inputEvent));
500
501 ATH_CHECK(fillTE(inputEvent));
502 ATH_CHECK(fillGESPRESSO(inputEvent));
503 ATH_CHECK(fillGRISTRETTO(inputEvent));
504 return StatusCode::SUCCESS;
505}
StatusCode fillLRJet(TCS::TopoInputEvent &inputEvent) const
StatusCode fillXEJWOJ(TCS::TopoInputEvent &inputEvent) const
StatusCode fillSRJet(TCS::TopoInputEvent &inputEvent) const
StatusCode fillGRISTRETTO(TCS::TopoInputEvent &inputEvent) const
StatusCode fillGESPRESSO(TCS::TopoInputEvent &inputEvent) const
StatusCode fillXENC(TCS::TopoInputEvent &inputEvent) const
StatusCode fillTE(TCS::TopoInputEvent &inputEvent) const
StatusCode fillXERHO(TCS::TopoInputEvent &inputEvent) const
StatusCode fillMHT(TCS::TopoInputEvent &inputEvent) const

◆ fillXEJWOJ()

StatusCode gFexInputProvider::fillXEJWOJ ( TCS::TopoInputEvent & inputEvent) const
private

Definition at line 173 of file gFexInputProvider.cxx.

173 {
174
175 if (m_gXEJWOJ_EDMKey.empty()) {
176 ATH_MSG_DEBUG("gFex XEJWOJ input disabled, skip filling");
177 return StatusCode::SUCCESS;
178 }
179
180 SG::ReadHandle<xAOD::gFexGlobalRoIContainer> gXEJWOJ_EDM(m_gXEJWOJ_EDMKey);
181 ATH_CHECK(gXEJWOJ_EDM.isValid());
182
183 for(const xAOD::gFexGlobalRoI* gFexRoI : * gXEJWOJ_EDM) {
184
185 auto globalType = gFexRoI->globalType();
186 if ( globalType != 2 ) { continue; } // 2 = MET components (METx, METy)
187
188 ATH_MSG_DEBUG( "EDM gFex XEJWOJ type: "
189 << gFexRoI->globalType()
190 << " Ex: "
191 << gFexRoI->METquantityOne() // returns the Ex component in MeV
192 << " Ey: "
193 << gFexRoI->METquantityTwo() // returns the Ey component in MeV
194 );
195
196 int ExTopo = gFexRoI->METquantityOne()*m_EtGlobal_conversion;
197 int EyTopo = gFexRoI->METquantityTwo()*m_EtGlobal_conversion;
198
199 unsigned long long ExTopoLong = static_cast<unsigned long long>(ExTopo);
200 unsigned long long EyTopoLong = static_cast<unsigned long long>(EyTopo);
201
202 unsigned long long Et2Topo = ExTopoLong*ExTopoLong + EyTopoLong*EyTopoLong;
203 unsigned int EtTopo = std::sqrt(Et2Topo);
204
205 TCS::gXETOB gxe( -ExTopo, -EyTopo, EtTopo, TCS::GXEJWOJ );
206
207 gxe.setExDouble( static_cast<double>(ExTopo*m_EtDoubleGlobal_conversion) );
208 gxe.setEyDouble( static_cast<double>(EyTopo*m_EtDoubleGlobal_conversion) );
209 gxe.setEtDouble( static_cast<double>(EtTopo*m_EtDoubleGlobal_conversion) );
210 gxe.setEt2( Et2Topo );
211
212 inputEvent.setgXEJWOJ( gxe );
213 auto mon_h_gXEJWOJPt = Monitored::Scalar("gXEJWOJTOBPt", gxe.EtDouble());
214 auto mon_h_gXEJWOJPhi = Monitored::Scalar("gXEJWOJTOBPhi", atan2(gxe.Ey(), gxe.Ex()));
215 Monitored::Group(m_monTool, mon_h_gXEJWOJPt, mon_h_gXEJWOJPhi);
216
217 }
218
219 return StatusCode::SUCCESS;
220
221}
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_gXEJWOJ_EDMKey
StatusCode setgXEJWOJ(const gXETOB &gXEJWOJ)

◆ fillXENC()

StatusCode gFexInputProvider::fillXENC ( TCS::TopoInputEvent & inputEvent) const
private

Definition at line 277 of file gFexInputProvider.cxx.

277 {
278
279 if (m_gXENC_EDMKey.empty()) {
280 ATH_MSG_DEBUG("gFex XENC input disabled, skip filling");
281 return StatusCode::SUCCESS;
282 }
283
284 SG::ReadHandle<xAOD::gFexGlobalRoIContainer> gXENC_EDM(m_gXENC_EDMKey);
285 ATH_CHECK(gXENC_EDM.isValid());
286
287 for(const xAOD::gFexGlobalRoI* gFexRoI : * gXENC_EDM) {
288
289 ATH_MSG_DEBUG( "EDM gFex XENC type: "
290 << gFexRoI->globalType()
291 << " Ex: "
292 << gFexRoI->METquantityOne() // returns the Ex component in MeV
293 << " Ey: "
294 << gFexRoI->METquantityTwo() // returns the Ey component in MeV
295 );
296
297 int ExTopo = gFexRoI->METquantityOne()*m_EtGlobal_conversion;
298 int EyTopo = gFexRoI->METquantityTwo()*m_EtGlobal_conversion;
299
300 //Cast the Ex and Ey to longs to perform multiplication that is safe wrt. overflows
301 unsigned long long ExTopoLong = static_cast<unsigned long long>(ExTopo);
302 unsigned long long EyTopoLong = static_cast<unsigned long long>(EyTopo);
303
304 unsigned long long Et2Topo = ExTopoLong*ExTopoLong + EyTopoLong*EyTopoLong;
305 unsigned int EtTopo = std::sqrt(Et2Topo);
306
307 TCS::gXETOB gxe( -ExTopo, -EyTopo, EtTopo, TCS::GXENC );
308
309 gxe.setExDouble( static_cast<double>(ExTopo*m_EtDoubleGlobal_conversion) );
310 gxe.setEyDouble( static_cast<double>(EyTopo*m_EtDoubleGlobal_conversion) );
311 gxe.setEtDouble( static_cast<double>(EtTopo*m_EtDoubleGlobal_conversion) );
312 gxe.setEt2( Et2Topo );
313
314 inputEvent.setgXENC( gxe );
315 auto mon_h_gXENCPt = Monitored::Scalar("gXENCTOBPt", gxe.EtDouble());
316 Monitored::Group(m_monTool, mon_h_gXENCPt);
317
318 }
319
320 return StatusCode::SUCCESS;
321
322}
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_gXENC_EDMKey
StatusCode setgXENC(const gXETOB &gXENC)

◆ fillXERHO()

StatusCode gFexInputProvider::fillXERHO ( TCS::TopoInputEvent & inputEvent) const
private

Definition at line 326 of file gFexInputProvider.cxx.

326 {
327
328 if (m_gXERHO_EDMKey.empty()) {
329 ATH_MSG_DEBUG("gFex XENC input disabled, skip filling");
330 return StatusCode::SUCCESS;
331 }
332
333 SG::ReadHandle<xAOD::gFexGlobalRoIContainer> gXERHO_EDM(m_gXERHO_EDMKey);
334 ATH_CHECK(gXERHO_EDM.isValid());
335
336 for(const xAOD::gFexGlobalRoI* gFexRoI : * gXERHO_EDM) {
337
338 ATH_MSG_DEBUG( "EDM gFex XERHO type: "
339 << gFexRoI->globalType()
340 << " Ex: "
341 << gFexRoI->METquantityOne() // returns the Ex component in MeV
342 << " Ey: "
343 << gFexRoI->METquantityTwo() // returns the Ey component in MeV
344 );
345
346 int ExTopo = gFexRoI->METquantityOne()*m_EtGlobal_conversion;
347 int EyTopo = gFexRoI->METquantityTwo()*m_EtGlobal_conversion;
348
349 unsigned long long ExTopoLong = static_cast<unsigned long long>(ExTopo);
350 unsigned long long EyTopoLong = static_cast<unsigned long long>(EyTopo);
351
352 unsigned long long Et2Topo = ExTopoLong*ExTopoLong + EyTopoLong*EyTopoLong;
353 unsigned int EtTopo = std::sqrt(Et2Topo);
354
355 TCS::gXETOB gxe( -ExTopo, -EyTopo, EtTopo, TCS::GXERHO );
356
357 gxe.setExDouble( static_cast<double>(ExTopo*m_EtDoubleGlobal_conversion) );
358 gxe.setEyDouble( static_cast<double>(EyTopo*m_EtDoubleGlobal_conversion) );
359 gxe.setEtDouble( static_cast<double>(EtTopo*m_EtDoubleGlobal_conversion) );
360 gxe.setEt2( Et2Topo );
361
362 inputEvent.setgXERHO( gxe );
363 auto mon_h_gXERHOPt = Monitored::Scalar("gXERHOTOBPt", gxe.EtDouble());
364 Monitored::Group(m_monTool, mon_h_gXERHOPt);
365
366 }
367
368 return StatusCode::SUCCESS;
369
370}
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_gXERHO_EDMKey
StatusCode setgXERHO(const gXETOB &gXERHO)

◆ initialize()

StatusCode gFexInputProvider::initialize ( )
finaloverridevirtual

Definition at line 40 of file gFexInputProvider.cxx.

40 {
41
44
49
52 if (! m_gESPRESSO_EDMKey.empty() ) {
53 renounce(m_gESPRESSO_EDMKey); //make this optional, as its availability depends on how gFEX TOBs are being produced (cannot be simulated by gFEX sim, optional form gFEX bytestream decoders
54 }
55
57 if (! m_gRISTRETTO_EDMKey.empty() ) {
58 renounce(m_gRISTRETTO_EDMKey); //make this optional, as its availability depends on how gFEX TOBs are being produced (cannot be simulated by gFEX sim, optional form gFEX bytestream decoders
59 }
60
61 if (!m_monTool.empty()) ATH_CHECK(m_monTool.retrieve());
62
63 return StatusCode::SUCCESS;
64}

Member Data Documentation

◆ m_eta_conversion

const int gFexInputProvider::m_eta_conversion = 40
staticprivate

Definition at line 59 of file gFexInputProvider.h.

◆ m_etaDouble_conversion

const double gFexInputProvider::m_etaDouble_conversion = 0.025
staticprivate

Definition at line 64 of file gFexInputProvider.h.

◆ m_EtDoubleGlobal_conversion

const double gFexInputProvider::m_EtDoubleGlobal_conversion = 0.1
staticprivate

Definition at line 62 of file gFexInputProvider.h.

◆ m_EtDoubleJet_conversion

const double gFexInputProvider::m_EtDoubleJet_conversion = 0.1
staticprivate

Definition at line 61 of file gFexInputProvider.h.

◆ m_EtGlobal_conversion

const double gFexInputProvider::m_EtGlobal_conversion = 0.01
staticprivate

Definition at line 57 of file gFexInputProvider.h.

◆ m_EtJet_conversion

const int gFexInputProvider::m_EtJet_conversion = 2
staticprivate

Definition at line 56 of file gFexInputProvider.h.

◆ m_gESPRESSO_EDMKey

SG::ReadHandleKey<xAOD::gFexGlobalRoIContainer> LVL1::gFexInputProvider::m_gESPRESSO_EDMKey {this, "gEspressoKey", "L1_gEspresso", "gFEX gESPRESSO EDM"}
private

Definition at line 53 of file gFexInputProvider.h.

53{this, "gEspressoKey", "L1_gEspresso", "gFEX gESPRESSO EDM"};

◆ m_gJet_EDMKey

SG::ReadHandleKey<xAOD::gFexJetRoIContainer> LVL1::gFexInputProvider::m_gJet_EDMKey {this, "gFexSRJetRoIKey", "L1_gFexSRJetRoI", "gFEX Jet EDM"}
private

Definition at line 44 of file gFexInputProvider.h.

44{this, "gFexSRJetRoIKey", "L1_gFexSRJetRoI", "gFEX Jet EDM"};

◆ m_gLJet_EDMKey

SG::ReadHandleKey<xAOD::gFexJetRoIContainer> LVL1::gFexInputProvider::m_gLJet_EDMKey {this, "gFexLRJetRoIKey", "L1_gFexLRJetRoI", "gFEX LJet EDM"}
private

Definition at line 45 of file gFexInputProvider.h.

45{this, "gFexLRJetRoIKey", "L1_gFexLRJetRoI", "gFEX LJet EDM"};

◆ m_gMHT_EDMKey

SG::ReadHandleKey<xAOD::gFexGlobalRoIContainer> LVL1::gFexInputProvider::m_gMHT_EDMKey {this,"gMHTComponentsJwojKey", "L1_gMHTComponentsJwoj", "gFEX MHT EDM"}
private

Definition at line 48 of file gFexInputProvider.h.

48{this,"gMHTComponentsJwojKey", "L1_gMHTComponentsJwoj", "gFEX MHT EDM"};

◆ m_gRISTRETTO_EDMKey

SG::ReadHandleKey<xAOD::gFexGlobalRoIContainer> LVL1::gFexInputProvider::m_gRISTRETTO_EDMKey {this, "gRistrettoKey", "L1_gRistretto", "gFEX gRISTRETTO EDM"}
private

Definition at line 54 of file gFexInputProvider.h.

54{this, "gRistrettoKey", "L1_gRistretto", "gFEX gRISTRETTO EDM"}; //TODO: verify actual default key once implemented on gFEX side!

◆ m_gTE_EDMKey

SG::ReadHandleKey<xAOD::gFexGlobalRoIContainer> LVL1::gFexInputProvider::m_gTE_EDMKey {this, "gScalarEJwojKey", "L1_gScalarEJwoj", "gFEX TE EDM"}
private

Definition at line 52 of file gFexInputProvider.h.

52{this, "gScalarEJwojKey", "L1_gScalarEJwoj", "gFEX TE EDM"};

◆ m_gXEJWOJ_EDMKey

SG::ReadHandleKey<xAOD::gFexGlobalRoIContainer> LVL1::gFexInputProvider::m_gXEJWOJ_EDMKey {this, "gMETComponentsJwojKey", "L1_gMETComponentsJwoj", "gFEX XEJWOJ EDM"}
private

Definition at line 47 of file gFexInputProvider.h.

47{this, "gMETComponentsJwojKey", "L1_gMETComponentsJwoj", "gFEX XEJWOJ EDM"};

◆ m_gXENC_EDMKey

SG::ReadHandleKey<xAOD::gFexGlobalRoIContainer> LVL1::gFexInputProvider::m_gXENC_EDMKey {this, "gMETComponentsNoiseCutKey", "L1_gMETComponentsNoiseCut", "gFEX XENC EDM"}
private

Definition at line 49 of file gFexInputProvider.h.

49{this, "gMETComponentsNoiseCutKey", "L1_gMETComponentsNoiseCut", "gFEX XENC EDM"};

◆ m_gXERHO_EDMKey

SG::ReadHandleKey<xAOD::gFexGlobalRoIContainer> LVL1::gFexInputProvider::m_gXERHO_EDMKey {this, "gMETComponentsRmsKey", "L1_gMETComponentsRms", "gFEX RHO ROI EDM"}
private

Definition at line 50 of file gFexInputProvider.h.

50{this, "gMETComponentsRmsKey", "L1_gMETComponentsRms", "gFEX RHO ROI EDM"};

◆ m_monTool

ToolHandle<GenericMonitoringTool> LVL1::gFexInputProvider::m_monTool {this, "MonTool", "", "Monitoring tool to create online histograms"}
private

Definition at line 42 of file gFexInputProvider.h.

42{this, "MonTool", "", "Monitoring tool to create online histograms"};

◆ m_phi_conversion

const int gFexInputProvider::m_phi_conversion = 1
staticprivate

Definition at line 58 of file gFexInputProvider.h.

◆ m_phiDouble_conversion

const double gFexInputProvider::m_phiDouble_conversion = 0.05
staticprivate

Definition at line 63 of file gFexInputProvider.h.


The documentation for this class was generated from the following files: