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));
57 <<
" chambers at z=" << frontRings.back()->position().z();
59 if (!backDets.empty()) {
61 backRings.push_back(
new MuDetRing(backDets));
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();
constexpr int station() const
virtual const Surface::PositionType & position() const
Returns position of the surface.
ExtractPhi< GeomDet, float > DetPhi
const std::string metname
const std::vector< const GEMStation * > & stations() const
Return a vector of all GEM stations.
constexpr int chamber() const
static constexpr int32_t maxLayerId0
static constexpr int32_t minStationId0
static bool isFront(const GEMDetId &gemId)
static MuDetRing * makeDetRing(std::vector< const GeomDet *> &geomDets)
virtual ~MuonGEMDetLayerGeometryBuilder()
Destructor.
void precomputed_value_sort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr, const Compare &comp)
static constexpr int32_t minRollId
static constexpr int32_t maxLayerId
virtual const BoundDisk & specificSurface() const final
static constexpr int32_t minLayerId
static constexpr int32_t maxRollId
static std::pair< std::vector< DetLayer * >, std::vector< DetLayer * > > buildEndcapLayers(const GEMGeometry &geo)