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;
362 bool topoTE_sat =
false;
376 int jFexNumber = jFexRoI->jFexNumber();
377 int fpgaNumber = jFexRoI->fpgaNumber();
379 int Sat_lower = jFexRoI->tobSat_lower();
380 int Sat_upper = jFexRoI->tobSat_upper();
397 topoTE += EtLowerTopo;
398 topoTE += EtUpperTopo;
399 topoTE_sat |= Sat_lower;
400 topoTE_sat |= Sat_upper;
403 topoTEC += EtLowerTopo;
404 if( jFexNumber!=0 && jFexNumber!=5 )
406 topoTEC += EtUpperTopo;
410 if( jFexNumber==0 || jFexNumber==5 )
412 topoTEFWD += EtUpperTopo;
418 topoTEFWDA += EtUpperTopo;
424 topoTEFWDC += EtUpperTopo;
453 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);
455 return StatusCode::SUCCESS;
467 return StatusCode::SUCCESS;