CMS 3D CMS Logo

MuonDetLayerGeometry.h
Go to the documentation of this file.
1 #ifndef DetLayers_MuonDetLayerGeometry_h
2 #define DetLayers_MuonDetLayerGeometry_h
3 
16 #include <vector>
17 #include <map>
18 
19 class DetLayer;
20 
22 public:
25 
27 
29  ~MuonDetLayerGeometry() override;
30 
32  const std::vector<const DetLayer*>& allDTLayers() const;
33 
35  const std::vector<const DetLayer*>& allCSCLayers() const;
36 
38  const std::vector<const DetLayer*>& forwardCSCLayers() const;
39 
41  const std::vector<const DetLayer*>& backwardCSCLayers() const;
42 
44 
46  const std::vector<const DetLayer*>& allGEMLayers() const;
47 
49  const std::vector<const DetLayer*>& forwardGEMLayers() const;
50 
52  const std::vector<const DetLayer*>& backwardGEMLayers() const;
53 
55 
57 
59  const std::vector<const DetLayer*>& allME0Layers() const;
60 
62  const std::vector<const DetLayer*>& forwardME0Layers() const;
63 
65  const std::vector<const DetLayer*>& backwardME0Layers() const;
66 
68 
70  const std::vector<const DetLayer*>& allRPCLayers() const;
71 
73  const std::vector<const DetLayer*>& barrelRPCLayers() const;
74 
76  const std::vector<const DetLayer*>& endcapRPCLayers() const;
77 
79  const std::vector<const DetLayer*>& forwardRPCLayers() const;
80 
82  const std::vector<const DetLayer*>& backwardRPCLayers() const;
83 
85  const std::vector<const DetLayer*>& allLayers() const;
86 
88  const std::vector<const DetLayer*>& allBarrelLayers() const;
89 
91  const std::vector<const DetLayer*>& allEndcapLayers() const;
92 
94  const std::vector<const DetLayer*>& allForwardLayers() const;
95 
97  const std::vector<const DetLayer*>& allBackwardLayers() const;
98 
100 
102  const std::vector<const DetLayer*>& allEndcapCscGemLayers() const;
103 
105  const std::vector<const DetLayer*>& allCscGemForwardLayers() const;
106 
108  const std::vector<const DetLayer*>& allCscGemBackwardLayers() const;
109 
111 
113 
115  const std::vector<const DetLayer*>& allEndcapCscME0Layers() const;
116 
118  const std::vector<const DetLayer*>& allCscME0ForwardLayers() const;
119 
121  const std::vector<const DetLayer*>& allCscME0BackwardLayers() const;
122 
124 
126  const DetLayer* idToLayer(const DetId& detId) const override;
127 
128 private:
132  void addCSCLayers(const std::pair<std::vector<DetLayer*>, std::vector<DetLayer*> >& csclayers);
133 
134  //. Add DT layers; dtlayers is ASSUMED to be sorted inside-out
135  void addDTLayers(const std::vector<DetLayer*>& dtlayers);
136 
140  void addRPCLayers(const std::vector<DetLayer*>& barrelRPCLayers,
141  const std::pair<std::vector<DetLayer*>, std::vector<DetLayer*> >& endcapRPCLayers);
142 
144 
148  void addGEMLayers(const std::pair<std::vector<DetLayer*>, std::vector<DetLayer*> >& gemlayers);
150 
152 
156  void addME0Layers(const std::pair<std::vector<DetLayer*>, std::vector<DetLayer*> >& gemlayers);
157 
159 
160  DetId makeDetLayerId(const DetLayer* detLayer) const;
161 
162  void sortLayers();
163 
164  std::vector<const DetLayer*> cscLayers_fw;
165  std::vector<const DetLayer*> cscLayers_bk;
166  std::vector<const DetLayer*> cscLayers_all;
167 
169 
170  std::vector<const DetLayer*> gemLayers_fw;
171  std::vector<const DetLayer*> gemLayers_bk;
172  std::vector<const DetLayer*> gemLayers_all;
173 
175 
176  std::vector<const DetLayer*> me0Layers_fw;
177  std::vector<const DetLayer*> me0Layers_bk;
178  std::vector<const DetLayer*> me0Layers_all;
179 
182  std::vector<const DetLayer*> rpcLayers_all;
183  std::vector<const DetLayer*> rpcLayers_endcap;
184  std::vector<const DetLayer*> rpcLayers_fw;
185  std::vector<const DetLayer*> rpcLayers_bk;
186  std::vector<const DetLayer*> rpcLayers_barrel;
187  std::vector<const DetLayer*> dtLayers;
188  std::vector<const DetLayer*> allForward;
189  std::vector<const DetLayer*> allBackward;
190  std::vector<const DetLayer*> allEndcap;
191  std::vector<const DetLayer*> allBarrel;
192  std::vector<const DetLayer*> allDetLayers;
193 
195 
196  std::vector<const DetLayer*> allEndcapCscGem;
197  std::vector<const DetLayer*> allCscGemForward;
198  std::vector<const DetLayer*> allCscGemBackward;
199 
201 
203 
204  std::vector<const DetLayer*> allEndcapCscME0;
205  std::vector<const DetLayer*> allCscME0Forward;
206  std::vector<const DetLayer*> allCscME0Backward;
207 
209 
210  std::map<DetId, const DetLayer*> detLayersMap;
211 };
212 #endif
MuonDetLayerGeometry::allBarrelLayers
const std::vector< const DetLayer * > & allBarrelLayers() const
return all barrel DetLayers (DT+RPC), inside-out
Definition: MuonDetLayerGeometry.cc:189
MuonDetLayerGeometry::allDetLayers
std::vector< const DetLayer * > allDetLayers
Definition: MuonDetLayerGeometry.h:192
MuonDetLayerGeometry::allCscME0Forward
std::vector< const DetLayer * > allCscME0Forward
Definition: MuonDetLayerGeometry.h:205
MuonDetLayerGeometry::backwardGEMLayers
const std::vector< const DetLayer * > & backwardGEMLayers() const
return the backward (-Z) GEM DetLayers, inside-out
Definition: MuonDetLayerGeometry.cc:163
MuonDetLayerGeometry::rpcLayers_barrel
std::vector< const DetLayer * > rpcLayers_barrel
Definition: MuonDetLayerGeometry.h:186
MuonDetLayerGeometry::allCSCLayers
const std::vector< const DetLayer * > & allCSCLayers() const
return the CSC DetLayers (endcap), -Z to +Z
Definition: MuonDetLayerGeometry.cc:152
MuonDetLayerGeometry::rpcLayers_all
std::vector< const DetLayer * > rpcLayers_all
Definition: MuonDetLayerGeometry.h:182
MuonDetLayerGeometry::forwardGEMLayers
const std::vector< const DetLayer * > & forwardGEMLayers() const
return the forward (+Z) GEM DetLayers, inside-out
Definition: MuonDetLayerGeometry.cc:161
DetLayer
Definition: DetLayer.h:21
MuonDetLayerGeometry::allEndcapCscME0Layers
const std::vector< const DetLayer * > & allEndcapCscME0Layers() const
return all endcap DetLayers (CSC+ME0), -Z to +Z
Definition: MuonDetLayerGeometry.cc:207
MuonDetLayerGeometry::barrelRPCLayers
const std::vector< const DetLayer * > & barrelRPCLayers() const
return the barrel RPC DetLayers, inside-out
Definition: MuonDetLayerGeometry.cc:179
MuonDetLayerGeometry::idToLayer
const DetLayer * idToLayer(const DetId &detId) const override
return the DetLayer which correspond to a certain DetId
Definition: MuonDetLayerGeometry.cc:215
MuonDetLayerGeometry::makeDetLayerId
DetId makeDetLayerId(const DetLayer *detLayer) const
Definition: MuonDetLayerGeometry.cc:119
MuonDetLayerGeometry::rpcLayers_fw
std::vector< const DetLayer * > rpcLayers_fw
Definition: MuonDetLayerGeometry.h:184
MuonDetLayerGeometry::rpcLayers_bk
std::vector< const DetLayer * > rpcLayers_bk
Definition: MuonDetLayerGeometry.h:185
MuonDetLayerGeometry::me0Layers_fw
std::vector< const DetLayer * > me0Layers_fw
Definition: MuonDetLayerGeometry.h:176
MuonDetLayerGeometry::allBarrel
std::vector< const DetLayer * > allBarrel
Definition: MuonDetLayerGeometry.h:191
MuonDetLayerGeometry::allBackward
std::vector< const DetLayer * > allBackward
Definition: MuonDetLayerGeometry.h:189
MuonDetLayerGeometry::backwardME0Layers
const std::vector< const DetLayer * > & backwardME0Layers() const
return the backward (-Z) ME0 DetLayers, inside-out
Definition: MuonDetLayerGeometry.cc:173
MuonDetLayerGeometry::me0Layers_all
std::vector< const DetLayer * > me0Layers_all
Definition: MuonDetLayerGeometry.h:178
MuonDetLayerGeometry::allDTLayers
const std::vector< const DetLayer * > & allDTLayers() const
return the DT DetLayers (barrel), inside-out
Definition: MuonDetLayerGeometry.cc:150
MuonDetLayerGeometry::detLayersMap
std::map< DetId, const DetLayer * > detLayersMap
Definition: MuonDetLayerGeometry.h:210
MuonDetLayerGeometry::allEndcap
std::vector< const DetLayer * > allEndcap
Definition: MuonDetLayerGeometry.h:190
MuonDetLayerGeometryESProducer
Definition: MuonDetLayerGeometryESProducer.cc:36
MuonDetLayerGeometry::cscLayers_fw
std::vector< const DetLayer * > cscLayers_fw
Definition: MuonDetLayerGeometry.h:164
MuonDetLayerGeometry::forwardRPCLayers
const std::vector< const DetLayer * > & forwardRPCLayers() const
return the forward (+Z) RPC DetLayers, inside-out
Definition: MuonDetLayerGeometry.cc:183
MuonDetLayerGeometry::forwardME0Layers
const std::vector< const DetLayer * > & forwardME0Layers() const
return the forward (+Z) ME0 DetLayers, inside-out
Definition: MuonDetLayerGeometry.cc:171
MuonDetLayerGeometry::backwardCSCLayers
const std::vector< const DetLayer * > & backwardCSCLayers() const
return the backward (-Z) CSC DetLayers, inside-out
Definition: MuonDetLayerGeometry.cc:156
MuonDetLayerGeometry::addDTLayers
void addDTLayers(const std::vector< DetLayer * > &dtlayers)
Definition: MuonDetLayerGeometry.cc:110
DetId
Definition: DetId.h:17
MuonDetLayerGeometry
Definition: MuonDetLayerGeometry.h:21
MuonDetLayerGeometry::allEndcapLayers
const std::vector< const DetLayer * > & allEndcapLayers() const
return all endcap DetLayers (CSC+RPC+GEM+ME0), -Z to +Z
Definition: MuonDetLayerGeometry.cc:191
MuonDetLayerGeometry::allCscME0Backward
std::vector< const DetLayer * > allCscME0Backward
Definition: MuonDetLayerGeometry.h:206
MuonDetLayerGeometry::rpcLayers_endcap
std::vector< const DetLayer * > rpcLayers_endcap
Definition: MuonDetLayerGeometry.h:183
MuonDetLayerGeometry::cscLayers_bk
std::vector< const DetLayer * > cscLayers_bk
Definition: MuonDetLayerGeometry.h:165
MuonDetLayerGeometry::forwardCSCLayers
const std::vector< const DetLayer * > & forwardCSCLayers() const
return the forward (+Z) CSC DetLayers, inside-out
Definition: MuonDetLayerGeometry.cc:154
MuonDetLayerGeometry::allForward
std::vector< const DetLayer * > allForward
Definition: MuonDetLayerGeometry.h:188
MuonDetLayerGeometry::addCSCLayers
void addCSCLayers(const std::pair< std::vector< DetLayer * >, std::vector< DetLayer * > > &csclayers)
Definition: MuonDetLayerGeometry.cc:36
MuonDetLayerGeometry::addGEMLayers
void addGEMLayers(const std::pair< std::vector< DetLayer * >, std::vector< DetLayer * > > &gemlayers)
Definition: MuonDetLayerGeometry.cc:52
MuonDetLayerGeometry::allGEMLayers
const std::vector< const DetLayer * > & allGEMLayers() const
return the GEM DetLayers (endcap), -Z to +Z
Definition: MuonDetLayerGeometry.cc:159
MuonDetLayerGeometry::allCscGemForward
std::vector< const DetLayer * > allCscGemForward
Definition: MuonDetLayerGeometry.h:197
DetLayerGeometry.h
MuonDetLayerGeometry::backwardRPCLayers
const std::vector< const DetLayer * > & backwardRPCLayers() const
return the backward (-Z) RPC DetLayers, inside-out
Definition: MuonDetLayerGeometry.cc:185
MuonDetLayerGeometry::allCscGemBackwardLayers
const std::vector< const DetLayer * > & allCscGemBackwardLayers() const
return all endcap DetLayers (CSC+GEM), -Z to +Z
Definition: MuonDetLayerGeometry.cc:203
DetLayerGeometry
Definition: DetLayerGeometry.h:18
MuonDetLayerGeometry::allCscGemBackward
std::vector< const DetLayer * > allCscGemBackward
Definition: MuonDetLayerGeometry.h:198
MuonDetLayerGeometry::sortLayers
void sortLayers()
Definition: MuonDetLayerGeometry.cc:270
MuonDetLayerGeometry::MuonDetLayerGeometry
MuonDetLayerGeometry()
Constructor.
Definition: MuonDetLayerGeometry.cc:28
MuonDetLayerGeometry::allForwardLayers
const std::vector< const DetLayer * > & allForwardLayers() const
return all forward (+Z) layers (CSC+RPC+GEM+ME0), inside-out
Definition: MuonDetLayerGeometry.cc:193
MuonDetLayerGeometry::allEndcapCscGemLayers
const std::vector< const DetLayer * > & allEndcapCscGemLayers() const
return all endcap DetLayers (CSC+GEM), -Z to +Z
Definition: MuonDetLayerGeometry.cc:199
MuonDetLayerGeometry::allRPCLayers
const std::vector< const DetLayer * > & allRPCLayers() const
return all RPC DetLayers, order: backward, barrel, forward
Definition: MuonDetLayerGeometry.cc:177
MuonDetLayerGeometry::allEndcapCscGem
std::vector< const DetLayer * > allEndcapCscGem
Definition: MuonDetLayerGeometry.h:196
MuonDetLayerGeometry::addRPCLayers
void addRPCLayers(const std::vector< DetLayer * > &barrelRPCLayers, const std::pair< std::vector< DetLayer * >, std::vector< DetLayer * > > &endcapRPCLayers)
Definition: MuonDetLayerGeometry.cc:87
MuonDetLayerGeometry::gemLayers_bk
std::vector< const DetLayer * > gemLayers_bk
Definition: MuonDetLayerGeometry.h:171
DetId.h
MuonDetLayerGeometry::allBackwardLayers
const std::vector< const DetLayer * > & allBackwardLayers() const
return all backward (-Z) layers (CSC+RPC+GEM+ME0), inside-out
Definition: MuonDetLayerGeometry.cc:195
MuonDetLayerGeometry::gemLayers_fw
std::vector< const DetLayer * > gemLayers_fw
Definition: MuonDetLayerGeometry.h:170
MuonDetLayerGeometry::cscLayers_all
std::vector< const DetLayer * > cscLayers_all
Definition: MuonDetLayerGeometry.h:166
MuonDetLayerGeometry::allCscME0BackwardLayers
const std::vector< const DetLayer * > & allCscME0BackwardLayers() const
return all endcap DetLayers (CSC+ME0), -Z to +Z
Definition: MuonDetLayerGeometry.cc:211
MuonDetLayerGeometry::dtLayers
std::vector< const DetLayer * > dtLayers
Definition: MuonDetLayerGeometry.h:187
MuonDetLayerGeometry::allLayers
const std::vector< const DetLayer * > & allLayers() const
return all layers (DT+CSC+RPC+GEM), order: backward, barrel, forward
Definition: MuonDetLayerGeometry.cc:187
MuonDetLayerGeometry::~MuonDetLayerGeometry
~MuonDetLayerGeometry() override
Destructor.
Definition: MuonDetLayerGeometry.cc:30
MuonDetLayerGeometry::endcapRPCLayers
const std::vector< const DetLayer * > & endcapRPCLayers() const
return the endcap RPC DetLayers, -Z to +Z
Definition: MuonDetLayerGeometry.cc:181
MuonDetLayerGeometry::allME0Layers
const std::vector< const DetLayer * > & allME0Layers() const
return the ME0 DetLayers (endcap), -Z to +Z
Definition: MuonDetLayerGeometry.cc:169
MuonDetLayerGeometry::allEndcapCscME0
std::vector< const DetLayer * > allEndcapCscME0
Definition: MuonDetLayerGeometry.h:204
MuonDetLayerGeometry::addME0Layers
void addME0Layers(const std::pair< std::vector< DetLayer * >, std::vector< DetLayer * > > &gemlayers)
Definition: MuonDetLayerGeometry.cc:68
MuonDetLayerGeometry::allCscME0ForwardLayers
const std::vector< const DetLayer * > & allCscME0ForwardLayers() const
return all endcap DetLayers (CSC+ME0), -Z to +Z
Definition: MuonDetLayerGeometry.cc:209
MuonDetLayerGeometry::gemLayers_all
std::vector< const DetLayer * > gemLayers_all
Definition: MuonDetLayerGeometry.h:172
MuonDetLayerGeometry::allCscGemForwardLayers
const std::vector< const DetLayer * > & allCscGemForwardLayers() const
return all endcap DetLayers (CSC+GEM), -Z to +Z
Definition: MuonDetLayerGeometry.cc:201
MuonDetLayerGeometry::me0Layers_bk
std::vector< const DetLayer * > me0Layers_bk
Definition: MuonDetLayerGeometry.h:177