#include <GlobalCellTowerAlgTool.h>
|
static std::string | toBinary (int value, int width) |
| Helper function to convert floating point values into a bitstream. More...
|
|
static std::string | makeTowerBits (int energy, int etaBin, int phiBin) |
| Function which assembles the TOB bitstream for a tower. More...
|
|
Definition at line 30 of file GlobalCellTowerAlgTool.h.
◆ GlobalCellTowerAlgTool()
GlobalSim::GlobalCellTowerAlgTool::GlobalCellTowerAlgTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~GlobalCellTowerAlgTool()
GlobalSim::GlobalCellTowerAlgTool::~GlobalCellTowerAlgTool |
( |
| ) |
|
|
overridedefault |
Main destructor (explicitly defaulted)
◆ initialize()
StatusCode GlobalSim::GlobalCellTowerAlgTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ makeTowerBits()
std::string GlobalSim::GlobalCellTowerAlgTool::makeTowerBits |
( |
int |
energy, |
|
|
int |
etaBin, |
|
|
int |
phiBin |
|
) |
| |
|
static |
◆ run()
StatusCode GlobalSim::GlobalCellTowerAlgTool::run |
( |
const EventContext & |
ctx | ) |
const |
|
overridevirtual |
Main functional block running for each event.
Definition at line 28 of file GlobalCellTowerAlgTool.cxx.
34 CHECK(h_gblLArCells.isValid());
35 const auto & gblLArCells = *h_gblLArCells;
38 static constexpr
int nEta{98};
39 static constexpr
int nPhi{64};
41 std::array<std::array<float, nPhi>,
nEta> towerEnergies{};
43 for (
const auto&
cell : gblLArCells) {
46 int eta_index =
static_cast<int>(std::floor(
cell->eta() * 10)) + 49;
47 int phi_index =
static_cast<int>(std::floor(
cell->phi() * 10)) + 32;
50 if (eta_index < 0 || eta_index >=
nEta || phi_index < 0 || phi_index >=
nPhi)
continue;
57 auto towers = std::make_unique<GenericTobContainer>();
64 int energyBits = std::clamp(
static_cast<int>(towerEnergies[
etaBin][
phiBin]), 0, (1 << 13) - 1);
68 towers->emplace_back(std::make_shared<GenericTob>(bit_string));
76 return StatusCode::SUCCESS;
◆ toBinary()
static std::string GlobalSim::GlobalCellTowerAlgTool::toBinary |
( |
int |
value, |
|
|
int |
width |
|
) |
| |
|
inlinestatic |
Helper function to convert floating point values into a bitstream.
Definition at line 47 of file GlobalCellTowerAlgTool.h.
49 return std::bitset<32>(
value).to_string().substr(32 -
width);
◆ toString()
std::string GlobalSim::GlobalCellTowerAlgTool::toString |
( |
| ) |
const |
|
overridevirtual |
◆ m_gblCellTowers
SG::WriteHandleKey<GenericTobContainer> GlobalSim::GlobalCellTowerAlgTool::m_gblCellTowers {this, "GlobalCellTowersKey", "GlobalCellTowers", "Key to the container of generic TOBS containing the cell towers"} |
|
private |
◆ m_gblLArCellContainerKey
The documentation for this class was generated from the following files: