17 pair<vector<DetLayer*>, vector<DetLayer*> >
20 vector<DetLayer*>
result[2];
22 for(
int i=0;
i<2;
i++) {
33 if (layer) result[
i].push_back(layer);
43 if (layer) result[
i].push_back(layer);
50 rings.push_back(
ring);
53 if (layer) result[
i].push_back(layer);
56 pair<vector<DetLayer*>, vector<DetLayer*> > res_pair(result[0], result[1]);
64 const std::string metname =
"Muon|RecoMuon|RecoMuonDetLayers|MuonCSCDetLayerGeometryBuilder";
67 vector<const ForwardDetRing*> frontRings, backRings;
69 for (vector<int>::iterator
ring = rings.begin();
ring!=rings.end();
ring++) {
70 vector<const GeomDet*> frontGeomDets, backGeomDets;
76 if(geomDet !=
nullptr)
80 frontGeomDets.push_back(geomDet);
84 backGeomDets.push_back(geomDet);
86 LogTrace(metname) <<
"get CSC chamber " 91 <<
" isFront? " << isInFront;
95 if(!backGeomDets.empty())
97 backRings.push_back(makeDetRing(backGeomDets));
100 if(!frontGeomDets.empty())
102 frontRings.push_back(makeDetRing(frontGeomDets));
103 assert(!backGeomDets.empty());
104 float frontz = frontRings[0]->position().z();
105 float backz = backRings[0]->position().z();
106 assert(fabs(frontz) < fabs(backz));
113 LogTrace(metname) <<
"New MuRingForwardLayer with " << frontRings.size()
114 <<
" and " << backRings.size()
115 <<
" rings, at Z " << result->position().z()
116 <<
" R1: " << result->specificSurface().innerRadius()
117 <<
" R2: " << result->specificSurface().outerRadius();
126 bool isOverlapping = !(station == 1 && ring == 3);
130 bool isEven = (chamber%2==0);
133 result = (station<3) ? isEven : !isEven;
142 const std::string metname =
"Muon|RecoMuon|RecoMuonDetLayers|MuonCSCDetLayerGeometryBuilder";
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
const GeomDet * idToDet(DetId) const override
const std::string metname
Geom::Phi< T > phi() const
static bool isFront(int station, int ring, int chamber)
static int maxStationId()
static int minChamberId()
const Surface::PositionType & position() const
The position (origin of the R.F.)
static std::pair< std::vector< DetLayer * >, std::vector< DetLayer * > > buildLayers(const CSCGeometry &geo)
static MuDetRing * makeDetRing(std::vector< const GeomDet * > &geomDets)
void precomputed_value_sort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr, const Compare &comp)
static int maxChamberId()
static MuRingForwardDoubleLayer * buildLayer(int endcap, int station, std::vector< int > &rings, const CSCGeometry &geo)