144 std::vector<const MTDDetSector*> frontSectors, backSectors;
146 LogDebug(
"MTDDetLayers") <<
"ETL dets array size = " << geo.
detsETL().size();
148 for (
unsigned sector :
sectors) {
149 std::vector<const GeomDet*> frontGeomDets, backGeomDets;
150 LogDebug(
"MTDDetLayers") <<
"endcap = " <<
endcap <<
" layer = " <<
layer <<
" sector = " << sector;
152 unsigned int nfront(0), nback(0);
154 for (
auto det : geo.
detsETL()) {
155 ETLDetId theMod(det->geographicalId().rawId());
156 if (theMod.mtdSide() ==
endcap && theMod.nDisc() ==
layer && theMod.sector() == static_cast<int>(sector)) {
157 LogTrace(
"MTDLayerDump") <<
std::fixed <<
"ETLDetId " << theMod.rawId() <<
" side = " << std::setw(4)
158 << theMod.mtdSide() <<
" Disc/Side/Sector = " << std::setw(4) << theMod.nDisc() <<
" "
159 << std::setw(4) << theMod.discSide() <<
" " << std::setw(4) << theMod.sector()
160 <<
" mod/type = " << std::setw(4) << theMod.module() <<
" " << std::setw(4)
161 << theMod.modType() <<
" pos = " << det->position();
163 if (theMod.discSide() == 0) {
166 LogTrace(
"MTDDetLayers") <<
"Front " << theMod.discSide() <<
" " << nfront;
168 frontGeomDets.emplace_back(det);
170 }
else if (theMod.discSide() == 1) {
173 LogTrace(
"MTDDetLayers") <<
"Back " << theMod.discSide() <<
" " << nback;
175 backGeomDets.emplace_back(det);
180 if (!backGeomDets.empty()) {
182 LogDebug(
"MTDDetLayers") <<
"backGeomDets size = " << backGeomDets.size();
186 if (!frontGeomDets.empty()) {
188 LogDebug(
"MTDDetLayers") <<
"frontGeomDets size = " << frontGeomDets.size();
189 frontSectors.emplace_back(
makeDetSector(frontGeomDets, topo));
190 assert(!backGeomDets.empty());
191 float frontz = frontSectors.back()->position().z();
192 float backz = backSectors.back()->position().z();
198 LogTrace(
"MTDDetLayers") <<
"New MTDSectorForwardDoubleLayer with " <<
std::fixed << std::setw(14)
199 << frontSectors.size() <<
" and " << std::setw(14) << backSectors.size() <<
" rings, at Z "
200 << std::setw(14) <<
result->specificSurface().position().z() <<
" R1: " << std::setw(14)
201 <<
result->specificSurface().innerRadius() <<
" R2: " << std::setw(14)
202 <<
result->specificSurface().outerRadius();