CMS 3D CMS Logo

MTDDetLayerGeometry.h
Go to the documentation of this file.
1 #ifndef DetLayers_MTDDetLayerGeometry_h
2 #define DetLayers_MTDDetLayerGeometry_h
3 
14 #include <vector>
15 #include <map>
16 
17 class DetLayer;
18 
20 public:
23 
25 
27  ~MTDDetLayerGeometry() override;
28 
30  const std::vector<const DetLayer*>& allBarrelLayers() const;
31 
33  const std::vector<const DetLayer*>& allEndcapLayers() const;
34 
36  const std::vector<const DetLayer*>& allForwardLayers() const;
37 
39  const std::vector<const DetLayer*>& allBackwardLayers() const;
40 
42  const std::vector<const DetLayer*>& allBTLLayers() const;
43 
45  const std::vector<const DetLayer*>& allETLLayers() const;
46 
48  const std::vector<const DetLayer*>& allLayers() const;
49 
51  const DetLayer* idToLayer(const DetId& detId) const override;
52 
53 private:
57  void addETLLayers(const std::pair<std::vector<DetLayer*>, std::vector<DetLayer*> >& etllayers);
58 
59  //. Add BTL layers; dtlayers is ASSUMED to be sorted inside-out
60  void addBTLLayers(const std::vector<DetLayer*>& btllayers);
61 
62  DetId makeDetLayerId(const DetLayer* detLayer) const;
63 
64  void sortLayers();
65 
66  std::vector<const DetLayer*> etlLayers_fw;
67  std::vector<const DetLayer*> etlLayers_bk;
68  std::vector<const DetLayer*> etlLayers_all;
69 
71  std::vector<const DetLayer*> btlLayers;
72  std::vector<const DetLayer*> allForward;
73  std::vector<const DetLayer*> allBackward;
74  std::vector<const DetLayer*> allEndcap;
75  std::vector<const DetLayer*> allBarrel;
76  std::vector<const DetLayer*> allDetLayers;
77 
78  std::map<DetId, const DetLayer*> detLayersMap;
79 };
80 #endif
std::vector< const DetLayer * > etlLayers_fw
const std::vector< const DetLayer * > & allLayers() const
return all DetLayers (barrel + endcap), -Z to +Z
MTDDetLayerGeometry()
Constructor.
DetId makeDetLayerId(const DetLayer *detLayer) const
const std::vector< const DetLayer * > & allEndcapLayers() const
return all endcap layers
void addBTLLayers(const std::vector< DetLayer * > &btllayers)
~MTDDetLayerGeometry() override
Destructor.
std::vector< const DetLayer * > etlLayers_bk
const std::vector< const DetLayer * > & allBTLLayers() const
return the BTL DetLayers (barrel), inside-out
std::map< DetId, const DetLayer * > detLayersMap
const std::vector< const DetLayer * > & allBackwardLayers() const
return all endcap layers
std::vector< const DetLayer * > etlLayers_all
void addETLLayers(const std::pair< std::vector< DetLayer * >, std::vector< DetLayer * > > &etllayers)
const std::vector< const DetLayer * > & allETLLayers() const
return the ETL DetLayers (endcap), -Z to +Z
std::vector< const DetLayer * > allBackward
std::vector< const DetLayer * > allEndcap
std::vector< const DetLayer * > allBarrel
Definition: DetId.h:17
const DetLayer * idToLayer(const DetId &detId) const override
return the DetLayer which correspond to a certain DetId
std::vector< const DetLayer * > allDetLayers
const std::vector< const DetLayer * > & allForwardLayers() const
return all endcap layers
const std::vector< const DetLayer * > & allBarrelLayers() const
return all barrel layers
std::vector< const DetLayer * > allForward
std::vector< const DetLayer * > btlLayers