63 using size_type = traccc::edm::silicon_cell_collection::buffer::size_type;
74 size_type nPix = 0, nStrip = 0;
76 for (
const auto* coll : *pixelRDOHandle) {
81 for (
const auto* coll : *stripRDOHandle) {
88 std::bitset<3> timePattern(raw3->
getTimeBin());
93 nStrip += rdo->getGroupSize();
98 ATH_MSG_DEBUG(
"Found " << nPix <<
" Pixel RDOs and " << nStrip
99 <<
" Strip RDOs, total " << (nPix + nStrip) <<
" RDOs");
100 size_type
const nCells = nPix + nStrip;
104 return StatusCode::SUCCESS;
108 auto host_copy =
m_common.m_copiesTool->hostCopy(ctx);
109 traccc::edm::silicon_cell_collection::buffer traccc_cells_host_buffer{
111 host_copy->setup(traccc_cells_host_buffer)->wait();
114 traccc::edm::silicon_cell_collection::device cells{traccc_cells_host_buffer};
119 size_type cell_index = 0;
120 uint64_t current_geometry_id = detray::geometry::identifier{}.value();
121 unsigned int current_det_cond_idx = -1;
124 for (
const auto* coll : *pixelRDOHandle) {
133 const uint64_t geoId =
m_common.m_athenaToDetray->at(modId);
135 if (geoId != current_geometry_id) {
136 current_geometry_id = geoId;
137 current_det_cond_idx =
m_common.m_DetrayIdToDetDescrIndexMap.at(current_geometry_id);
140 float activation = 1.;
141 if (
m_common.m_UsePixelToTForCellActivation) {
142 activation =
static_cast<float>(rdo->getToT());
143 if (activation == 0.) {
144 ATH_MSG_ERROR(
"input data error: RDO must not have ToT=0; RDO index: "
149 traccc::edm::silicon_cell cell = cells.at(cell_index++);
150 cell.channel0() =
static_cast<uint32_t
>(cellId.
phiIndex());
151 cell.channel1() =
static_cast<uint32_t
>(cellId.
etaIndex());
152 cell.module_index() = current_det_cond_idx;
153 cell.activation() = activation;
159 for (
const auto* coll : *stripRDOHandle) {
162 assert(
dynamic_cast<const SCT3_RawData*
>(rdo)!=
nullptr);
165 std::bitset<3> timePattern(raw3->
getTimeBin());
177 const uint64_t geoId =
m_common.m_athenaToDetray->at(modId);
179 if (geoId != current_geometry_id) {
180 current_geometry_id = geoId;
181 current_det_cond_idx =
m_common.m_DetrayIdToDetDescrIndexMap.at(current_geometry_id);
184 if (
m_common.m_stripID->barrel_ec(modId) == 0) {
185 for (
int i = 0; i < rdo->getGroupSize(); ++i) {
187 traccc::edm::silicon_cell cell = cells.at(cell_index++);
188 cell.channel0() =
static_cast<uint32_t
>(cellId.
phiIndex() + i);
190 cell.module_index() = current_det_cond_idx;
191 cell.activation() = 1.;
196 for (
int i = 0; i < rdo->getGroupSize(); ++i) {
198 traccc::edm::silicon_cell cell = cells.at(cell_index++);
200 cell.channel1() =
static_cast<uint32_t
>(cellId.
phiIndex() + i);
201 cell.module_index() = current_det_cond_idx;
202 cell.activation() = 1.;
212 traccc::edm::silicon_cell_collection::buffer sorted_cells_host_buffer =
213 m_common.sortCells(*host_copy, cells);
231 <<
m_common.m_tracccCellsKey.key() <<
"'");
232 return StatusCode::SUCCESS;