25 pair<vector<DetLayer*>, vector<DetLayer*> >
28 vector<DetLayer*>
result[2];
31 int iendcap = (
endcap==1) ? 0 : 1;
36 std::vector<int> rings;
39 rings.push_back(
ring);
42 rolls.push_back(roll);
45 chambers.push_back(chamber);
50 if (ringLayer) result[iendcap].push_back(ringLayer);
58 pair<vector<DetLayer*>, vector<DetLayer*> > res_pair(result[0], result[1]);
73 const std::string metname =
"Muon|RecoMuon|RecoMuonDetLayers|MuonGEMDetLayerGeometryBuilder";
75 vector<const ForwardDetRing*> frontRings, backRings;
78 for (std::vector<int>::iterator
ring=rings.begin();
ring!=rings.end()-2;
ring++){
80 for (vector<int>::iterator roll = rolls.begin(); roll!=rolls.end(); roll++) {
82 vector<const GeomDet*> frontDets, backDets;
84 for(std::vector<int>::iterator chamber=chambers.begin()+1; chamber<chambers.end(); chamber++) {
85 GEMDetId gemId(endcap,(*
ring), station,layer,(*chamber), (*roll));
90 bool isInFront = isFront(gemId);
93 frontDets.push_back(geomDet);
97 backDets.push_back(geomDet);
99 LogTrace(metname) <<
"get GEM Endcap roll "
101 << (isInFront ?
"front" :
"back ")
108 if (frontDets.size()!=0) {
110 frontRings.push_back(
new MuDetRing(frontDets));
111 LogTrace(metname) <<
"New front ring with " << frontDets.size()
112 <<
" chambers at z="<< frontRings.back()->position().z();
114 if (backDets.size()!=0) {
116 backRings.push_back(
new MuDetRing(backDets));
117 LogTrace(metname) <<
"New back ring with " << backDets.size()
118 <<
" chambers at z="<< backRings.back()->position().z();
130 LogTrace(metname) <<
"New MuRingForwardLayer with " << frontRings.size()
131 <<
" and " << backRings.size()
132 <<
" rings, at Z " << result->position().z()
133 <<
" R1: " << result->specificSurface().innerRadius()
134 <<
" R2: " << result->specificSurface().outerRadius();
147 if(chamber%2 == 0) result = !
result;
154 const std::string metname =
"Muon|RecoMuon|RecoMuonDetLayers|MuonGEMDetLayerGeometryBuilder";
159 LogTrace(metname) <<
"New MuDetRing with " << geomDets.size()
160 <<
" chambers at z="<< result->position().z()
161 <<
" R1: " << result->specificSurface().innerRadius()
162 <<
" R2: " << result->specificSurface().outerRadius();
ExtractPhi< GeomDet, float > DetPhi
static const int minRingId
const std::string metname
virtual const GeomDet * idToDet(DetId) const override
static const int minChamberId
Geom::Phi< T > phi() const
static const int maxRollId
int chamber() const
Chamber id: it identifies a chamber in a ring it goes from 1 to 36.
static const int maxChamberId
static const int maxLayerId
const Surface::PositionType & position() const
The position (origin of the R.F.)
static const int minRollId
static const int maxStationId
static bool isFront(const GEMDetId &gemId)
static const int minStationId
void precomputed_value_sort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr)
static const int maxRingId
static const int minLayerId
static char chambers[264][20]
static MuDetRing * makeDetRing(std::vector< const GeomDet * > &geomDets)
static std::pair< std::vector< DetLayer * >, std::vector< DetLayer * > > buildEndcapLayers(const GEMGeometry &geo)
static MuRingForwardDoubleLayer * buildLayer(int endcap, std::vector< int > &rings, int station, int layer, std::vector< int > &chambers, std::vector< int > &rolls, const GEMGeometry &geo)