CMS 3D CMS Logo

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
MTDDetLayerGeometry()
Constructor.
void addBTLLayers(const std::vector< DetLayer *> &btllayers)
const std::vector< const DetLayer * > & allBackwardLayers() const
return all endcap layers
~MTDDetLayerGeometry() override
Destructor.
std::vector< const DetLayer * > etlLayers_bk
std::map< DetId, const DetLayer * > detLayersMap
std::vector< const DetLayer * > etlLayers_all
const std::vector< const DetLayer * > & allLayers() const
return all DetLayers (barrel + endcap), -Z to +Z
std::vector< const DetLayer * > allBackward
const std::vector< const DetLayer * > & allBarrelLayers() const
return all barrel layers
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)
const std::vector< const DetLayer * > & allEndcapLayers() const
return all endcap layers
const std::vector< const DetLayer * > & allForwardLayers() const
return all endcap layers
std::vector< const DetLayer * > allBarrel
const std::vector< const DetLayer * > & allBTLLayers() const
return the BTL DetLayers (barrel), inside-out
Definition: DetId.h:17
std::vector< const DetLayer * > allDetLayers
DetId makeDetLayerId(const DetLayer *detLayer) const
void addETLLayers(const std::pair< std::vector< DetLayer *>, std::vector< DetLayer *> > &etllayers)
std::vector< const DetLayer * > allForward
std::vector< const DetLayer * > btlLayers
const std::vector< const DetLayer * > & allETLLayers() const
return the ETL DetLayers (endcap), -Z to +Z