CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PixelTopologyMap.h
Go to the documentation of this file.
1 #ifndef Geometry_TrackerGeometryBuilder_PixelTopologyMap_H
2 #define Geometry_TrackerGeometryBuilder_PixelTopologyMap_H
3 
4 // system include files
5 #include <map>
6 #include <memory>
7 #include <iostream>
8 #include <iomanip> // std::setw
9 
10 // user include files
14 #include "TrackerGeometry.h"
15 
21 public:
23  : m_trackerTopo{topo}, m_trackerGeom{geom} {
24  // build the maps
26  }
27 
28  ~PixelTopologyMap() = default;
29 
30  // getter methods
31 
32  inline const unsigned getPXBLadders(unsigned int lay) const { return m_pxbMap.at(lay).first; }
33  inline const unsigned getPXBModules(unsigned int lay) const { return m_pxbMap.at(lay).second; }
34  inline const unsigned getPXFBlades(int disk) const { return m_pxfMap.at(std::abs(disk)).first; }
35  inline const unsigned getPXFModules(int disk) const { return m_pxfMap.at(std::abs(disk)).second; }
36 
37  // printout
38  void printAll(std::ostream& os) const;
39 
40 private:
41  void buildTopologyMaps();
42 
45 
46  std::map<unsigned, std::pair<unsigned, unsigned>> m_pxbMap;
47  std::map<unsigned, std::pair<unsigned, unsigned>> m_pxfMap;
48 };
49 
50 inline std::ostream& operator<<(std::ostream& os, PixelTopologyMap map) {
51  std::stringstream ss;
52  map.printAll(ss);
53  os << ss.str();
54  return os;
55 }
56 
57 #endif
~PixelTopologyMap()=default
const TrackerGeometry * m_trackerGeom
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
const unsigned getPXBModules(unsigned int lay) const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
PixelTopologyMap(const TrackerGeometry *geom, const TrackerTopology *topo)
void printAll(std::ostream &os) const
const unsigned getPXFBlades(int disk) const
std::map< unsigned, std::pair< unsigned, unsigned > > m_pxfMap
std::map< unsigned, std::pair< unsigned, unsigned > > m_pxbMap
const unsigned getPXFModules(int disk) const
const unsigned getPXBLadders(unsigned int lay) const
const TrackerTopology * m_trackerTopo