14 #include "GaudiKernel/PhysicalConstants.h"
21 const int jFexInputProvider::m_Et_conversion = 2;
22 const double jFexInputProvider::m_sumEt_conversion = 0.01;
23 const int jFexInputProvider::m_phi_conversion = 2;
24 const int jFexInputProvider::m_eta_conversion = 4;
26 const double jFexInputProvider::m_EtDouble_conversion = 0.1;
27 const double jFexInputProvider::m_sumEtDouble_conversion = 0.1;
28 const double jFexInputProvider::m_phiDouble_conversion = 0.05;
29 const double jFexInputProvider::m_etaDouble_conversion = 0.025;
32 jFexInputProvider::jFexInputProvider(
const std::string&
type,
const std::string&
name,
33 const IInterface*
parent) :
36 declareInterface<LVL1::IInputTOBConverter>(
this );
54 return StatusCode::SUCCESS;
61 return StatusCode::SUCCESS;
69 << +jFexRoI->jFexNumber()
75 << jFexRoI->globalEta()
77 << jFexRoI->globalPhi()
79 << +jFexRoI->tobEMIso()
81 << +jFexRoI->tobEMf1()
83 << +jFexRoI->tobEMf2()
89 unsigned int isolation = jFexRoI->tobEMIso();
90 unsigned int frac1 = jFexRoI->tobEMf2();
91 unsigned int frac2 = jFexRoI->tobEMf1();
94 if (EtTopo==0)
continue;
112 Monitored::Group(
m_monTool, mon_h_jEmPt, mon_h_jEmIsolation, mon_h_jEmFrac1, mon_h_jEmFrac2, mon_h_jEmPhi, mon_h_jEmEta);
115 return StatusCode::SUCCESS;
123 return StatusCode::SUCCESS;
131 << +jFexRoI->jFexNumber()
137 << jFexRoI->globalEta()
139 << jFexRoI->globalPhi()
150 if (EtTopo==0)
continue;
168 return StatusCode::SUCCESS;
176 return StatusCode::SUCCESS;
184 << jFexRoI->jFexNumber()
190 << jFexRoI->globalEta()
192 << jFexRoI->globalPhi()
200 if (EtTopo==0)
continue;
215 return StatusCode::SUCCESS;
223 return StatusCode::SUCCESS;
231 << +jFexRoI->jFexNumber()
237 << jFexRoI->globalEta()
239 << jFexRoI->globalPhi()
247 if (EtTopo==0)
continue;
263 return StatusCode::SUCCESS;
272 return StatusCode::SUCCESS;
278 int global_ExTopo = 0;
279 int global_EyTopo = 0;
280 int central_ExTopo = 0;
281 int central_EyTopo = 0;
288 int jFexNumber = jFexRoI->jFexNumber();
289 int fpgaNumber = jFexRoI->fpgaNumber();
291 int hemisphere = fpgaNumber == 0 ? -1 : 1;
293 ExTopo = hemisphere * ExTopo;
294 EyTopo = hemisphere * EyTopo;
296 global_ExTopo += ExTopo;
297 global_EyTopo += EyTopo;
300 if( jFexNumber!=0 && jFexNumber!=5 ) {
301 central_ExTopo += ExTopo;
302 central_EyTopo += EyTopo;
316 unsigned long long global_ExTopoLong =
static_cast<unsigned long long>(global_ExTopo);
317 unsigned long long global_EyTopoLong =
static_cast<unsigned long long>(global_EyTopo);
318 unsigned long long central_ExTopoLong =
static_cast<unsigned long long>(central_ExTopo);
319 unsigned long long central_EyTopoLong =
static_cast<unsigned long long>(central_EyTopo);
321 unsigned long long Et2Topo = global_ExTopoLong*global_ExTopoLong + global_EyTopoLong*global_EyTopoLong;
322 unsigned int EtTopo = std::sqrt( Et2Topo );
323 unsigned long long Et2Topo_central = central_ExTopoLong*central_ExTopoLong + central_EyTopoLong*central_EyTopoLong;
324 unsigned int EtTopo_central = std::sqrt( Et2Topo_central );
336 jxec.
setEt2( Et2Topo_central );
346 return StatusCode::SUCCESS;
355 return StatusCode::SUCCESS;
365 bool topoTE_sat =
false;
380 int jFexNumber = jFexRoI->jFexNumber();
381 int fpgaNumber = jFexRoI->fpgaNumber();
383 int Sat_lower = jFexRoI->tobSat_lower();
384 int Sat_upper = jFexRoI->tobSat_upper();
401 topoTE += EtLowerTopo;
402 topoTE += EtUpperTopo;
403 topoTE_sat |= Sat_lower;
404 topoTE_sat |= Sat_upper;
408 topoTEsideA += EtLowerTopo;
409 topoTEsideA += EtUpperTopo;
413 topoTEsideC += EtLowerTopo;
414 topoTEsideC += EtUpperTopo;
419 topoTEC += EtLowerTopo;
420 if( jFexNumber!=0 && jFexNumber!=5 )
422 topoTEC += EtUpperTopo;
426 if( jFexNumber==0 || jFexNumber==5 )
428 topoTEFWD += EtUpperTopo;
434 topoTEFWDA += EtUpperTopo;
440 topoTEFWDC += EtUpperTopo;
475 Monitored::Group(
m_monTool, mon_h_jTE_saturation, mon_h_jTE_sumEt, mon_h_jTEC_sumEt, mon_h_jTEFWD_sumEt, mon_h_jTEFWDA_sumEt, mon_h_jTEFWDC_sumEt);
477 return StatusCode::SUCCESS;
489 return StatusCode::SUCCESS;