21 const std::string &
name,
29 ATH_CHECK(m_eTowerContainerKey.initialize());
30 if (m_bdtJsonConfigPath.size() == 0) {
31 ATH_MSG_ERROR(
"eFEX tau BDT json config file path not set in configuration");
32 return StatusCode::FAILURE;
34 ATH_MSG_INFO(
"Using BDT config file " << m_bdtJsonConfigPath);
36 m_bdtAlgoImpl = std::make_unique<eFEXtauBDT>(
this, m_bdtJsonConfigPath);
40 setThresholdPointers();
41 m_bdtAlgoImpl->initBDTVars();
42 m_bdtAlgoImpl->initETPointers();
43 m_bdtAlgoImpl->initEMETPointers();
44 m_bdtAlgoImpl->initHADETPointers();
45 m_bdtAlgoImpl->initTowersPointers();
46 }
catch (
const std::domain_error &ex) {
48 return StatusCode::FAILURE;
52 return StatusCode::SUCCESS;
58 std::copy(&inputTable[0][0], &inputTable[0][0] + 9, &m_eFexalgoTowerID[0][0]);
60 buildLayers(efex_id, fpga_id, central_eta);
66 std::unique_ptr<eFEXtauTOB> tob = std::make_unique<eFEXtauTOB>();
67 unsigned int et = getEt();
74 tob->
setIso(getRealRCore());
82 for (
int phi = 0; phi < 3; phi++) {
83 for (
int eta = 0; eta < 3; eta++) {
85 m_bdtAlgoImpl->setPointerToSCell(eta, phi, 0, &m_em0cells[eta][phi]);
86 m_bdtAlgoImpl->setPointerToSCell(eta, phi, 3, &m_em3cells[eta][phi]);
87 m_bdtAlgoImpl->setPointerToSCell(eta, phi, 4, &m_hadcells[eta][phi]);
89 for (
int eta = 0; eta < 12; eta++) {
91 m_bdtAlgoImpl->setPointerToSCell(eta, phi, 1, &m_em1cells[eta][phi]);
92 m_bdtAlgoImpl->setPointerToSCell(eta, phi, 2, &m_em2cells[eta][phi]);
98 for (
int i = 0;
i < 3;
i++) {
99 m_bdtAlgoImpl->setPointerToFracMultipliersParam(
i,
100 &(m_hadFracMultipliers[
i]));
103 for (
int i = 0;
i < 3;
i++) {
104 m_bdtAlgoImpl->setPointerToBDTThresholdsParam(
i, &(m_bdtThresholds[
i]));
107 m_bdtAlgoImpl->setPointerToMaxETParam(&m_maxEtThreshold);
108 m_bdtAlgoImpl->setPointerToETThresholdParam(&m_etThreshold);
109 m_bdtAlgoImpl->setPointerToBDTMinETParam(&m_bdtMinEtThreshold);
114 if (m_cellsSet ==
false) {
115 ATH_MSG_DEBUG(
"Layers not built, cannot accurately calculate Et.");
118 return m_bdtAlgoImpl->getETEstimate();
122 if (m_cellsSet ==
false) {
123 ATH_MSG_DEBUG(
"Layers not built, cannot calculate rHad core value");
126 return m_bdtAlgoImpl->getHADETEstimate();
130 if (m_cellsSet ==
false) {
131 ATH_MSG_DEBUG(
"Layers not built, cannot calculate rHad environment value");
134 return m_bdtAlgoImpl->getEMETEstimate();
140 if (m_cellsSet ==
false) {
141 ATH_MSG_DEBUG(
"Layers not built, cannot accurately calculate Et.");
144 return m_bdtAlgoImpl->getET();
148 return m_bdtAlgoImpl->getBDTScore();
152 return m_bdtAlgoImpl->getBDTCondition();
156 return m_bdtAlgoImpl->getFracCondition();
162 const std::vector<unsigned int> &rHadThreshold,
163 const std::vector<unsigned int> &bdtThreshold,
unsigned int etThreshold,
164 unsigned int maxEtThreshold,
unsigned int bdtMinEtThreshold) {
165 for (
int i = 0;
i < 3;
i++) {
166 m_hadFracMultipliers[
i] = rHadThreshold[
i];
167 m_bdtThresholds[
i] = bdtThreshold[
i];
169 m_etThreshold = etThreshold;
170 m_maxEtThreshold = maxEtThreshold;
171 m_bdtMinEtThreshold = bdtMinEtThreshold;