CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MTDDetLayerGeometry.h
Go to the documentation of this file.
1 #ifndef RecoMTD_DetLayers_MTDDetLayerGeometry_h
2 #define RecoMTD_DetLayers_MTDDetLayerGeometry_h
3 
16 
17 #include <vector>
18 #include <map>
19 
20 class DetLayer;
21 
23 public:
26 
28 
30  ~MTDDetLayerGeometry() override;
31 
33  const std::vector<const DetLayer*>& allBarrelLayers() const;
34 
36  const std::vector<const DetLayer*>& allEndcapLayers() const;
37 
39  const std::vector<const DetLayer*>& allForwardLayers() const;
40 
42  const std::vector<const DetLayer*>& allBackwardLayers() const;
43 
45  const std::vector<const DetLayer*>& allBTLLayers() const;
46 
48  const std::vector<const DetLayer*>& allETLLayers() const;
49 
51  const std::vector<const DetLayer*>& allLayers() const;
52 
54  const DetLayer* idToLayer(const DetId& detId) const override;
55 
56  // Added to allow building the MTDDetLayer from external plugins
57  void buildLayers(const MTDGeometry* geo, const MTDTopology* mtopo);
58 
59  void sortLayers();
60 
61 private:
65  void addETLLayers(const std::pair<std::vector<DetLayer*>, std::vector<DetLayer*> >& etllayers);
66 
67  //. Add BTL layers; dtlayers is ASSUMED to be sorted inside-out
68  void addBTLLayers(const std::vector<DetLayer*>& btllayers);
69 
70  DetId makeDetLayerId(const DetLayer* detLayer) const;
71 
72  std::vector<const DetLayer*> etlLayers_fw;
73  std::vector<const DetLayer*> etlLayers_bk;
74  std::vector<const DetLayer*> etlLayers_all;
75 
77  std::vector<const DetLayer*> btlLayers;
78  std::vector<const DetLayer*> allForward;
79  std::vector<const DetLayer*> allBackward;
80  std::vector<const DetLayer*> allEndcap;
81  std::vector<const DetLayer*> allBarrel;
82  std::vector<const DetLayer*> allDetLayers;
83 
84  std::map<DetId, const DetLayer*> detLayersMap;
85 };
86 #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
const DetLayer * idToLayer(const DetId &detId) const override
return the DetLayer which correspond to a certain DetId
void buildLayers(const MTDGeometry *geo, const MTDTopology *mtopo)
std::vector< const DetLayer * > allBarrel
Definition: DetId.h:17
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