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                 LGAD_moduleMap[paramName] = typeParams->getString(paramName);
 
  208             std::string LGAD_moduleName = typeParams->getString(
"SensorType");
 
  216     std::vector<std::string> 
fields({
"endcap",
"layer",
"moduleInLayer"});
 
  218     std::map<std::string, GeoFullPhysVol*> mapFPV = sqlreader->getPublishedNodes<std::string, GeoFullPhysVol*>(
"GeoModelXML");
 
  219     for (
const auto&[fullPhysVolInfoString, fullPhysVolPointer] : mapFPV){
 
  221         size_t startLGAD = fullPhysVolInfoString.find(
"lgad");
 
  222         if(startLGAD==std::string::npos){
 
  223             ATH_MSG_DEBUG(
"GeoFullPhysVol "<<fullPhysVolInfoString<<
" does not have the expected format. Skipping");
 
  226         std::string 
typeName = fullPhysVolInfoString.substr(startLGAD);
 
  227         std::map<std::string, int> 
index;
 
  229             size_t first = fullPhysVolInfoString.find(
field+
"_");
 
  230             size_t last = fullPhysVolInfoString.find(
'_',
first+
field.size()+1);
 
  231             if(
first==std::string::npos || last==std::string::npos){
 
  232                 ATH_MSG_DEBUG(
"Could not extract "<<
field<<
" from "<<fullPhysVolInfoString<<
". Skipping");
 
  235             std::string strNew = fullPhysVolInfoString.substr(
first+
field.size()+1,last-(
first+
field.size()+1));