22 const std::string &
name,
30 ATH_CHECK(m_eTowerContainerKey.initialize());
34 if (configPath.size() == 0) {
35 ATH_MSG_ERROR(
"Cannot locate BDT config file " << m_bdtJsonConfigPath);
36 return StatusCode::FAILURE;
39 m_bdtAlgoImpl = std::make_unique<eFEXtauBDT>(
this, configPath);
43 setThresholdPointers();
44 m_bdtAlgoImpl->initBDTVars();
45 m_bdtAlgoImpl->initETPointers();
46 m_bdtAlgoImpl->initEMETPointers();
47 m_bdtAlgoImpl->initHADETPointers();
48 m_bdtAlgoImpl->initTowersPointers();
49 }
catch (
const std::domain_error &ex) {
51 return StatusCode::FAILURE;
55 return StatusCode::SUCCESS;
61 std::copy(&inputTable[0][0], &inputTable[0][0] + 9, &m_eFexalgoTowerID[0][0]);
63 buildLayers(efex_id, fpga_id, central_eta);
69 std::unique_ptr<eFEXtauTOB> tob = std::make_unique<eFEXtauTOB>();
70 unsigned int et = getEt();
77 tob->
setIso(getRealRCore());
81 setSCellEncoder(tob.get());
89 m_bdtAlgoImpl->setPointerToSCell(
eta,
phi, 0, &m_em0cells[
eta][
phi]);
90 m_bdtAlgoImpl->setPointerToSCell(
eta,
phi, 3, &m_em3cells[
eta][
phi]);
91 m_bdtAlgoImpl->setPointerToSCell(
eta,
phi, 4, &m_hadcells[
eta][
phi]);
95 m_bdtAlgoImpl->setPointerToSCell(
eta,
phi, 1, &m_em1cells[
eta][
phi]);
96 m_bdtAlgoImpl->setPointerToSCell(
eta,
phi, 2, &m_em2cells[
eta][
phi]);
102 for (
int i = 0;
i < 3;
i++) {
103 m_bdtAlgoImpl->setPointerToFracMultipliersParam(
i,
104 &(m_hadFracMultipliers[
i]));
107 for (
int i = 0;
i < 3;
i++) {
108 m_bdtAlgoImpl->setPointerToBDTThresholdsParam(
i, &(m_bdtThresholds[
i]));
111 m_bdtAlgoImpl->setPointerToMaxETParam(&m_maxEtThreshold);
112 m_bdtAlgoImpl->setPointerToETThresholdParam(&m_etThreshold);
113 m_bdtAlgoImpl->setPointerToBDTMinETParam(&m_bdtMinEtThreshold);
118 if (m_cellsSet ==
false) {
119 ATH_MSG_DEBUG(
"Layers not built, cannot accurately calculate Et.");
122 return m_bdtAlgoImpl->getETEstimate();
126 if (m_cellsSet ==
false) {
127 ATH_MSG_DEBUG(
"Layers not built, cannot calculate rHad core value");
130 return m_bdtAlgoImpl->getHADETEstimate();
134 if (m_cellsSet ==
false) {
135 ATH_MSG_DEBUG(
"Layers not built, cannot calculate rHad environment value");
138 return m_bdtAlgoImpl->getEMETEstimate();
144 if (m_cellsSet ==
false) {
145 ATH_MSG_DEBUG(
"Layers not built, cannot accurately calculate Et.");
148 return m_bdtAlgoImpl->getET();
152 return m_bdtAlgoImpl->getBDTScore();
156 return m_bdtAlgoImpl->getBDTCondition();
160 return m_bdtAlgoImpl->getFracCondition();
166 const std::vector<unsigned int> &rHadThreshold,
167 const std::vector<unsigned int> &bdtThreshold,
unsigned int etThreshold,
168 unsigned int maxEtThreshold,
unsigned int bdtMinEtThreshold) {
169 for (
int i = 0;
i < 3;
i++) {
170 m_hadFracMultipliers[
i] = rHadThreshold[
i];
171 m_bdtThresholds[
i] = bdtThreshold[
i];
173 m_etThreshold = etThreshold;
174 m_maxEtThreshold = maxEtThreshold;
175 m_bdtMinEtThreshold = bdtMinEtThreshold;