21 vector<DetLayer*>
result[2];
27 unsigned int nSector(1);
33 throw cms::Exception(
"MTDDetLayers") <<
"Not implemented scenario " << mtdTopologyMode;
52 pair<vector<DetLayer*>, vector<DetLayer*> > res_pair(
result[1],
result[0]);
62 std::vector<const MTDDetSector*> frontSectors, backSectors;
64 LogDebug(
"MTDDetLayers") <<
"ETL dets array size = " << geo.
detsETL().size();
67 std::vector<const GeomDet*> frontGeomDets, backGeomDets;
68 LogDebug(
"MTDDetLayers") <<
"endcap = " <<
endcap <<
" layer = " << layer <<
" sector = " <<
sector;
70 unsigned int nfront(0), nback(0);
72 for (
auto det : geo.
detsETL()) {
73 ETLDetId theMod(det->geographicalId().rawId());
74 if (theMod.mtdSide() ==
endcap && theMod.nDisc() == layer && theMod.sector() ==
static_cast<int>(
sector)) {
75 LogTrace(
"MTDLayerDump") <<
std::fixed <<
"ETLDetId " << theMod.rawId() <<
" side = " << std::setw(4)
76 << theMod.mtdSide() <<
" Disc/Side/Sector = " << std::setw(4) << theMod.nDisc() <<
" " 77 << std::setw(4) << theMod.discSide() <<
" " << std::setw(4) << theMod.sector()
78 <<
" mod/type = " << std::setw(4) << theMod.module() <<
" " << std::setw(4)
79 << theMod.modType() <<
" pos = " << det->position();
81 if (theMod.discSide() == 0) {
84 LogTrace(
"MTDDetLayers") <<
"Front " << theMod.discSide() <<
" " << nfront;
86 frontGeomDets.emplace_back(det);
88 }
else if (theMod.discSide() == 1) {
91 LogTrace(
"MTDDetLayers") <<
"Back " << theMod.discSide() <<
" " << nback;
93 backGeomDets.emplace_back(det);
98 if (!backGeomDets.empty()) {
100 LogDebug(
"MTDDetLayers") <<
"backGeomDets size = " << backGeomDets.size();
101 backSectors.emplace_back(makeDetSector(backGeomDets, topo));
104 if (!frontGeomDets.empty()) {
106 LogDebug(
"MTDDetLayers") <<
"frontGeomDets size = " << frontGeomDets.size();
107 frontSectors.emplace_back(makeDetSector(frontGeomDets, topo));
108 assert(!backGeomDets.empty());
109 float frontz = frontSectors.back()->position().z();
110 float backz = backSectors.back()->position().z();
116 LogTrace(
"MTDDetLayers") <<
"New MTDSectorForwardDoubleLayer with " <<
std::fixed << std::setw(14)
117 << frontSectors.size() <<
" and " << std::setw(14) << backSectors.size() <<
" rings, at Z " 118 << std::setw(14) <<
result->specificSurface().position().z() <<
" R1: " << std::setw(14)
119 <<
result->specificSurface().innerRadius() <<
" R2: " << std::setw(14)
120 <<
result->specificSurface().outerRadius();
127 LogTrace(
"MTDDetLayers") <<
"ETLDetLayerGeometryBuilder::makeDetSector new MTDDetSector with " <<
std::fixed 128 << std::setw(14) << geomDets.size() <<
" modules \n"
static MTDDetSector * makeDetSector(std::vector< const GeomDet *> &geomDets, const MTDTopology &topo)
int getMTDTopologyMode() const
static MTDSectorForwardDoubleLayer * buildLayer(int endcap, int layer, std::vector< unsigned > §ors, const MTDGeometry &geo, const MTDTopology &topo)
const DetContainer & detsETL() const
static bool isFront(int layer, int ring, int module)
Abs< T >::type abs(const T &t)
static bool orderETLSector(const GeomDet *&gd1, const GeomDet *&gd2)
static constexpr int kETLv5maxSector
ETLDetId::EtlLayout etlLayoutFromTopoMode(const int &topoMode)
static constexpr int kETLv4maxSector
Detector identifier class for the Endcap Timing Layer.
static std::pair< std::vector< DetLayer * >, std::vector< DetLayer * > > buildLayers(const MTDGeometry &geo, const MTDTopology &topo)
static constexpr int kETLv4nDisc