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 
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
MTDDetLayerGeometry::sortLayers
void sortLayers()
Definition: MTDDetLayerGeometry.cc:111
MTDDetLayerGeometry::allDetLayers
std::vector< const DetLayer * > allDetLayers
Definition: MTDDetLayerGeometry.h:76
MTDDetLayerGeometry::~MTDDetLayerGeometry
~MTDDetLayerGeometry() override
Destructor.
Definition: MTDDetLayerGeometry.cc:24
MTDDetLayerGeometry::addETLLayers
void addETLLayers(const std::pair< std::vector< DetLayer * >, std::vector< DetLayer * > > &etllayers)
Definition: MTDDetLayerGeometry.cc:26
DetLayer
Definition: DetLayer.h:21
MTDDetLayerGeometry::makeDetLayerId
DetId makeDetLayerId(const DetLayer *detLayer) const
Definition: MTDDetLayerGeometry.cc:51
MTDDetLayerGeometry::addBTLLayers
void addBTLLayers(const std::vector< DetLayer * > &btllayers)
Definition: MTDDetLayerGeometry.cc:42
DetId
Definition: DetId.h:17
MTDDetLayerGeometry::allBarrelLayers
const std::vector< const DetLayer * > & allBarrelLayers() const
return all barrel layers
Definition: MTDDetLayerGeometry.cc:62
MTDDetLayerGeometry::allBarrel
std::vector< const DetLayer * > allBarrel
Definition: MTDDetLayerGeometry.h:75
MTDDetLayerGeometry::allEndcap
std::vector< const DetLayer * > allEndcap
Definition: MTDDetLayerGeometry.h:74
MTDDetLayerGeometry::etlLayers_all
std::vector< const DetLayer * > etlLayers_all
Definition: MTDDetLayerGeometry.h:68
MTDDetLayerGeometryESProducer
Definition: MTDDetLayerGeometryESProducer.cc:30
MTDDetLayerGeometry::allForward
std::vector< const DetLayer * > allForward
Definition: MTDDetLayerGeometry.h:72
MTDDetLayerGeometry::etlLayers_fw
std::vector< const DetLayer * > etlLayers_fw
Definition: MTDDetLayerGeometry.h:66
MTDDetLayerGeometry::btlLayers
std::vector< const DetLayer * > btlLayers
Definition: MTDDetLayerGeometry.h:71
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:78
MTDDetLayerGeometry::MTDDetLayerGeometry
MTDDetLayerGeometry()
Constructor.
Definition: MTDDetLayerGeometry.cc:22
MTDDetLayerGeometry
Definition: MTDDetLayerGeometry.h:19
MTDDetLayerGeometry::allBTLLayers
const std::vector< const DetLayer * > & allBTLLayers() const
return the BTL DetLayers (barrel), inside-out
Definition: MTDDetLayerGeometry.cc:70
MTDDetLayerGeometry::allBackwardLayers
const std::vector< const DetLayer * > & allBackwardLayers() const
return all endcap layers
Definition: MTDDetLayerGeometry.cc:68
MTDDetLayerGeometry::allLayers
const std::vector< const DetLayer * > & allLayers() const
return all DetLayers (barrel + endcap), -Z to +Z
Definition: MTDDetLayerGeometry.cc:74
MTDDetLayerGeometry::allBackward
std::vector< const DetLayer * > allBackward
Definition: MTDDetLayerGeometry.h:73
DetId.h
MTDDetLayerGeometry::allForwardLayers
const std::vector< const DetLayer * > & allForwardLayers() const
return all endcap layers
Definition: MTDDetLayerGeometry.cc:66
MTDDetLayerGeometry::allEndcapLayers
const std::vector< const DetLayer * > & allEndcapLayers() const
return all endcap layers
Definition: MTDDetLayerGeometry.cc:64
MTDDetLayerGeometry::allETLLayers
const std::vector< const DetLayer * > & allETLLayers() const
return the ETL DetLayers (endcap), -Z to +Z
Definition: MTDDetLayerGeometry.cc:72
MTDDetLayerGeometry::etlLayers_bk
std::vector< const DetLayer * > etlLayers_bk
Definition: MTDDetLayerGeometry.h:67
MTDDetLayerGeometry::detLayersMap
std::map< DetId, const DetLayer * > detLayersMap
Definition: MTDDetLayerGeometry.h:78