CMS 3D CMS Logo

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
PixelSubdetector.h
TrackerGeometry.h
TrackerTopology
Definition: TrackerTopology.h:16
PixelTopologyMap::buildTopologyMaps
void buildTopologyMaps()
Definition: PixelTopologyMap.cc:15
PixelTopologyMap
Definition: PixelTopologyMap.h:20
PixelTopologyMap::m_trackerTopo
const TrackerTopology * m_trackerTopo
Definition: PixelTopologyMap.h:43
PixelTopologyMap::m_pxfMap
std::map< unsigned, std::pair< unsigned, unsigned > > m_pxfMap
Definition: PixelTopologyMap.h:47
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
TrackerTopology.h
PixelTopologyMap::m_pxbMap
std::map< unsigned, std::pair< unsigned, unsigned > > m_pxbMap
Definition: PixelTopologyMap.h:46
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
PixelTopologyMap::~PixelTopologyMap
~PixelTopologyMap()=default
PixelTopologyMap::getPXBLadders
const unsigned getPXBLadders(unsigned int lay) const
Definition: PixelTopologyMap.h:32
PixelTopologyMap::getPXFBlades
const unsigned getPXFBlades(int disk) const
Definition: PixelTopologyMap.h:34
operator<<
std::ostream & operator<<(std::ostream &os, PixelTopologyMap map)
Definition: PixelTopologyMap.h:50
PixelTopologyMap::m_trackerGeom
const TrackerGeometry * m_trackerGeom
Definition: PixelTopologyMap.h:44
PixelTopologyMap::getPXFModules
const unsigned getPXFModules(int disk) const
Definition: PixelTopologyMap.h:35
PixelTopologyMap::printAll
void printAll(std::ostream &os) const
Definition: PixelTopologyMap.cc:3
PixelTopologyMap::getPXBModules
const unsigned getPXBModules(unsigned int lay) const
Definition: PixelTopologyMap.h:33
PixelGeomDetUnit.h
PixelTopologyMap::PixelTopologyMap
PixelTopologyMap(const TrackerGeometry *geom, const TrackerTopology *topo)
Definition: PixelTopologyMap.h:22
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
genParticles_cff.map
map
Definition: genParticles_cff.py:11
TrackerGeometry
Definition: TrackerGeometry.h:14