24 vector<DetLayer*> endcapLayers[2];
26 const std::string metname =
"Muon|RecoMuon|RecoMuonDetLayers|MuonGEMDetLayerGeometryBuilder";
31 vector<const ForwardDetRing*> frontRings, backRings;
34 vector<const GeomDet*> frontDets, backDets;
36 for (
auto sc : st->superChambers()) {
37 auto ch = sc->chamber(
layer);
41 auto etaP = ch->etaPartition(roll);
45 bool isInFront = isFront(etaP->id());
47 frontDets.push_back(etaP);
49 backDets.push_back(etaP);
53 if (!frontDets.empty()) {
55 frontRings.push_back(
new MuDetRing(frontDets));
56 LogTrace(metname) <<
"New front ring with " << frontDets.size()
57 <<
" chambers at z=" << frontRings.back()->position().z();
59 if (!backDets.empty()) {
61 backRings.push_back(
new MuDetRing(backDets));
62 LogTrace(metname) <<
"New back ring with " << backDets.size()
63 <<
" chambers at z=" << backRings.back()->position().z();
67 if (!frontRings.empty()) {
70 else if (!backRings.empty())
74 if (forwardLayer !=
nullptr) {
75 LogTrace(metname) <<
"New MuRingForwardLayer with " << frontRings.size() <<
" and " << backRings.size()
76 <<
" rings, at Z " << forwardLayer->
position().
z()
80 int iendcap = (st->region() == 1) ? 0 : 1;
81 endcapLayers[iendcap].push_back(forwardLayer);
86 pair<vector<DetLayer*>, vector<DetLayer*> > res_pair(endcapLayers[0], endcapLayers[1]);
95 return (gemId.
chamber() % 2 == 0);
99 const std::string metname =
"Muon|RecoMuon|RecoMuonDetLayers|MuonGEMDetLayerGeometryBuilder";
103 LogTrace(metname) <<
"New MuDetRing with " << geomDets.size() <<
" chambers at z=" << result->position().z()
104 <<
" R1: " << result->specificSurface().innerRadius()
105 <<
" R2: " << result->specificSurface().outerRadius();
ExtractPhi< GeomDet, float > DetPhi
const std::string metname
static constexpr int32_t maxLayerId0
constexpr std::array< uint8_t, layerIndexSize > layer
static constexpr int32_t minStationId0
static bool isFront(const GEMDetId &gemId)
virtual ~MuonGEMDetLayerGeometryBuilder()
Destructor.
void precomputed_value_sort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr, const Compare &comp)
virtual const Surface::PositionType & position() const
Returns position of the surface.
constexpr int chamber() const
static constexpr int32_t minRollId
constexpr int station() const
static constexpr int32_t maxLayerId
virtual const BoundDisk & specificSurface() const final
const std::vector< const GEMStation * > & stations() const
Return a vector of all GEM stations.
static constexpr int32_t minLayerId
static MuDetRing * makeDetRing(std::vector< const GeomDet * > &geomDets)
static constexpr int32_t maxRollId
static std::pair< std::vector< DetLayer * >, std::vector< DetLayer * > > buildEndcapLayers(const GEMGeometry &geo)