17 #include <GeoModelRead/ReadGeoModel.h>
18 #include <GeoModelKernel/GeoFullPhysVol.h>
22 constexpr
int HGTD_HitIndex{2};
28 m_detectorManager(detectorManager),
29 m_commonItems(commonItems)
47 index[
"moduleInLayer"],
51 <<
index[
"moduleInLayer"] );
52 ATH_MSG_DEBUG(
"hitIdOfWafer = " << std::hex << hitIdOfWafer << std::dec);
60 index[
"moduleNumberInRow"],
65 <<
index[
"moduleNumberInRow"] <<
" " <<
index[
"rowNumber"]);
66 ATH_MSG_DEBUG(
"hitIdOfWafer = " << std::hex << hitIdOfWafer << std::dec);
80 const std::map<std::string, std::string> &
parameters)
84 if (clas ==
"LGAD_module") {
88 ATH_MSG_ERROR(
"addSensorType: unrecognised sensor class: " << clas);
95 const std::map<std::string, std::string> &
parameters)
100 int circuitsPerColumn{};
101 int circuitsPerRow{};
117 std::move(normalCell), padColumns, 0);
119 std::move(singleRow), padRows, 0);
125 circuitsPerColumn, circuitsPerRow,
126 padColumns, padRows/2,
127 padColumns, padRows/2,
128 std::move(fullMatrix),
137 std::map<std::string, int> &
index,
139 GeoVFullPhysVol *fpv)
149 if(useNewIdentifierScheme){
152 index[
"moduleInLayer"],
159 index[
"moduleNumberInRow"]);
180 ATH_MSG_ERROR(
"Refusing to make it into a sensitive element. Incompatible gmx and identifier-xml files.");
188 if (design ==
nullptr) {
190 throw std::runtime_error(
"readout sensor type " +
typeName +
" not found.");
200 const std::array<std::string,7> LGAD_moduleParamNames({
"thickness",
"xPitch",
"yPitch",
"circuitsPerColumn",
"circuitsPerRow",
"padColumns",
"padRows"});
202 if(LGAD_module->size() !=0){
204 std::map<std::string,std::string> LGAD_moduleMap;
205 for(
const std::string& paramName:LGAD_moduleParamNames){
206 std::string paramValue = typeParams->getString(paramName);
207 LGAD_moduleMap[paramName] = paramValue;
209 std::string LGAD_moduleName = typeParams->getString(
"SensorType");
217 std::vector<std::string>
fields({
"endcap",
"layer",
"moduleInLayer"});
219 std::map<std::string, GeoFullPhysVol*> mapFPV = sqlreader->getPublishedNodes<std::string, GeoFullPhysVol*>(
"GeoModelXML");
220 for (
const auto&[fullPhysVolInfoString, fullPhysVolPointer] : mapFPV){
222 size_t startLGAD = fullPhysVolInfoString.find(
"lgad");
223 if(startLGAD==std::string::npos){
224 ATH_MSG_DEBUG(
"GeoFullPhysVol "<<fullPhysVolInfoString<<
" does not have the expected format. Skipping");
227 std::string
typeName = fullPhysVolInfoString.substr(startLGAD);
228 std::map<std::string, int>
index;
230 size_t first = fullPhysVolInfoString.find(
field+
"_");
231 size_t last = fullPhysVolInfoString.find(
'_',
first+
field.size()+1);
232 if(
first==std::string::npos || last==std::string::npos){
233 ATH_MSG_DEBUG(
"Could not extract "<<
field<<
" from "<<fullPhysVolInfoString<<
". Skipping");
236 std::string strNew = fullPhysVolInfoString.substr(
first+
field.size()+1,last-(
first+
field.size()+1));