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
MTDDetLayerGeometry::sortLayers
void sortLayers()
Definition: MTDDetLayerGeometry.cc:130
MTDDetLayerGeometry::allDetLayers
std::vector< const DetLayer * > allDetLayers
Definition: MTDDetLayerGeometry.h:82
MTDDetLayerGeometry::~MTDDetLayerGeometry
~MTDDetLayerGeometry() override
Destructor.
Definition: MTDDetLayerGeometry.cc:28
MTDDetLayerGeometry::addETLLayers
void addETLLayers(const std::pair< std::vector< DetLayer * >, std::vector< DetLayer * > > &etllayers)
Definition: MTDDetLayerGeometry.cc:45
DetLayer
Definition: DetLayer.h:21
MTDGeometry.h
MTDDetLayerGeometry::buildLayers
void buildLayers(const MTDGeometry *geo, const MTDTopology *mtopo)
Definition: MTDDetLayerGeometry.cc:30
MTDDetLayerGeometry::makeDetLayerId
DetId makeDetLayerId(const DetLayer *detLayer) const
Definition: MTDDetLayerGeometry.cc:70
MTDDetLayerGeometry::addBTLLayers
void addBTLLayers(const std::vector< DetLayer * > &btllayers)
Definition: MTDDetLayerGeometry.cc:61
DetId
Definition: DetId.h:17
MTDDetLayerGeometry::allBarrelLayers
const std::vector< const DetLayer * > & allBarrelLayers() const
return all barrel layers
Definition: MTDDetLayerGeometry.cc:81
MTDDetLayerGeometry::allBarrel
std::vector< const DetLayer * > allBarrel
Definition: MTDDetLayerGeometry.h:81
MTDDetLayerGeometry::allEndcap
std::vector< const DetLayer * > allEndcap
Definition: MTDDetLayerGeometry.h:80
MTDDetLayerGeometry::etlLayers_all
std::vector< const DetLayer * > etlLayers_all
Definition: MTDDetLayerGeometry.h:74
MTDDetLayerGeometryESProducer
Definition: MTDDetLayerGeometryESProducer.cc:30
MTDDetLayerGeometry::allForward
std::vector< const DetLayer * > allForward
Definition: MTDDetLayerGeometry.h:78
MTDDetLayerGeometry::etlLayers_fw
std::vector< const DetLayer * > etlLayers_fw
Definition: MTDDetLayerGeometry.h:72
MTDTopology
Definition: MTDTopology.h:13
MTDDetLayerGeometry::btlLayers
std::vector< const DetLayer * > btlLayers
Definition: MTDDetLayerGeometry.h:77
DetLayerGeometry.h
DetLayerGeometry
Definition: DetLayerGeometry.h:18
MTDDetLayerGeometry::idToLayer
const DetLayer * idToLayer(const DetId &detId) const override
return the DetLayer which correspond to a certain DetId
Definition: MTDDetLayerGeometry.cc:97
MTDDetLayerGeometry::MTDDetLayerGeometry
MTDDetLayerGeometry()
Constructor.
Definition: MTDDetLayerGeometry.cc:26
MTDDetLayerGeometry
Definition: MTDDetLayerGeometry.h:22
MTDDetLayerGeometry::allBTLLayers
const std::vector< const DetLayer * > & allBTLLayers() const
return the BTL DetLayers (barrel), inside-out
Definition: MTDDetLayerGeometry.cc:89
MTDDetLayerGeometry::allBackwardLayers
const std::vector< const DetLayer * > & allBackwardLayers() const
return all endcap layers
Definition: MTDDetLayerGeometry.cc:87
MTDGeometry
Definition: MTDGeometry.h:14
MTDDetLayerGeometry::allLayers
const std::vector< const DetLayer * > & allLayers() const
return all DetLayers (barrel + endcap), -Z to +Z
Definition: MTDDetLayerGeometry.cc:93
MTDDetLayerGeometry::allBackward
std::vector< const DetLayer * > allBackward
Definition: MTDDetLayerGeometry.h:79
DetId.h
MTDDetLayerGeometry::allForwardLayers
const std::vector< const DetLayer * > & allForwardLayers() const
return all endcap layers
Definition: MTDDetLayerGeometry.cc:85
MTDDetLayerGeometry::allEndcapLayers
const std::vector< const DetLayer * > & allEndcapLayers() const
return all endcap layers
Definition: MTDDetLayerGeometry.cc:83
MTDDetLayerGeometry::allETLLayers
const std::vector< const DetLayer * > & allETLLayers() const
return the ETL DetLayers (endcap), -Z to +Z
Definition: MTDDetLayerGeometry.cc:91
MTDTopology.h
MTDDetLayerGeometry::etlLayers_bk
std::vector< const DetLayer * > etlLayers_bk
Definition: MTDDetLayerGeometry.h:73
MTDDetLayerGeometry::detLayersMap
std::map< DetId, const DetLayer * > detLayersMap
Definition: MTDDetLayerGeometry.h:84