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());
85 for (
int phi = 0; phi < 3; phi++) {
86 for (
int eta = 0; eta < 3; eta++) {
88 m_bdtAlgoImpl->setPointerToSCell(eta, phi, 0, &m_em0cells[eta][phi]);
89 m_bdtAlgoImpl->setPointerToSCell(eta, phi, 3, &m_em3cells[eta][phi]);
90 m_bdtAlgoImpl->setPointerToSCell(eta, phi, 4, &m_hadcells[eta][phi]);
92 for (
int eta = 0; eta < 12; eta++) {
94 m_bdtAlgoImpl->setPointerToSCell(eta, phi, 1, &m_em1cells[eta][phi]);
95 m_bdtAlgoImpl->setPointerToSCell(eta, phi, 2, &m_em2cells[eta][phi]);
101 for (
int i = 0;
i < 3;
i++) {
102 m_bdtAlgoImpl->setPointerToFracMultipliersParam(
i,
103 &(m_hadFracMultipliers[
i]));
106 for (
int i = 0;
i < 3;
i++) {
107 m_bdtAlgoImpl->setPointerToBDTThresholdsParam(
i, &(m_bdtThresholds[
i]));
110 m_bdtAlgoImpl->setPointerToMaxETParam(&m_maxEtThreshold);
111 m_bdtAlgoImpl->setPointerToETThresholdParam(&m_etThreshold);
112 m_bdtAlgoImpl->setPointerToBDTMinETParam(&m_bdtMinEtThreshold);
117 if (m_cellsSet ==
false) {
118 ATH_MSG_DEBUG(
"Layers not built, cannot accurately calculate Et.");
121 return m_bdtAlgoImpl->getETEstimate();
125 if (m_cellsSet ==
false) {
126 ATH_MSG_DEBUG(
"Layers not built, cannot calculate rHad core value");
129 return m_bdtAlgoImpl->getHADETEstimate();
133 if (m_cellsSet ==
false) {
134 ATH_MSG_DEBUG(
"Layers not built, cannot calculate rHad environment value");
137 return m_bdtAlgoImpl->getEMETEstimate();
143 if (m_cellsSet ==
false) {
144 ATH_MSG_DEBUG(
"Layers not built, cannot accurately calculate Et.");
147 return m_bdtAlgoImpl->getET();
151 return m_bdtAlgoImpl->getBDTScore();
155 return m_bdtAlgoImpl->getBDTCondition();
159 return m_bdtAlgoImpl->getFracCondition();
165 const std::vector<unsigned int> &rHadThreshold,
166 const std::vector<unsigned int> &bdtThreshold,
unsigned int etThreshold,
167 unsigned int maxEtThreshold,
unsigned int bdtMinEtThreshold) {
168 for (
int i = 0;
i < 3;
i++) {
169 m_hadFracMultipliers[
i] = rHadThreshold[
i];
170 m_bdtThresholds[
i] = bdtThreshold[
i];
172 m_etThreshold = etThreshold;
173 m_maxEtThreshold = maxEtThreshold;
174 m_bdtMinEtThreshold = bdtMinEtThreshold;