64 std::vector<const InDetRawDataCollection<PixelRDORawData>*> pixel_rdos;
65 std::vector<const InDetRawDataCollection<SCT_RDORawData>*> strip_rdos;
69 pixel_rdos.reserve(pixelRDOHandle->fullSize());
70 for (
const auto* col : *pixelRDOHandle) {
71 if (col) pixel_rdos.push_back(col);
76 strip_rdos.reserve(stripRDOHandle->fullSize());
77 for (
const auto* col : *stripRDOHandle) {
78 if (col) strip_rdos.push_back(col);
83 int nPix = 0, nStrip = 0;
84 std::vector<traccc::io::csv::cell> cells_aos;
89 float staticToTValue = 8.f;
90 float staticTimeStampValue = 1.f;
93 for (
const auto* coll : pixel_rdos) {
103 cells_aos.push_back({geoId, 0,
104 static_cast<uint32_t
>(cellId.
phiIndex()),
105 static_cast<uint32_t
>(cellId.
etaIndex()),
106 staticTimeStampValue,
static_cast<float>(rdo->getToT())});
113 for (
const auto* coll : strip_rdos) {
124 for (
int i = 0; i < rdo->getGroupSize(); ++i) {
125 cells_aos.push_back({geoId, 0,
126 static_cast<uint32_t
>(cellId.
phiIndex() + i), 0, staticTimeStampValue, staticToTValue});
130 for (
int i = 0; i < rdo->getGroupSize(); ++i) {
131 cells_aos.push_back({geoId, 0, 0,
132 static_cast<uint32_t
>(cellId.
phiIndex() + i), staticTimeStampValue, staticToTValue});
140 if (cells_aos.empty()) {
142 return StatusCode::SUCCESS;
150 traccc::edm::silicon_cell_collection::host cells_soa{
m_hostMR->mr()};
152 uint64_t current_geometry_id = cells_aos[0].geometry_id;
155 for (
const auto& cell : cells_aos) {
156 if (cell.geometry_id != current_geometry_id) {
157 current_geometry_id = cell.geometry_id;
160 cells_soa.push_back({cell.channel0, cell.channel1, cell.value,
161 cell.timestamp, current_det_cond_idx});
166 auto copy =
m_copy->copy(ctx);
167 auto traccc_cells_buffer = std::make_unique<traccc::edm::silicon_cell_collection::buffer>(
168 static_cast<unsigned int>(cells_soa.size()),
m_deviceMR->mr());
169 copy->setup(*traccc_cells_buffer)->wait();
170 (*copy)(vecmem::get_data(cells_soa), *traccc_cells_buffer)->wait();
172 ATH_MSG_DEBUG(
"Creating " << copy->get_size(*traccc_cells_buffer) <<
" cells.");
175 ATH_CHECK(outputTracccCells.record(std::move(traccc_cells_buffer)));
184 return StatusCode::SUCCESS;