25 pair<vector<DetLayer*>, vector<DetLayer*> >
28 vector<DetLayer*>
result[2];
31 int iendcap = (
endcap==1) ? 0 : 1;
41 rolls.push_back(roll);
45 if (ringLayer) result[iendcap].push_back(ringLayer);
49 pair<vector<DetLayer*>, vector<DetLayer*> > res_pair(result[0], result[1]);
61 const std::string metname =
"Muon|RecoMuon|RecoMuonDetLayers|MuonGEMDetLayerGeometryBuilder";
63 vector<const ForwardDetRing*> frontRings, backRings;
66 for (std::vector<int>::iterator
ring=rings.begin();
ring!=rings.end()-2;
ring++){
68 for (vector<int>::iterator roll = rolls.begin(); roll!=rolls.end(); roll++) {
70 vector<const GeomDet*> frontDets, backDets;
77 if (geomDet !=
nullptr) {
78 bool isInFront = isFront(gemId);
81 frontDets.push_back(geomDet);
85 backDets.push_back(geomDet);
87 LogTrace(metname) <<
"get GEM Endcap roll " 89 << (isInFront ?
"front" :
"back ")
96 if (!frontDets.empty()) {
98 frontRings.push_back(
new MuDetRing(frontDets));
99 LogTrace(metname) <<
"New front ring with " << frontDets.size()
100 <<
" chambers at z="<< frontRings.back()->position().z();
102 if (!backDets.empty()) {
104 backRings.push_back(
new MuDetRing(backDets));
105 LogTrace(metname) <<
"New back ring with " << backDets.size()
106 <<
" chambers at z="<< backRings.back()->position().z();
116 else result =
nullptr;
117 if(result !=
nullptr){
118 LogTrace(metname) <<
"New MuRingForwardLayer with " << frontRings.size()
119 <<
" and " << backRings.size()
120 <<
" rings, at Z " << result->position().z()
121 <<
" R1: " << result->specificSurface().innerRadius()
122 <<
" R2: " << result->specificSurface().outerRadius();
135 if(chamber%2 == 0) result = !
result;
142 const std::string metname =
"Muon|RecoMuon|RecoMuonDetLayers|MuonGEMDetLayerGeometryBuilder";
147 LogTrace(metname) <<
"New MuDetRing with " << geomDets.size()
148 <<
" chambers at z="<< result->position().z()
149 <<
" R1: " << result->specificSurface().innerRadius()
150 <<
" R2: " << result->specificSurface().outerRadius();
ExtractPhi< GeomDet, float > DetPhi
static const int minRingId
const std::string metname
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)
virtual ~MuonGEMDetLayerGeometryBuilder()
Destructor.
const GeomDet * idToDet(DetId) const override
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)