19 using namespace asg::msgUserCode;
31 m_layerOverrides(std::move(layerOverrides))
34 ifstream
fin(filepath);
38 throw (
"FPGATrackSimPlaneMap Couldn't open " + filepath);
68 std::string
line, silicon, detReg, layerKey, geoKey;
74 istringstream sline(
line);
75 ok = ok && (sline >> geoKey);
79 m_moduleRelabel = std::make_unique<FPGATrackSimModuleRelabel>(geoKey,
false);
88 istringstream sline(
line);
90 ok = ok && (layerKey ==
"logical_s1");
98 istringstream sline(
line);
100 ok = ok && (layerKey ==
"logical_s2");
107 int nHeaderLines = 6;
108 for (
int i = 0;
i < nHeaderLines;
i++)
114 istringstream sline(
line);
115 ok = ok && (sline >> layerCounts[
i] >> silicon >> detReg);
117 ok = ok && ( (
i < (nHeaderLines/2) && silicon ==
"pixel") || (
i >= (nHeaderLines/2) && silicon ==
"SCT") );
118 ok = ok && ( (
i % (nHeaderLines/2) == 0 && detReg ==
"barrel") || (
i % (nHeaderLines/2) != 0 && (detReg ==
"endcap+" || detReg ==
"endcap-")) );
140 unsigned region_read = -1;
144 if (
line.empty() ||
line[0] ==
'!')
continue;
146 istringstream sline(
line);
148 bool ok =
static_cast<bool>(sline >>
key >> region_read);
149 if (ok &&
key ==
"region" && region_read == region)
break;
160 int BEC{}, physLayer{}, physDisk{}, logiLayer{}, logiLayer1{}, logiLayer2{}, stereo{}, nDim{};
161 string line, silicon, planeKey1, planeKey2, stereoKey;
169 if (
line.empty() ||
line[0] ==
'!')
continue;
171 istringstream sline(
line);
173 ok = ok && (sline >> silicon >>
BEC >> physDisk >> physLayer);
185 if (silicon ==
"pixel")
190 ok = ok && (sline >> planeKey1 >> logiLayer1 >> planeKey2 >> logiLayer2);
191 ok = ok && (planeKey1 ==
"plane1" && planeKey2 ==
"plane2");
193 else if (silicon ==
"SCT")
199 ok = ok && (sline >> stereoKey >> stereo >> planeKey1 >> logiLayer1 >> planeKey2 >> logiLayer2);
200 ok = ok && (planeKey1 ==
"plane1" && planeKey2 ==
"plane2" && stereoKey ==
"stereo");
209 else if (
stage == 1) logiLayer = logiLayer1;
210 else if (
stage == 2) logiLayer = logiLayer2;
217 m_map.at(sil).at(
BEC).at(physLayer).layer = logiLayer;
222 m_layerInfo[logiLayer].push_back({ siTech,
zone, physLayer, physDisk, stereo});
260 int code =
static_cast<int>(si) * 1000 +
static_cast<int>(dz) * 100 + physLayer;