CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
MuonDetLayerGeometry Class Reference

#include <MuonDetLayerGeometry.h>

Inheritance diagram for MuonDetLayerGeometry:
DetLayerGeometry

Public Member Functions

const std::vector< const
DetLayer * > & 
allBackwardLayers () const
 return all backward (-Z) layers (CSC+RPC+GEM), inside-out More...
 
const std::vector< const
DetLayer * > & 
allBarrelLayers () const
 return all barrel DetLayers (DT+RPC), inside-out More...
 
const std::vector< const
DetLayer * > & 
allCscGemBackwardLayers () const
 return all endcap DetLayers (CSC+GEM), -Z to +Z More...
 
const std::vector< const
DetLayer * > & 
allCscGemForwardLayers () const
 return all endcap DetLayers (CSC+GEM), -Z to +Z More...
 
const std::vector< const
DetLayer * > & 
allCSCLayers () const
 return the CSC DetLayers (endcap), -Z to +Z More...
 
const std::vector< const
DetLayer * > & 
allDTLayers () const
 return the DT DetLayers (barrel), inside-out More...
 
const std::vector< const
DetLayer * > & 
allEndcapCscGemLayers () const
 return all endcap DetLayers (CSC+GEM), -Z to +Z More...
 
const std::vector< const
DetLayer * > & 
allEndcapLayers () const
 return all endcap DetLayers (CSC+RPC+GEM), -Z to +Z More...
 
const std::vector< const
DetLayer * > & 
allForwardLayers () const
 return all forward (+Z) layers (CSC+RPC+GEM), inside-out More...
 
const std::vector< const
DetLayer * > & 
allGEMLayers () const
 return the GEM DetLayers (endcap), -Z to +Z More...
 
const std::vector< const
DetLayer * > & 
allLayers () const
 return all layers (DT+CSC+RPC+GEM), order: backward, barrel, forward More...
 
const std::vector< const
DetLayer * > & 
allRPCLayers () const
 return all RPC DetLayers, order: backward, barrel, forward More...
 
const std::vector< const
DetLayer * > & 
backwardCSCLayers () const
 return the backward (-Z) CSC DetLayers, inside-out More...
 
const std::vector< const
DetLayer * > & 
backwardGEMLayers () const
 return the backward (-Z) GEM DetLayers, inside-out More...
 
const std::vector< const
DetLayer * > & 
backwardRPCLayers () const
 return the backward (-Z) RPC DetLayers, inside-out More...
 
const std::vector< const
DetLayer * > & 
barrelRPCLayers () const
 return the barrel RPC DetLayers, inside-out More...
 
const std::vector< const
DetLayer * > & 
endcapRPCLayers () const
 return the endcap RPC DetLayers, -Z to +Z More...
 
const std::vector< const
DetLayer * > & 
forwardCSCLayers () const
 return the forward (+Z) CSC DetLayers, inside-out More...
 
const std::vector< const
DetLayer * > & 
forwardGEMLayers () const
 return the forward (+Z) GEM DetLayers, inside-out More...
 
const std::vector< const
DetLayer * > & 
forwardRPCLayers () const
 return the forward (+Z) RPC DetLayers, inside-out More...
 
virtual const DetLayeridToLayer (const DetId &detId) const override
 return the DetLayer which correspond to a certain DetId More...
 
 MuonDetLayerGeometry ()
 Constructor. More...
 
virtual ~MuonDetLayerGeometry ()
 Destructor. More...
 
- Public Member Functions inherited from DetLayerGeometry
 DetLayerGeometry ()
 
virtual ~DetLayerGeometry ()
 

Private Member Functions

void addCSCLayers (const std::pair< std::vector< DetLayer * >, std::vector< DetLayer * > > &csclayers)
 
void addDTLayers (const std::vector< DetLayer * > &dtlayers)
 
void addGEMLayers (const std::pair< std::vector< DetLayer * >, std::vector< DetLayer * > > &gemlayers)
 
void addRPCLayers (const std::vector< DetLayer * > &barrelRPCLayers, const std::pair< std::vector< DetLayer * >, std::vector< DetLayer * > > &endcapRPCLayers)
 
DetId makeDetLayerId (const DetLayer *detLayer) const
 
void sortLayers ()
 

Private Attributes

std::vector< const DetLayer * > allBackward
 
std::vector< const DetLayer * > allBarrel
 
std::vector< const DetLayer * > allCscGemBackward
 
std::vector< const DetLayer * > allCscGemForward
 
std::vector< const DetLayer * > allDetLayers
 
std::vector< const DetLayer * > allEndcap
 
std::vector< const DetLayer * > allEndcapCscGem
 
std::vector< const DetLayer * > allForward
 
std::vector< const DetLayer * > cscLayers_all
 
std::vector< const DetLayer * > cscLayers_bk
 
std::vector< const DetLayer * > cscLayers_fw
 
std::map< DetId, const DetLayer * > detLayersMap
 
std::vector< const DetLayer * > dtLayers
 
std::vector< const DetLayer * > gemLayers_all
 
std::vector< const DetLayer * > gemLayers_bk
 
std::vector< const DetLayer * > gemLayers_fw
 
std::vector< const DetLayer * > rpcLayers_all
 
std::vector< const DetLayer * > rpcLayers_barrel
 
std::vector< const DetLayer * > rpcLayers_bk
 
std::vector< const DetLayer * > rpcLayers_endcap
 
std::vector< const DetLayer * > rpcLayers_fw
 

Friends

class MuonDetLayerGeometryESProducer
 

Detailed Description

Provide access to the DetLayers of muon detectors.

Author
N. Amapane - CERN

by R. Radogna & C. Calabria & A. Sharma

Definition at line 20 of file MuonDetLayerGeometry.h.

Constructor & Destructor Documentation

MuonDetLayerGeometry::MuonDetLayerGeometry ( )

Constructor.

Definition at line 25 of file MuonDetLayerGeometry.cc.

25 {}
MuonDetLayerGeometry::~MuonDetLayerGeometry ( )
virtual

Destructor.

Definition at line 27 of file MuonDetLayerGeometry.cc.

27  {
28  for(vector<const DetLayer*>::const_iterator it = allDetLayers.begin(); it != allDetLayers.end(); ++it)
29  {
30  delete *it;
31  }
32 }
std::vector< const DetLayer * > allDetLayers

Member Function Documentation

void MuonDetLayerGeometry::addCSCLayers ( const std::pair< std::vector< DetLayer * >, std::vector< DetLayer * > > &  csclayers)
private

Add CSC layers csclayers.first=forward (+Z), csclayers.second=backward (-Z) both vectors are ASSUMED to be sorted inside-out

Definition at line 34 of file MuonDetLayerGeometry.cc.

Referenced by MuonDetLayerGeometryESProducer::produce().

34  {
35 
36  for(auto const it : csclayers.first) {
37  cscLayers_fw.push_back(it);
38  allForward.push_back(it);
39 
40  detLayersMap[ makeDetLayerId(it) ] = it;
41  }
42 
43  for(auto const it: csclayers.second) {
44  cscLayers_bk.push_back(it);
45  allBackward.push_back(it);
46 
47  detLayersMap[ makeDetLayerId(it) ] = it;
48  }
49 }
std::map< DetId, const DetLayer * > detLayersMap
std::vector< const DetLayer * > allForward
std::vector< const DetLayer * > allBackward
std::vector< const DetLayer * > cscLayers_fw
std::vector< const DetLayer * > cscLayers_bk
DetId makeDetLayerId(const DetLayer *detLayer) const
void MuonDetLayerGeometry::addDTLayers ( const std::vector< DetLayer * > &  dtlayers)
private

Definition at line 89 of file MuonDetLayerGeometry.cc.

Referenced by MuonDetLayerGeometryESProducer::produce().

89  {
90 
91  for(auto const it : dtlayers) {
92  dtLayers.push_back(it);
93  allBarrel.push_back(it);
94 
95  detLayersMap[ makeDetLayerId(it) ] = it;
96  }
97 }
std::vector< const DetLayer * > allBarrel
std::map< DetId, const DetLayer * > detLayersMap
DetId makeDetLayerId(const DetLayer *detLayer) const
std::vector< const DetLayer * > dtLayers
void MuonDetLayerGeometry::addGEMLayers ( const std::pair< std::vector< DetLayer * >, std::vector< DetLayer * > > &  gemlayers)
private

Add GEM layers gemlayers.first=forward (+Z), gemlayers.second=backward (-Z) both vectors are ASSUMED to be sorted inside-out

Definition at line 51 of file MuonDetLayerGeometry.cc.

Referenced by MuonDetLayerGeometryESProducer::produce().

51  {
52 
53  for(auto const it : gemlayers.first) {
54  gemLayers_fw.push_back(it);
55  allForward.push_back(it);
56  detLayersMap[ makeDetLayerId(it) ] = it;
57  }
58  for(auto const it: gemlayers.second) {
59  gemLayers_bk.push_back(it);
60  allBackward.push_back(it);
61  detLayersMap[ makeDetLayerId(it) ] = it;
62  }
63  }
std::vector< const DetLayer * > gemLayers_bk
std::map< DetId, const DetLayer * > detLayersMap
std::vector< const DetLayer * > allForward
std::vector< const DetLayer * > allBackward
DetId makeDetLayerId(const DetLayer *detLayer) const
std::vector< const DetLayer * > gemLayers_fw
void MuonDetLayerGeometry::addRPCLayers ( const std::vector< DetLayer * > &  barrelRPCLayers,
const std::pair< std::vector< DetLayer * >, std::vector< DetLayer * > > &  endcapRPCLayers 
)
private

Add RPC layers endcapRPCLayers.first=forward (+Z), endcapRPCLayers.second=backward (-Z) All three vectors are ASSUMED to be sorted inside-out

Definition at line 65 of file MuonDetLayerGeometry.cc.

Referenced by MuonDetLayerGeometryESProducer::produce().

65  {
66 
67  for(auto const it: barrelLayers) {
68  rpcLayers_barrel.push_back(it);
69  allBarrel.push_back(it);
70 
71  detLayersMap[ makeDetLayerId(it) ] = it;
72  }
73  for(auto const it: endcapLayers.first) {
74  rpcLayers_fw.push_back(it);
75  allForward.push_back(it);
76 
77  detLayersMap[ makeDetLayerId(it) ] = it;
78  }
79 
80  for(auto const it: endcapLayers.second) {
81  rpcLayers_bk.push_back(it);
82  allBackward.push_back(it);
83 
84  detLayersMap[ makeDetLayerId(it) ] = it;
85  }
86 
87 }
std::vector< const DetLayer * > allBarrel
std::map< DetId, const DetLayer * > detLayersMap
std::vector< const DetLayer * > allForward
std::vector< const DetLayer * > allBackward
std::vector< const DetLayer * > rpcLayers_barrel
std::vector< const DetLayer * > rpcLayers_bk
DetId makeDetLayerId(const DetLayer *detLayer) const
std::vector< const DetLayer * > rpcLayers_fw
const vector< const DetLayer * > & MuonDetLayerGeometry::allBackwardLayers ( ) const

return all backward (-Z) layers (CSC+RPC+GEM), inside-out

Definition at line 231 of file MuonDetLayerGeometry.cc.

Referenced by MuonNavigationPrinter::MuonNavigationPrinter().

231  {
232  return allBackward;
233 }
std::vector< const DetLayer * > allBackward
const vector< const DetLayer * > & MuonDetLayerGeometry::allBarrelLayers ( ) const

return all barrel DetLayers (DT+RPC), inside-out

Definition at line 214 of file MuonDetLayerGeometry.cc.

Referenced by MuonNavigationPrinter::MuonNavigationPrinter(), and MuonNavigationSchool::MuonNavigationSchool().

214  {
215  return allBarrel;
216 }
std::vector< const DetLayer * > allBarrel
const vector< const DetLayer * > & MuonDetLayerGeometry::allCscGemBackwardLayers ( ) const

return all endcap DetLayers (CSC+GEM), -Z to +Z

Definition at line 250 of file MuonDetLayerGeometry.cc.

Referenced by MuonNavigationPrinter::MuonNavigationPrinter().

250  {
251  return allCscGemBackward;
252 }
std::vector< const DetLayer * > allCscGemBackward
const vector< const DetLayer * > & MuonDetLayerGeometry::allCscGemForwardLayers ( ) const

return all endcap DetLayers (CSC+GEM), -Z to +Z

Definition at line 244 of file MuonDetLayerGeometry.cc.

Referenced by MuonNavigationPrinter::MuonNavigationPrinter().

244  {
245  return allCscGemForward;
246 }
std::vector< const DetLayer * > allCscGemForward
const vector< const DetLayer * > & MuonDetLayerGeometry::allCSCLayers ( ) const

return the CSC DetLayers (endcap), -Z to +Z

Definition at line 141 of file MuonDetLayerGeometry.cc.

Referenced by MuonNavigationSchool::MuonNavigationSchool().

141  {
142  return cscLayers_all;
143 }
std::vector< const DetLayer * > cscLayers_all
const vector< const DetLayer * > & MuonDetLayerGeometry::allDTLayers ( ) const

return the DT DetLayers (barrel), inside-out

Definition at line 136 of file MuonDetLayerGeometry.cc.

Referenced by MuonSeedBuilder::build(), MuonNavigationPrinter::MuonNavigationPrinter(), and MuonNavigationSchool::MuonNavigationSchool().

136  {
137  return dtLayers;
138 }
std::vector< const DetLayer * > dtLayers
const vector< const DetLayer * > & MuonDetLayerGeometry::allEndcapCscGemLayers ( ) const

return all endcap DetLayers (CSC+GEM), -Z to +Z

Definition at line 238 of file MuonDetLayerGeometry.cc.

Referenced by MuonNavigationSchool::MuonNavigationSchool().

238  {
239  return allEndcapCscGem;
240 }
std::vector< const DetLayer * > allEndcapCscGem
const vector< const DetLayer * > & MuonDetLayerGeometry::allEndcapLayers ( ) const

return all endcap DetLayers (CSC+RPC+GEM), -Z to +Z

Definition at line 219 of file MuonDetLayerGeometry.cc.

Referenced by MuonNavigationSchool::MuonNavigationSchool().

219  {
220  return allEndcap;
221 }
std::vector< const DetLayer * > allEndcap
const vector< const DetLayer * > & MuonDetLayerGeometry::allForwardLayers ( ) const

return all forward (+Z) layers (CSC+RPC+GEM), inside-out

Definition at line 225 of file MuonDetLayerGeometry.cc.

Referenced by MuonNavigationPrinter::MuonNavigationPrinter().

225  {
226  return allForward;
227 }
std::vector< const DetLayer * > allForward
const vector< const DetLayer * > & MuonDetLayerGeometry::allGEMLayers ( ) const

return the GEM DetLayers (endcap), -Z to +Z

Definition at line 159 of file MuonDetLayerGeometry.cc.

Referenced by MuonNavigationSchool::MuonNavigationSchool().

159  {
160  return gemLayers_all;
161 }
std::vector< const DetLayer * > gemLayers_all
const vector< const DetLayer * > & MuonDetLayerGeometry::allLayers ( ) const

return all layers (DT+CSC+RPC+GEM), order: backward, barrel, forward

Definition at line 208 of file MuonDetLayerGeometry.cc.

Referenced by MuonNavigationSchool::MuonNavigationSchool().

208  {
209  return allDetLayers;
210 }
std::vector< const DetLayer * > allDetLayers
const vector< const DetLayer * > & MuonDetLayerGeometry::allRPCLayers ( ) const

return all RPC DetLayers, order: backward, barrel, forward

Definition at line 178 of file MuonDetLayerGeometry.cc.

178  {
179  return rpcLayers_all;
180 }
std::vector< const DetLayer * > rpcLayers_all
const vector< const DetLayer * > & MuonDetLayerGeometry::backwardCSCLayers ( ) const

return the backward (-Z) CSC DetLayers, inside-out

Definition at line 153 of file MuonDetLayerGeometry.cc.

Referenced by MuonSeedBuilder::build(), and MuonNavigationPrinter::MuonNavigationPrinter().

153  {
154  return cscLayers_bk;
155 }
std::vector< const DetLayer * > cscLayers_bk
const vector< const DetLayer * > & MuonDetLayerGeometry::backwardGEMLayers ( ) const

return the backward (-Z) GEM DetLayers, inside-out

Definition at line 171 of file MuonDetLayerGeometry.cc.

Referenced by MuonNavigationPrinter::MuonNavigationPrinter().

171  {
172  return gemLayers_bk;
173 }
std::vector< const DetLayer * > gemLayers_bk
const vector< const DetLayer * > & MuonDetLayerGeometry::backwardRPCLayers ( ) const

return the backward (-Z) RPC DetLayers, inside-out

Definition at line 202 of file MuonDetLayerGeometry.cc.

202  {
203  return rpcLayers_bk;
204 }
std::vector< const DetLayer * > rpcLayers_bk
const vector< const DetLayer * > & MuonDetLayerGeometry::barrelRPCLayers ( ) const

return the barrel RPC DetLayers, inside-out

Definition at line 184 of file MuonDetLayerGeometry.cc.

184  {
185  return rpcLayers_barrel;
186 }
std::vector< const DetLayer * > rpcLayers_barrel
const vector< const DetLayer * > & MuonDetLayerGeometry::endcapRPCLayers ( ) const

return the endcap RPC DetLayers, -Z to +Z

Definition at line 190 of file MuonDetLayerGeometry.cc.

190  {
191  return rpcLayers_endcap;
192 }
std::vector< const DetLayer * > rpcLayers_endcap
const vector< const DetLayer * > & MuonDetLayerGeometry::forwardCSCLayers ( ) const

return the forward (+Z) CSC DetLayers, inside-out

Definition at line 147 of file MuonDetLayerGeometry.cc.

Referenced by MuonSeedBuilder::build(), and MuonNavigationPrinter::MuonNavigationPrinter().

147  {
148  return cscLayers_fw;
149 }
std::vector< const DetLayer * > cscLayers_fw
const vector< const DetLayer * > & MuonDetLayerGeometry::forwardGEMLayers ( ) const

return the forward (+Z) GEM DetLayers, inside-out

Definition at line 165 of file MuonDetLayerGeometry.cc.

Referenced by MuonNavigationPrinter::MuonNavigationPrinter().

165  {
166  return gemLayers_fw;
167 }
std::vector< const DetLayer * > gemLayers_fw
const vector< const DetLayer * > & MuonDetLayerGeometry::forwardRPCLayers ( ) const

return the forward (+Z) RPC DetLayers, inside-out

Definition at line 196 of file MuonDetLayerGeometry.cc.

196  {
197  return rpcLayers_fw;
198 }
std::vector< const DetLayer * > rpcLayers_fw
const DetLayer * MuonDetLayerGeometry::idToLayer ( const DetId detId) const
overridevirtual

return the DetLayer which correspond to a certain DetId

Reimplemented from DetLayerGeometry.

Definition at line 256 of file MuonDetLayerGeometry.cc.

References MuonSubdetId::CSC, CSCDetId, MuonSubdetId::DT, DTChamberId, Exception, MuonSubdetId::GEM, DetId::rawId(), MuonSubdetId::RPC, RPCDetId, and DetId::subdetId().

Referenced by GlobalDetLayerGeometry::idToLayer().

256  {
257 
258  DetId id;
259 
260  if(detId.subdetId() == MuonSubdetId::CSC){
261  CSCDetId cscId( detId.rawId() );
262 
263  if(cscId.station() == 1)
264  {
265  if(cscId.ring() == 1 || cscId.ring() == 4)
266  id = CSCDetId(cscId.endcap(),1,1,0,0);
267  else if(cscId.ring() == 2 || cscId.ring() == 3)
268  id = CSCDetId(cscId.endcap(),1,2,0,0);
269  else
270  throw cms::Exception("InvalidCSCRing")<<" Invalid CSC Ring: "<<cscId.ring()<<endl;
271  }
272  else id = CSCDetId(cscId.endcap(),cscId.station(),0,0,0);
273  }
274 
275  else if (detId.subdetId() == MuonSubdetId::DT){
276  DTChamberId dtId( detId.rawId() );
277  id = DTChamberId(0,dtId.station(),0);
278  }
279  else if (detId.subdetId() == MuonSubdetId::RPC){
280  RPCDetId rpcId(detId.rawId() );
281  id = RPCDetId(rpcId.region(),0,rpcId.station(),0,rpcId.layer(),0,0);
282  }
283  else if (detId.subdetId() == MuonSubdetId::GEM){
284  GEMDetId gemId(detId.rawId() );
285  id = GEMDetId(gemId.region(),1,gemId.station(),gemId.layer(),0,0);
286  }
287 
288  else throw cms::Exception("InvalidSubdetId")<< detId.subdetId();
289 
290  std::map<DetId,const DetLayer*>::const_iterator layer = detLayersMap.find(id);
291  if (layer == detLayersMap.end()) return 0;
292  return layer->second;
293 }
static const int GEM
Definition: MuonSubdetId.h:15
std::map< DetId, const DetLayer * > detLayersMap
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
static const int CSC
Definition: MuonSubdetId.h:13
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
Definition: DetId.h:18
static const int RPC
Definition: MuonSubdetId.h:14
static const int DT
Definition: MuonSubdetId.h:12
DetId MuonDetLayerGeometry::makeDetLayerId ( const DetLayer detLayer) const
private

Definition at line 99 of file MuonDetLayerGeometry.cc.

References GeometricSearchDet::basicComponents(), GeomDetEnumerators::CSC, CSCDetId, GeomDetEnumerators::DT, DTChamberId, Reference_intrackfit_cff::endcap, Exception, GeomDetEnumerators::GEM, HLT_25ns14e33_v3_cff::region, relativeConstraints::ring, GeomDetEnumerators::RPCBarrel, RPCDetId, GeomDetEnumerators::RPCEndcap, relativeConstraints::station, and DetLayer::subDetector().

99  {
100 
101  if(detLayer->subDetector() == GeomDetEnumerators::CSC){
102  CSCDetId id( detLayer->basicComponents().front()->geographicalId().rawId() ) ;
103 
104  if(id.station() == 1 )
105  {
106  if(id.ring() == 1 || id.ring() == 4)
107  return CSCDetId(id.endcap(),1,1,0,0);
108  else if(id.ring() == 2 || id.ring() == 3)
109  return CSCDetId(id.endcap(),1,2,0,0);
110  else
111  throw cms::Exception("InvalidCSCRing")<<" Invalid CSC Ring: "<<id.ring()<<endl;
112  }
113  else
114  return CSCDetId(id.endcap(),id.station(),0,0,0);
115 
116  }
117  else if(detLayer->subDetector() == GeomDetEnumerators::DT){
118  DTChamberId id( detLayer->basicComponents().front()->geographicalId().rawId() ) ;
119  return DTChamberId(0,id.station(),0);
120  }
121  else if(detLayer->subDetector()== GeomDetEnumerators::RPCBarrel ||
123  RPCDetId id( detLayer->basicComponents().front()->geographicalId().rawId());
124  return RPCDetId(id.region(),0,id.station(),0,id.layer(),0,0);
125  }
126  else if( detLayer->subDetector()== GeomDetEnumerators::GEM){
127  GEMDetId id( detLayer->basicComponents().front()->geographicalId().rawId());
128  return GEMDetId(id.region(),1,id.station(),id.layer(),0,0);
129  }
130 
131  else throw cms::Exception("InvalidModuleIdentification"); // << detLayer->module();
132 }
virtual SubDetector subDetector() const =0
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap)
virtual const std::vector< const GeomDet * > & basicComponents() const =0
void MuonDetLayerGeometry::sortLayers ( )
private

Definition at line 308 of file MuonDetLayerGeometry.cc.

References filterCSVwithJSON::copy, prof2calltree::l, and precomputed_value_sort().

Referenced by MuonDetLayerGeometryESProducer::produce().

308  {
309 
310  // The following are filled inside-out, no need to re-sort
311  // precomputed_value_sort(dtLayers.begin(), dtLayers.end(),ExtractR<DetLayer,float>());
312  // precomputed_value_sort(cscLayers_fw.begin(), cscLayers_fw.end(),ExtractAbsZ<DetLayer,float>());
313  // precomputed_value_sort(cscLayers_bk.begin(), cscLayers_bk.end(),ExtractAbsZ<DetLayer,float>());
314  // precomputed_value_sort(rpcLayers_fw.begin(), rpcLayers_fw.end(),ExtractAbsZ<DetLayer,float>());
315  // precomputed_value_sort(rpcLayers_bk.begin(), rpcLayers_bk.end(),ExtractAbsZ<DetLayer,float>());
316  // precomputed_value_sort(rpcLayers_barrel.begin(), rpcLayers_barrel.end(), ExtractR<DetLayer,float>());
317 
318  // Sort these inside-out
322 
323  // Build more complicated vectors with correct sorting
324 
325  //cscLayers_all: from -Z to +Z
326  cscLayers_all.reserve(cscLayers_bk.size()+cscLayers_fw.size());
327  std::copy(cscLayers_bk.begin(),cscLayers_bk.end(),back_inserter(cscLayers_all));
328  std::reverse(cscLayers_all.begin(),cscLayers_all.end());
329  std::copy(cscLayers_fw.begin(),cscLayers_fw.end(),back_inserter(cscLayers_all));
330 
331  //gemLayers_all: from -Z to +Z
332  gemLayers_all.reserve(gemLayers_bk.size()+gemLayers_fw.size());
333  std::copy(gemLayers_bk.begin(),gemLayers_bk.end(),back_inserter(gemLayers_all));
334  std::reverse(gemLayers_all.begin(),gemLayers_all.end());
335  std::copy(gemLayers_fw.begin(),gemLayers_fw.end(),back_inserter(gemLayers_all));
336 
337  //rpcLayers_endcap: from -Z to +Z
338  rpcLayers_endcap.reserve(rpcLayers_bk.size()+rpcLayers_fw.size());
339  std::copy(rpcLayers_bk.begin(),rpcLayers_bk.end(),back_inserter(rpcLayers_endcap));
340  std::reverse(rpcLayers_endcap.begin(),rpcLayers_endcap.end());
341  std::copy(rpcLayers_fw.begin(),rpcLayers_fw.end(),back_inserter(rpcLayers_endcap));
342 
343  //rpcLayers_all: order is bw, barrel, fw
344  rpcLayers_all.reserve(rpcLayers_bk.size()+rpcLayers_barrel.size()+rpcLayers_fw.size());
345  std::copy(rpcLayers_bk.begin(),rpcLayers_bk.end(),back_inserter(rpcLayers_all));
346  std::reverse(rpcLayers_all.begin(),rpcLayers_all.end());
347  std::copy(rpcLayers_barrel.begin(),rpcLayers_barrel.end(),back_inserter(rpcLayers_all));
348  std::copy(rpcLayers_fw.begin(),rpcLayers_fw.end(),back_inserter(rpcLayers_all));
349 
350  // allEndcap: order is all bw, all fw
351  allEndcap.reserve(allBackward.size()+allForward.size());
352  std::copy(allBackward.begin(),allBackward.end(),back_inserter(allEndcap));
353  std::reverse(allEndcap.begin(),allEndcap.end());
354  std::copy(allForward.begin(),allForward.end(),back_inserter(allEndcap));
355 
356  // allEndcapCSCGEM: order is all bw, all fw
357  allEndcapCscGem.reserve(cscLayers_bk.size()+cscLayers_fw.size()+gemLayers_bk.size()+gemLayers_fw.size());
358  std::copy(cscLayers_bk.begin(),cscLayers_bk.end(),back_inserter(allEndcapCscGem));
359  std::copy(gemLayers_bk.begin(),gemLayers_bk.end(),back_inserter(allEndcapCscGem));
360  std::reverse(allEndcapCscGem.begin(),allEndcapCscGem.end());
361  std::copy(cscLayers_fw.begin(),cscLayers_fw.end(),back_inserter(allEndcapCscGem));
362  std::copy(gemLayers_fw.begin(),gemLayers_fw.end(),back_inserter(allEndcapCscGem));
363 
364  // allCscGemForward
365  allCscGemForward.reserve(cscLayers_fw.size()+gemLayers_fw.size());
366  std::copy(cscLayers_fw.begin(),cscLayers_fw.end(),back_inserter(allCscGemForward));
367  std::copy(gemLayers_fw.begin(),gemLayers_fw.end(),back_inserter(allCscGemForward));
368 
369  // allCscGemBackward
370  allCscGemBackward.reserve(cscLayers_bk.size()+gemLayers_bk.size());
371  std::copy(cscLayers_bk.begin(),cscLayers_bk.end(),back_inserter(allCscGemBackward));
372  std::copy(gemLayers_bk.begin(),gemLayers_bk.end(),back_inserter(allCscGemBackward));
373 
374  // allDetLayers: order is all bw, all barrel, all fw
375  allDetLayers.reserve(allBackward.size()+allBarrel.size()+allForward.size());
376  std::copy(allBackward.begin(),allBackward.end(),back_inserter(allDetLayers));
377  std::reverse(allDetLayers.begin(),allDetLayers.end());
378  std::copy(allBarrel.begin(),allBarrel.end(),back_inserter(allDetLayers));
379  std::copy(allForward.begin(),allForward.end(),back_inserter(allDetLayers));
380 
381  // number layers
382  int sq=0;
383  for (auto l : allDetLayers)
384  (*const_cast<DetLayer*>(l)).setSeqNum(sq++);
385 
386 
387 }
std::vector< const DetLayer * > gemLayers_all
std::vector< const DetLayer * > allDetLayers
std::vector< const DetLayer * > allBarrel
std::vector< const DetLayer * > gemLayers_bk
std::vector< const DetLayer * > allForward
std::vector< const DetLayer * > allBackward
std::vector< const DetLayer * > allCscGemForward
std::vector< const DetLayer * > rpcLayers_barrel
std::vector< const DetLayer * > rpcLayers_all
std::vector< const DetLayer * > rpcLayers_bk
std::vector< const DetLayer * > cscLayers_fw
std::vector< const DetLayer * > allEndcapCscGem
std::vector< const DetLayer * > allEndcap
std::vector< const DetLayer * > cscLayers_bk
std::vector< const DetLayer * > cscLayers_all
void precomputed_value_sort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr)
std::vector< const DetLayer * > allCscGemBackward
std::vector< const DetLayer * > rpcLayers_fw
std::vector< const DetLayer * > rpcLayers_endcap
std::vector< const DetLayer * > gemLayers_fw

Friends And Related Function Documentation

friend class MuonDetLayerGeometryESProducer
friend

Definition at line 26 of file MuonDetLayerGeometry.h.

Member Data Documentation

std::vector<const DetLayer*> MuonDetLayerGeometry::allBackward
private

Definition at line 149 of file MuonDetLayerGeometry.h.

std::vector<const DetLayer*> MuonDetLayerGeometry::allBarrel
private

Definition at line 151 of file MuonDetLayerGeometry.h.

std::vector<const DetLayer*> MuonDetLayerGeometry::allCscGemBackward
private

Definition at line 158 of file MuonDetLayerGeometry.h.

std::vector<const DetLayer*> MuonDetLayerGeometry::allCscGemForward
private

Definition at line 157 of file MuonDetLayerGeometry.h.

std::vector<const DetLayer*> MuonDetLayerGeometry::allDetLayers
private

Definition at line 152 of file MuonDetLayerGeometry.h.

std::vector<const DetLayer*> MuonDetLayerGeometry::allEndcap
private

Definition at line 150 of file MuonDetLayerGeometry.h.

std::vector<const DetLayer*> MuonDetLayerGeometry::allEndcapCscGem
private

Definition at line 156 of file MuonDetLayerGeometry.h.

std::vector<const DetLayer*> MuonDetLayerGeometry::allForward
private

Definition at line 148 of file MuonDetLayerGeometry.h.

std::vector<const DetLayer*> MuonDetLayerGeometry::cscLayers_all
private

Definition at line 133 of file MuonDetLayerGeometry.h.

std::vector<const DetLayer*> MuonDetLayerGeometry::cscLayers_bk
private

Definition at line 132 of file MuonDetLayerGeometry.h.

std::vector<const DetLayer*> MuonDetLayerGeometry::cscLayers_fw
private

Definition at line 131 of file MuonDetLayerGeometry.h.

std::map<DetId,const DetLayer*> MuonDetLayerGeometry::detLayersMap
private

Definition at line 160 of file MuonDetLayerGeometry.h.

std::vector<const DetLayer*> MuonDetLayerGeometry::dtLayers
private

Definition at line 147 of file MuonDetLayerGeometry.h.

std::vector<const DetLayer*> MuonDetLayerGeometry::gemLayers_all
private

Definition at line 139 of file MuonDetLayerGeometry.h.

std::vector<const DetLayer*> MuonDetLayerGeometry::gemLayers_bk
private

Definition at line 138 of file MuonDetLayerGeometry.h.

std::vector<const DetLayer*> MuonDetLayerGeometry::gemLayers_fw
private

Definition at line 137 of file MuonDetLayerGeometry.h.

std::vector<const DetLayer*> MuonDetLayerGeometry::rpcLayers_all
private

Definition at line 142 of file MuonDetLayerGeometry.h.

std::vector<const DetLayer*> MuonDetLayerGeometry::rpcLayers_barrel
private

Definition at line 146 of file MuonDetLayerGeometry.h.

std::vector<const DetLayer*> MuonDetLayerGeometry::rpcLayers_bk
private

Definition at line 145 of file MuonDetLayerGeometry.h.

std::vector<const DetLayer*> MuonDetLayerGeometry::rpcLayers_endcap
private

Definition at line 143 of file MuonDetLayerGeometry.h.

std::vector<const DetLayer*> MuonDetLayerGeometry::rpcLayers_fw
private

Definition at line 144 of file MuonDetLayerGeometry.h.