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());
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]);
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->setPointerToMaxETParamFrac(&m_maxEtThresholdFrac);
109 m_bdtAlgoImpl->setPointerToETThresholdParam(&m_etThreshold);
110 m_bdtAlgoImpl->setPointerToBDTMinETParam(&m_bdtMinEtThreshold);
115 if (m_cellsSet ==
false) {
116 ATH_MSG_DEBUG(
"Layers not built, cannot accurately calculate Et.");
119 return m_bdtAlgoImpl->getETEstimate();
123 if (m_cellsSet ==
false) {
124 ATH_MSG_DEBUG(
"Layers not built, cannot calculate rHad core value");
127 return m_bdtAlgoImpl->getHADETEstimate();
131 if (m_cellsSet ==
false) {
132 ATH_MSG_DEBUG(
"Layers not built, cannot calculate rHad environment value");
135 return m_bdtAlgoImpl->getEMETEstimate();
141 if (m_cellsSet ==
false) {
142 ATH_MSG_DEBUG(
"Layers not built, cannot accurately calculate Et.");
145 return m_bdtAlgoImpl->getET();
149 return m_bdtAlgoImpl->getBDTScore();
153 return m_bdtAlgoImpl->getBDTCondition();
157 return m_bdtAlgoImpl->getFracCondition();
163 const std::vector<unsigned int> &rHadThreshold,
164 const std::vector<unsigned int> &bdtThreshold,
unsigned int etThreshold,
165 unsigned int maxEtThreshold,
unsigned int bdtMinEtThreshold,
unsigned int maxEtThresholdFrac) {
166 for (
int i = 0;
i < 3;
i++) {
167 m_hadFracMultipliers[
i] = rHadThreshold[
i];
168 m_bdtThresholds[
i] = bdtThreshold[
i];
170 m_etThreshold = etThreshold;
171 m_maxEtThreshold = maxEtThreshold;
172 m_maxEtThresholdFrac = maxEtThresholdFrac;
173 m_bdtMinEtThreshold = bdtMinEtThreshold;