20 using namespace geomsort;
25 for(vector<DetLayer*>::const_iterator it = allDetLayers.begin(); it != allDetLayers.end(); ++it)
33 vector<DetLayer*>::const_iterator it;
34 for(it=csclayers.first.begin(); it!=csclayers.first.end(); it++) {
35 cscLayers_fw.push_back(*it);
37 allForward.push_back(*it);
41 detLayersMap[ makeDetLayerId(*it) ] = *it;
44 for(it=csclayers.second.begin(); it!=csclayers.second.end(); it++) {
45 cscLayers_bk.push_back(*it);
47 allBackward.push_back(*it);
51 detLayersMap[ makeDetLayerId(*it) ] = *it;
57 vector<DetLayer*>::const_iterator it;
59 for (it=barrelLayers.begin();it!=barrelLayers.end();it++){
60 rpcLayers_barrel.push_back(*it);
62 allBarrel.push_back(*it);
65 detLayersMap[ makeDetLayerId(*it) ] = *it;
67 for (it=endcapLayers.first.begin(); it!=endcapLayers.first.end(); it++){
68 rpcLayers_fw.push_back(*it);
71 allForward.push_back(*it);
75 detLayersMap[ makeDetLayerId(*it) ] = *it;
78 for (it=endcapLayers.second.begin(); it!=endcapLayers.second.end(); it++){
79 rpcLayers_bk.push_back(*it);
82 allBackward.push_back(*it);
86 detLayersMap[ makeDetLayerId(*it) ] = *it;
93 vector<DetLayer*>::const_iterator it;
94 for(it=dtlayers.begin(); it!=dtlayers.end(); it++) {
95 dtLayers.push_back(*it);
96 allBarrel.push_back(*it);
99 detLayersMap[ makeDetLayerId(*it) ] = *it;
110 if(
id.
ring() == 1 ||
id.ring() == 4)
112 else if(
id.
ring() == 2 ||
id.ring() == 3)
115 throw cms::Exception(
"InvalidCSCRing")<<
" Invalid CSC Ring: "<<
id.ring()<<endl;
134 const vector<DetLayer*>&
139 const vector<DetLayer*>&
141 return cscLayers_all;
145 const vector<DetLayer*>&
151 const vector<DetLayer*>&
157 const vector<DetLayer*>&
159 return rpcLayers_all;
163 const vector<DetLayer*>&
165 return rpcLayers_barrel;
169 const vector<DetLayer*>&
171 return rpcLayers_endcap;
175 const vector<DetLayer*>&
181 const vector<DetLayer*>&
187 const vector<DetLayer*>&
193 const vector<DetLayer*>&
198 const vector<DetLayer*>&
204 const vector<DetLayer*>&
210 const vector<DetLayer*>&
222 if(cscId.station() == 1)
224 if(cscId.ring() == 1 || cscId.ring() == 4)
225 id =
CSCDetId(cscId.endcap(),1,1,0,0);
226 else if(cscId.ring() == 2 || cscId.ring() == 3)
227 id =
CSCDetId(cscId.endcap(),1,2,0,0);
229 throw cms::Exception(
"InvalidCSCRing")<<
" Invalid CSC Ring: "<<cscId.ring()<<endl;
231 else id =
CSCDetId(cscId.endcap(),cscId.station(),0,0,0);
240 id =
RPCDetId(rpcId.region(),0,rpcId.station(),0,rpcId.layer(),0,0);
245 std::map<DetId,DetLayer*>::const_iterator layer = detLayersMap.find(
id);
246 if (layer == detLayersMap.end())
return 0;
247 return layer->second;
281 cscLayers_all.reserve(cscLayers_bk.size()+cscLayers_fw.size());
282 std::copy(cscLayers_bk.begin(),cscLayers_bk.end(),back_inserter(cscLayers_all));
283 std::reverse(cscLayers_all.begin(),cscLayers_all.end());
284 std::copy(cscLayers_fw.begin(),cscLayers_fw.end(),back_inserter(cscLayers_all));
287 rpcLayers_endcap.reserve(rpcLayers_bk.size()+rpcLayers_fw.size());
288 std::copy(rpcLayers_bk.begin(),rpcLayers_bk.end(),back_inserter(rpcLayers_endcap));
289 std::reverse(rpcLayers_endcap.begin(),rpcLayers_endcap.end());
290 std::copy(rpcLayers_fw.begin(),rpcLayers_fw.end(),back_inserter(rpcLayers_endcap));
293 rpcLayers_all.reserve(rpcLayers_bk.size()+rpcLayers_barrel.size()+rpcLayers_fw.size());
294 std::copy(rpcLayers_bk.begin(),rpcLayers_bk.end(),back_inserter(rpcLayers_all));
295 std::reverse(rpcLayers_all.begin(),rpcLayers_all.end());
296 std::copy(rpcLayers_barrel.begin(),rpcLayers_barrel.end(),back_inserter(rpcLayers_all));
297 std::copy(rpcLayers_fw.begin(),rpcLayers_fw.end(),back_inserter(rpcLayers_all));
300 allEndcap.reserve(allBackward.size()+allForward.size());
301 std::copy(allBackward.begin(),allBackward.end(),back_inserter(allEndcap));
302 std::reverse(allEndcap.begin(),allEndcap.end());
303 std::copy(allForward.begin(),allForward.end(),back_inserter(allEndcap));
306 allDetLayers.reserve(allBackward.size()+allBarrel.size()+allForward.size());
307 std::copy(allBackward.begin(),allBackward.end(),back_inserter(allDetLayers));
308 std::reverse(allDetLayers.begin(),allDetLayers.end());
309 std::copy(allBarrel.begin(),allBarrel.end(),back_inserter(allDetLayers));
310 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)
void addDTLayers(const std::vector< DetLayer * > &dtlayers)
const std::vector< DetLayer * > & backwardRPCLayers() const
return the backward (-Z) RPC DetLayers, inside-out
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
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
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 addRPCLayers(const std::vector< DetLayer * > &barrelRPCLayers, const std::pair< std::vector< DetLayer * >, std::vector< DetLayer * > > &endcapRPCLayers)
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
void addCSCLayers(const std::pair< std::vector< DetLayer * >, std::vector< DetLayer * > > &csclayers)
const std::vector< DetLayer * > & allRPCLayers() const
return all RPC DetLayers, order: backward, barrel, forward