23 vector<DetLayer*>
result[2];
30 vector<unsigned> rings;
33 rings.push_back(
ring);
43 unsigned int nSector(1);
44 switch (mtdTopologyMode) {
52 throw cms::Exception(
"MTDDetLayers") <<
"Not implemented scenario " << mtdTopologyMode;
61 for (
unsigned sector = 1; sector <= nSector; ++sector) {
73 pair<vector<DetLayer*>, vector<DetLayer*> > res_pair(
result[1],
result[0]);
79 vector<unsigned>& rings,
83 vector<const ForwardDetRing*> frontRings, backRings;
85 for (
unsigned ring : rings) {
86 vector<const GeomDet*> frontGeomDets, backGeomDets;
91 bool isInFront = isFront(
layer,
ring, module);
92 if (geomDet !=
nullptr) {
94 frontGeomDets.push_back(geomDet);
96 backGeomDets.push_back(geomDet);
101 <<
" isFront? " << isInFront;
105 if (!backGeomDets.empty()) {
106 backRings.push_back(makeDetRing(backGeomDets));
109 if (!frontGeomDets.empty()) {
110 frontRings.push_back(makeDetRing(frontGeomDets));
111 assert(!backGeomDets.empty());
112 float frontz = frontRings[0]->position().z();
113 float backz = backRings[0]->position().z();
121 LogTrace(
"MTDDetLayers") <<
"New MTDRingForwardLayer with " << frontRings.size() <<
" and " << backRings.size()
122 <<
" rings, at Z " <<
result->position().z()
123 <<
" R1: " <<
result->specificSurface().innerRadius()
124 <<
" R2: " <<
result->specificSurface().outerRadius();
133 LogTrace(
"MTDDetLayers") <<
"ETLDetLayerGeometryBuilder: new MTDDetRing with " << geomDets.size()
134 <<
" chambers at z=" <<
result->position().z()
135 <<
" R1: " <<
result->specificSurface().innerRadius()
136 <<
" R2: " <<
result->specificSurface().outerRadius();
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();
183 backSectors.emplace_back(makeDetSector(backGeomDets, topo));
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();
209 LogTrace(
"MTDDetLayers") <<
"ETLDetLayerGeometryBuilder::makeDetSector new MTDDetSector with " <<
std::fixed
210 << std::setw(14) << geomDets.size() <<
" modules \n"