141 std::vector<const MTDDetSector*> frontSectors, backSectors;
143 LogDebug(
"MTDDetLayers") <<
"ETL dets array size = " << geo.
detsETL().size();
146 std::vector<const GeomDet*> frontGeomDets, backGeomDets;
149 unsigned int nfront(0), nback(0);
151 for (
auto det : geo.
detsETL()) {
152 ETLDetId theMod(det->geographicalId().rawId());
153 if (theMod.mtdSide() ==
endcap && theMod.nDisc() ==
layer && theMod.sector() ==
static_cast<int>(
sector)) {
154 LogTrace(
"MTDLayerDump") <<
std::fixed <<
"ETLDetId " << theMod.rawId() <<
" side = " << std::setw(4)
155 << theMod.mtdSide() <<
" Disc/Side/Sector = " << std::setw(4) << theMod.nDisc() <<
" " 156 << std::setw(4) << theMod.discSide() <<
" " << std::setw(4) << theMod.sector()
157 <<
" mod/type = " << std::setw(4) << theMod.module() <<
" " << std::setw(4)
158 << theMod.modType() <<
" pos = " << det->position();
160 if (theMod.discSide() == 0) {
163 LogTrace(
"MTDDetLayers") <<
"Front " << theMod.discSide() <<
" " << nfront;
165 frontGeomDets.emplace_back(det);
167 }
else if (theMod.discSide() == 1) {
170 LogTrace(
"MTDDetLayers") <<
"Back " << theMod.discSide() <<
" " << nback;
172 backGeomDets.emplace_back(det);
177 if (!backGeomDets.empty()) {
179 LogDebug(
"MTDDetLayers") <<
"backGeomDets size = " << backGeomDets.size();
183 if (!frontGeomDets.empty()) {
185 LogDebug(
"MTDDetLayers") <<
"frontGeomDets size = " << frontGeomDets.size();
186 frontSectors.emplace_back(
makeDetSector(frontGeomDets, topo));
187 assert(!backGeomDets.empty());
188 float frontz = frontSectors.back()->position().z();
189 float backz = backSectors.back()->position().z();
195 LogTrace(
"MTDDetLayers") <<
"New MTDSectorForwardDoubleLayer with " <<
std::fixed << std::setw(14)
196 << frontSectors.size() <<
" and " << std::setw(14) << backSectors.size() <<
" rings, at Z " 197 << std::setw(14) <<
result->specificSurface().position().z() <<
" R1: " << std::setw(14)
198 <<
result->specificSurface().innerRadius() <<
" R2: " << std::setw(14)
199 <<
result->specificSurface().outerRadius();
static MTDDetSector * makeDetSector(std::vector< const GeomDet *> &geomDets, const MTDTopology &topo)
const DetContainer & detsETL() const
constexpr std::array< uint8_t, layerIndexSize< TrackerTraits > > layer
Abs< T >::type abs(const T &t)
static bool orderETLSector(const GeomDet *&gd1, const GeomDet *&gd2)
Detector identifier class for the Endcap Timing Layer.