22 using namespace geomsort;
27 for(vector<DetLayer*>::const_iterator it = allDetLayers.begin(); it != allDetLayers.end(); ++it)
35 vector<DetLayer*>::const_iterator it;
36 for(it=csclayers.first.begin(); it!=csclayers.first.end(); it++) {
37 cscLayers_fw.push_back(*it);
39 allForward.push_back(*it);
43 detLayersMap[ makeDetLayerId(*it) ] = *it;
46 for(it=csclayers.second.begin(); it!=csclayers.second.end(); it++) {
47 cscLayers_bk.push_back(*it);
49 allBackward.push_back(*it);
53 detLayersMap[ makeDetLayerId(*it) ] = *it;
59 vector<DetLayer*>::const_iterator it;
61 for (it=barrelLayers.begin();it!=barrelLayers.end();it++){
62 rpcLayers_barrel.push_back(*it);
64 allBarrel.push_back(*it);
67 detLayersMap[ makeDetLayerId(*it) ] = *it;
69 for (it=endcapLayers.first.begin(); it!=endcapLayers.first.end(); it++){
70 rpcLayers_fw.push_back(*it);
73 allForward.push_back(*it);
77 detLayersMap[ makeDetLayerId(*it) ] = *it;
80 for (it=endcapLayers.second.begin(); it!=endcapLayers.second.end(); it++){
81 rpcLayers_bk.push_back(*it);
84 allBackward.push_back(*it);
88 detLayersMap[ makeDetLayerId(*it) ] = *it;
95 vector<DetLayer*>::const_iterator it;
96 for(it=dtlayers.begin(); it!=dtlayers.end(); it++) {
97 dtLayers.push_back(*it);
98 allBarrel.push_back(*it);
101 detLayersMap[ makeDetLayerId(*it) ] = *it;
112 if(
id.
ring() == 1 ||
id.ring() == 4)
114 else if(
id.
ring() == 2 ||
id.ring() == 3)
117 throw cms::Exception(
"InvalidCSCRing")<<
" Invalid CSC Ring: "<<
id.ring()<<endl;
136 const vector<DetLayer*>&
141 const vector<DetLayer*>&
143 return cscLayers_all;
147 const vector<DetLayer*>&
153 const vector<DetLayer*>&
159 const vector<DetLayer*>&
161 return rpcLayers_all;
165 const vector<DetLayer*>&
167 return rpcLayers_barrel;
171 const vector<DetLayer*>&
173 return rpcLayers_endcap;
177 const vector<DetLayer*>&
183 const vector<DetLayer*>&
189 const vector<DetLayer*>&
195 const vector<DetLayer*>&
200 const vector<DetLayer*>&
206 const vector<DetLayer*>&
212 const vector<DetLayer*>&
224 if(cscId.station() == 1)
226 if(cscId.ring() == 1 || cscId.ring() == 4)
227 id =
CSCDetId(cscId.endcap(),1,1,0,0);
228 else if(cscId.ring() == 2 || cscId.ring() == 3)
229 id =
CSCDetId(cscId.endcap(),1,2,0,0);
231 throw cms::Exception(
"InvalidCSCRing")<<
" Invalid CSC Ring: "<<cscId.ring()<<endl;
233 else id =
CSCDetId(cscId.endcap(),cscId.station(),0,0,0);
242 id =
RPCDetId(rpcId.region(),0,rpcId.station(),0,rpcId.layer(),0,0);
247 std::map<DetId,DetLayer*>::const_iterator layer = detLayersMap.find(
id);
248 if (layer == detLayersMap.end())
return 0;
249 return layer->second;
283 cscLayers_all.reserve(cscLayers_bk.size()+cscLayers_fw.size());
284 std::copy(cscLayers_bk.begin(),cscLayers_bk.end(),back_inserter(cscLayers_all));
285 std::reverse(cscLayers_all.begin(),cscLayers_all.end());
286 std::copy(cscLayers_fw.begin(),cscLayers_fw.end(),back_inserter(cscLayers_all));
289 rpcLayers_endcap.reserve(rpcLayers_bk.size()+rpcLayers_fw.size());
290 std::copy(rpcLayers_bk.begin(),rpcLayers_bk.end(),back_inserter(rpcLayers_endcap));
291 std::reverse(rpcLayers_endcap.begin(),rpcLayers_endcap.end());
292 std::copy(rpcLayers_fw.begin(),rpcLayers_fw.end(),back_inserter(rpcLayers_endcap));
295 rpcLayers_all.reserve(rpcLayers_bk.size()+rpcLayers_barrel.size()+rpcLayers_fw.size());
296 std::copy(rpcLayers_bk.begin(),rpcLayers_bk.end(),back_inserter(rpcLayers_all));
297 std::reverse(rpcLayers_all.begin(),rpcLayers_all.end());
298 std::copy(rpcLayers_barrel.begin(),rpcLayers_barrel.end(),back_inserter(rpcLayers_all));
299 std::copy(rpcLayers_fw.begin(),rpcLayers_fw.end(),back_inserter(rpcLayers_all));
302 allEndcap.reserve(allBackward.size()+allForward.size());
303 std::copy(allBackward.begin(),allBackward.end(),back_inserter(allEndcap));
304 std::reverse(allEndcap.begin(),allEndcap.end());
305 std::copy(allForward.begin(),allForward.end(),back_inserter(allEndcap));
308 allDetLayers.reserve(allBackward.size()+allBarrel.size()+allForward.size());
309 std::copy(allBackward.begin(),allBackward.end(),back_inserter(allDetLayers));
310 std::reverse(allDetLayers.begin(),allDetLayers.end());
311 std::copy(allBarrel.begin(),allBarrel.end(),back_inserter(allDetLayers));
312 std::copy(allForward.begin(),allForward.end(),back_inserter(allDetLayers));
const std::vector< DetLayer * > & endcapRPCLayers() const
return the endcap RPC DetLayers, -Z to +Z
const std::vector< DetLayer * > & allCSCLayers() const
return the CSC DetLayers (endcap), -Z to +Z
virtual SubDetector subDetector() const =0
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap)
const std::vector< DetLayer * > & backwardRPCLayers() const
return the backward (-Z) RPC DetLayers, inside-out
void addDTLayers(std::vector< DetLayer * > dtlayers)
const std::vector< DetLayer * > & allForwardLayers() const
return all forward (+Z) layers (CSC+RPC), inside-out
const std::vector< DetLayer * > & allDTLayers() const
return the DT DetLayers (barrel), inside-out
virtual const DetLayer * idToLayer(const DetId &detId) const
return the DetLayer which correspond to a certain DetId
uint32_t rawId() const
get the raw id
const std::vector< DetLayer * > & barrelRPCLayers() const
return the barrel RPC DetLayers, inside-out
const std::vector< DetLayer * > & forwardRPCLayers() const
return the forward (+Z) RPC DetLayers, inside-out
void addRPCLayers(std::vector< DetLayer * > barrelRPCLayers, std::pair< std::vector< DetLayer * >, std::vector< DetLayer * > > endcapRPCLayers)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
const std::vector< DetLayer * > & allEndcapLayers() const
return all endcap DetLayers (CSC+RPC), -Z to +Z
MuonDetLayerGeometry()
Constructor.
const std::vector< DetLayer * > & allBackwardLayers() const
return all backward (-Z) layers (CSC+RPC), inside-out
void addCSCLayers(std::pair< std::vector< DetLayer * >, std::vector< DetLayer * > > csclayers)
const std::vector< DetLayer * > & backwardCSCLayers() const
return the backward (-Z) CSC DetLayers, inside-out
const std::vector< DetLayer * > & allLayers() const
return all layers (DT+CSC+RPC), order: backward, barrel, forward
virtual const std::vector< const GeomDet * > & basicComponents() const =0
DetId makeDetLayerId(const DetLayer *detLayer) const
virtual ~MuonDetLayerGeometry()
Destructor.
void precomputed_value_sort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr)
const std::vector< DetLayer * > & forwardCSCLayers() const
return the forward (+Z) CSC DetLayers, inside-out
virtual const BoundCylinder & specificSurface() const GCC11_FINAL
Extension of the interface.
const std::vector< DetLayer * > & allBarrelLayers() const
return all barrel DetLayers (DT+RPC), inside-out
const std::vector< DetLayer * > & allRPCLayers() const
return all RPC DetLayers, order: backward, barrel, forward