Builds the forward (+Z, return.first) and backward (-Z, return.second) layers. Both vectors are sorted inside-out
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]);
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.
static constexpr int32_t maxLayerId0
static constexpr int32_t minStationId0
static bool isFront(const GEMDetId &gemId)
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