26 vector<DetLayer*>
result[2];
27 const std::string metname =
"Muon|RecoMuon|RecoMuonDetLayers|MuonME0DetLayerGeometryBuilder";
28 LogTrace(metname) <<
"Starting endcaplayers ";
30 int iendcap = (
endcap == 1) ? 0 : 1;
37 LogTrace(metname) <<
"Encap = " <<
endcap <<
"Chambers = " << chambers.size() <<
"Rolls = " << rolls.size();
41 result[iendcap].push_back(ringLayer);
43 pair<vector<DetLayer*>, vector<DetLayer*> > res_pair(result[0], result[1]);
50 const std::string metname =
"Muon|RecoMuon|RecoMuonDetLayers|MuonME0DetLayerGeometryBuilder";
52 vector<const ForwardDetRing*> frontRings, backRings;
54 LogTrace(metname) <<
"Starting to Build Layer ";
56 for (vector<int>::iterator roll = rolls.begin(); roll != rolls.end(); roll++) {
59 vector<const GeomDet*> frontDets, backDets;
65 if (geomDet !=
nullptr) {
66 bool isInFront = isFront(me0Id);
68 frontDets.push_back(geomDet);
70 backDets.push_back(geomDet);
75 if (!frontDets.empty()) {
77 frontRings.push_back(
new MuDetRing(frontDets));
78 LogTrace(metname) <<
"New front ring with " << frontDets.size()
79 <<
" chambers at z=" << frontRings.back()->position().z();
81 if (!backDets.empty()) {
83 backRings.push_back(
new MuDetRing(backDets));
84 LogTrace(metname) <<
"New back ring with " << backDets.size()
85 <<
" chambers at z=" << backRings.back()->position().z();
89 LogTrace(metname) <<
"About to make a MuRingForwardLayer";
90 if (!frontRings.empty())
94 if (result !=
nullptr) {
95 LogTrace(metname) <<
"New MuRingForwardLayer with " << frontRings.size() <<
" and " << backRings.size()
96 <<
" rings, at Z " << result->position().z() <<
" R1: " << result->specificSurface().innerRadius()
97 <<
" R2: " << result->specificSurface().outerRadius();
110 const std::string metname =
"Muon|RecoMuon|RecoMuonDetLayers|MuonME0DetLayerGeometryBuilder";
114 LogTrace(metname) <<
"New MuDetRing with " << geomDets.size() <<
" chambers at z=" << result->position().z()
115 <<
" R1: " << result->specificSurface().innerRadius()
116 <<
" R2: " << result->specificSurface().outerRadius();
static const int minChamberId
static const int maxChamberId
ExtractPhi< GeomDet, float > DetPhi
const std::string metname
static MuDetRing * makeDetRing(std::vector< const GeomDet * > &geomDets)
void precomputed_value_sort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr, const Compare &comp)
static std::pair< std::vector< DetLayer * >, std::vector< DetLayer * > > buildEndcapLayers(const ME0Geometry &geo)
const GeomDet * idToDet(DetId) const override
static bool isFront(const ME0DetId &me0Id)
static MuRingForwardLayer * buildLayer(int endcap, int layer, std::vector< int > &chambers, std::vector< int > &rolls, const ME0Geometry &geo)
static char chambers[264][20]
virtual ~MuonME0DetLayerGeometryBuilder()
Destructor.