21 vector<DetLayer*>
result[2];
27 unsigned int nSector(1);
35 throw cms::Exception(
"MTDDetLayers") <<
"Not implemented scenario " << mtdTopologyMode;
54 pair<vector<DetLayer*>, vector<DetLayer*> > res_pair(
result[1],
result[0]);
64 std::vector<const MTDDetSector*> frontSectors, backSectors;
66 LogDebug(
"MTDDetLayers") <<
"ETL dets array size = " << geo.
detsETL().size();
69 std::vector<const GeomDet*> frontGeomDets, backGeomDets;
70 LogDebug(
"MTDDetLayers") <<
"endcap = " <<
endcap <<
" layer = " << layer <<
" sector = " <<
sector;
72 unsigned int nfront(0), nback(0);
74 for (
auto det : geo.
detsETL()) {
75 ETLDetId theMod(det->geographicalId().rawId());
76 if (theMod.mtdSide() ==
endcap && theMod.nDisc() == layer && theMod.sector() ==
static_cast<int>(
sector)) {
77 LogTrace(
"MTDLayerDump") <<
std::fixed <<
"ETLDetId " << theMod.rawId() <<
" side = " << std::setw(4)
78 << theMod.mtdSide() <<
" Disc/Side/Sector = " << std::setw(4) << theMod.nDisc() <<
" " 79 << std::setw(4) << theMod.discSide() <<
" " << std::setw(4) << theMod.sector()
80 <<
" mod/type = " << std::setw(4) << theMod.module() <<
" " << std::setw(4)
81 << theMod.modType() <<
" pos = " << det->position();
83 if (theMod.discSide() == 0) {
86 LogTrace(
"MTDDetLayers") <<
"Front " << theMod.discSide() <<
" " << nfront;
88 frontGeomDets.emplace_back(det);
90 }
else if (theMod.discSide() == 1) {
93 LogTrace(
"MTDDetLayers") <<
"Back " << theMod.discSide() <<
" " << nback;
95 backGeomDets.emplace_back(det);
100 if (!backGeomDets.empty()) {
102 LogDebug(
"MTDDetLayers") <<
"backGeomDets size = " << backGeomDets.size();
103 backSectors.emplace_back(makeDetSector(backGeomDets, topo));
106 if (!frontGeomDets.empty()) {
108 LogDebug(
"MTDDetLayers") <<
"frontGeomDets size = " << frontGeomDets.size();
109 frontSectors.emplace_back(makeDetSector(frontGeomDets, topo));
110 assert(!backGeomDets.empty());
111 float frontz = frontSectors.back()->position().z();
112 float backz = backSectors.back()->position().z();
118 LogTrace(
"MTDDetLayers") <<
"New MTDSectorForwardDoubleLayer with " <<
std::fixed << std::setw(14)
119 << frontSectors.size() <<
" and " << std::setw(14) << backSectors.size() <<
" rings, at Z " 120 << std::setw(14) <<
result->specificSurface().position().z() <<
" R1: " << std::setw(14)
121 <<
result->specificSurface().innerRadius() <<
" R2: " << std::setw(14)
122 <<
result->specificSurface().outerRadius();
129 LogTrace(
"MTDDetLayers") <<
"ETLDetLayerGeometryBuilder::makeDetSector new MTDDetSector with " <<
std::fixed 130 << 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