25 : PixelGmxInterface(detectorManager, commonItems, moduleTree)
35 if (not pixelIdHelper){
36 ATH_MSG_ERROR(
"Failed dynamic_cast to PLR_ID in PLRGmxInterface::sensorId");
46 <<
index[
"eta_module"] <<
" " <<
index[
"phi_module"] <<
" " <<
index[
"side"]);
51 index[
"barrel_endcap"],
57 <<
index[
"eta_module"] <<
" " <<
index[
"phi_module"] <<
" " <<
index[
"side"]);
58 ATH_MSG_DEBUG(
"hitIdOfModule = " << std::hex << hitIdOfModule << std::dec);
71 const std::map<std::string, std::string>&
parameters)
75 if (clas ==
"SingleChip_RD53" && (
typeName ==
"RD53_20x19_Single_25x100" ||
typeName ==
"PLR_20x19_Single_25x100")) {
82 std::map<std::string, int> &
index,
90 if (not pixelIdHelper){
91 ATH_MSG_ERROR(
"Failed dynamic_cast to PLR_ID in PLRGmxInterface::addSensor");
108 msg() << MSG::ERROR <<
key <<
" = " <<
value <<
"; ";
111 ATH_MSG_ERROR(
"Refusing to make it into a sensitive element. Incompatible gmx and identifier-xml files.");
121 throw std::runtime_error(
"readout sensor type " +
typeName +
" not found.");
125 if (design ==
nullptr) {
127 throw std::runtime_error(
"readout sensor type " +
typeName +
" not found.");
136 std::string errorMessage(
"");
138 index[
"layer_wheel"],
151 const std::map<std::string, std::string> &
parameters)
153 int circuitsPerEta{1};
154 int circuitsPerPhi{1};
155 double thickness{0.150};
158 double pitchEtaLong{};
159 double pitchPhiLong{};
160 double pitchEtaEnd{};
161 double pitchPhiEnd{};
162 int nEtaLongPerSide{};
163 int nPhiLongPerSide{};
164 int nEtaEndPerSide{};
165 int nPhiEndPerSide{};
166 int rowsPerCircuit{};
167 int columnsPerCircuit{};
195 auto computeAttribute = [pitchPhi,
199 ](
const std::array<PixelDiodeTree::IndexType,2> &split_idx,
201 [[maybe_unused]]
const std::array<bool,4> &ganged,
202 [[maybe_unused]]
unsigned int split_i,
205 -> std::tuple<PixelDiodeTree::AttributeType,PixelDiodeTree::AttributeType>
226 assert(split_idx[0]>=0 && split_idx[1]>=0);
227 std::array<int,2> chip_idx{split_idx[0]/rowsPerCircuit, split_idx[1]/columnsPerCircuit};
229 unsigned int n_large_dimensions = ( (std::abs(diode_width[0]-pitchPhi)>pitchPhi*.25)
230 +(std::abs(diode_width[1]-pitchEta)>pitchEta*.25));
231 switch (n_large_dimensions) {
243 return std::make_tuple(current_matrix_attribute, current_diode_attribute);
247 =
createPixelDiodeTree(std::array<unsigned int,2>{
static_cast<unsigned int>(circuitsPerPhi),
static_cast<unsigned int>(circuitsPerEta)},
248 std::array<unsigned int,2>{
static_cast<unsigned int>(rowsPerCircuit),
static_cast<unsigned int>(columnsPerCircuit)},
250 std::array<std::array<unsigned int,2>, 2>{ std::array<unsigned int,2>{
static_cast<unsigned int>(nPhiEndPerSide),
251 static_cast<unsigned int>(nEtaEndPerSide)},
252 std::array<unsigned int,2>{
static_cast<unsigned int>(nPhiLongPerSide),
253 static_cast<unsigned int>(nEtaLongPerSide)}},
257 std::array<std::array<unsigned int,2>, 2>{ std::array<unsigned int,2>{0
u,0
u},
258 std::array<unsigned int,2>{0
u,0
u}
267 auto design = std::make_unique<PixelModuleDesign>(thickness,
268 circuitsPerPhi, circuitsPerEta,
269 columnsPerCircuit, rowsPerCircuit,
270 columnsPerCircuit, rowsPerCircuit,
271 std::move(diode_tree), carrier,
272 readoutSide, is3D, detectorType,
275 ATH_MSG_DEBUG(
"readout geo - design " <<
typeName <<
" " << design->width() <<
"x" << design->length() <<
"x" << design->thickness()
276 <<
" " << design->rows() <<
"x" << design->columns()
277 <<
", " << circuitsPerPhi <<
"x" << circuitsPerEta <<
" "
278 << rowsPerCircuit <<
"x" << columnsPerCircuit
279 <<
" carrier " << carrier <<
" readout side " << readoutSide <<
":\n"