CMS 3D CMS Logo

Classes | Typedefs | Functions | Variables
pixelTopology Namespace Reference

Classes

struct  AverageGeometryT
 
struct  HIonPhase1
 
struct  Phase1
 
struct  Phase2
 

Typedefs

template<typename T >
using isPhase1Topology = typename std::enable_if< std::is_base_of< Phase1, T >::value >::type
 
template<typename T >
using isPhase2Topology = typename std::enable_if< std::is_base_of< Phase2, T >::value >::type
 

Functions

constexpr uint16_t divu52 (uint16_t n)
 
template<typename TrackerTraits >
constexpr uint8_t findLayer (uint32_t detId, uint8_t sl=0)
 
template<typename TrackerTraits >
constexpr uint8_t findLayerFromCompact (uint32_t detId)
 
template<typename TrackerTraits >
constexpr uint16_t findMaxModuleStride ()
 
template<typename TrackerTraits >
constexpr uint8_t getLayer (uint32_t detId)
 
template<typename TrackerTraits >
constexpr uint32_t layerStart (uint32_t i)
 
template<int N, class Function >
constexpr auto map_to_array (Function f) -> std::array< std::invoke_result_t< Function, std::size_t >, N >
 
template<class Function , std::size_t... Indices>
constexpr auto map_to_array_helper (Function f, std::index_sequence< Indices... >) -> std::array< std::invoke_result_t< Function, std::size_t >, sizeof...(Indices)>
 
template<typename TrackerTraits >
constexpr bool validateLayerIndex ()
 

Variables

constexpr uint16_t last_barrel_layer = 3
 
template<typename TrackerTraits >
constexpr std::array< uint8_t, layerIndexSize< TrackerTraits > > layer = map_to_array<layerIndexSize<TrackerTraits>>(findLayerFromCompact<TrackerTraits>)
 
template<typename TrackerTraits >
constexpr uint32_t layerIndexSize = TrackerTraits::numberOfModules / maxModuleStride<TrackerTraits>
 
constexpr uint32_t maxLayers = 28
 
template<typename TrackerTraits >
constexpr uint16_t maxModuleStride = findMaxModuleStride<TrackerTraits>()
 
constexpr auto maxNumberOfLadders = 160
 
constexpr int16_t phi0p05 = 522
 
constexpr int16_t phi0p06 = 626
 
constexpr int16_t phi0p07 = 730
 
constexpr int16_t phi0p09 = 900
 

Typedef Documentation

◆ isPhase1Topology

template<typename T >
using pixelTopology::isPhase1Topology = typedef typename std::enable_if<std::is_base_of<Phase1, T>::value>::type

Definition at line 570 of file SimplePixelTopology.h.

◆ isPhase2Topology

template<typename T >
using pixelTopology::isPhase2Topology = typedef typename std::enable_if<std::is_base_of<Phase2, T>::value>::type

Definition at line 573 of file SimplePixelTopology.h.

Function Documentation

◆ divu52()

constexpr uint16_t pixelTopology::divu52 ( uint16_t  n)
inline

Definition at line 118 of file SimplePixelTopology.h.

References dqmiodumpmetadata::n, and submitPVResolutionJobs::q.

Referenced by pixelTopology::Phase1::localY(), and pixelTopology::Phase1::toRocY().

118  {
119  n = n >> 2;
120  uint16_t q = (n >> 1) + (n >> 4);
121  q = q + (q >> 4) + (q >> 5);
122  q = q >> 3;
123  uint16_t r = n - q * 13;
124  return q + ((r + 3) >> 4);
125  }

◆ findLayer()

template<typename TrackerTraits >
constexpr uint8_t pixelTopology::findLayer ( uint32_t  detId,
uint8_t  sl = 0 
)

Definition at line 66 of file SimplePixelTopology.h.

References hcalRecHitTable_cff::detId, mps_fire::i, layerStart(), and phase2PixelTopology::numberOfLayers.

66  {
67  for (uint8_t i = sl; i < TrackerTraits::numberOfLayers + 1; ++i)
69  return i;
71  }
constexpr uint32_t layerStart(uint32_t i)
constexpr uint32_t numberOfLayers

◆ findLayerFromCompact()

template<typename TrackerTraits >
constexpr uint8_t pixelTopology::findLayerFromCompact ( uint32_t  detId)

Definition at line 74 of file SimplePixelTopology.h.

References hcalRecHitTable_cff::detId, mps_fire::i, layerStart(), and phase2PixelTopology::numberOfLayers.

74  {
75  detId *= maxModuleStride<TrackerTraits>;
76  for (uint8_t i = 0; i < TrackerTraits::numberOfLayers + 1; ++i)
78  return i;
80  }
constexpr uint32_t layerStart(uint32_t i)
constexpr uint32_t numberOfLayers

◆ findMaxModuleStride()

template<typename TrackerTraits >
constexpr uint16_t pixelTopology::findMaxModuleStride ( )

Definition at line 45 of file SimplePixelTopology.h.

References mps_fire::i, layerStart(), dqmiodumpmetadata::n, and phase2PixelTopology::numberOfLayers.

45  {
46  bool go = true;
47  int n = 2;
48  while (go) {
49  for (uint8_t i = 1; i < TrackerTraits::numberOfLayers + 1; ++i) {
50  if (TrackerTraits::layerStart[i] % n != 0) {
51  go = false;
52  break;
53  }
54  }
55  if (!go)
56  break;
57  n *= 2;
58  }
59  return n / 2;
60  }
constexpr uint32_t layerStart(uint32_t i)
constexpr uint32_t numberOfLayers

◆ getLayer()

template<typename TrackerTraits >
constexpr uint8_t pixelTopology::getLayer ( uint32_t  detId)

◆ layerStart()

template<typename TrackerTraits >
constexpr uint32_t pixelTopology::layerStart ( uint32_t  i)
inline

Definition at line 114 of file SimplePixelTopology.h.

References mps_fire::i.

Referenced by findLayer(), findLayerFromCompact(), findMaxModuleStride(), and validateLayerIndex().

114  {
116  }
constexpr uint32_t layerStart(uint32_t i)

◆ map_to_array()

template<int N, class Function >
constexpr auto pixelTopology::map_to_array ( Function  f) -> std::array<std::invoke_result_t<Function, std::size_t>, N>

Definition at line 40 of file SimplePixelTopology.h.

References f, and map_to_array_helper().

40  {
41  return map_to_array_helper(f, std::make_index_sequence<N>{});
42  }
constexpr auto map_to_array_helper(Function f, std::index_sequence< Indices... >) -> std::array< std::invoke_result_t< Function, std::size_t >, sizeof...(Indices)>
double f[11][100]

◆ map_to_array_helper()

template<class Function , std::size_t... Indices>
constexpr auto pixelTopology::map_to_array_helper ( Function  f,
std::index_sequence< Indices... >   
) -> std::array<std::invoke_result_t<Function, std::size_t>, sizeof...(Indices)>

Definition at line 34 of file SimplePixelTopology.h.

References f.

Referenced by map_to_array().

35  {
36  return {{f(Indices)...}};
37  }
Indices
Definition: EdmEventSize.cc:28
double f[11][100]

◆ validateLayerIndex()

template<typename TrackerTraits >
constexpr bool pixelTopology::validateLayerIndex ( )

Definition at line 98 of file SimplePixelTopology.h.

References mps_fire::i, dqmiolumiharvest::j, layerStart(), phase2PixelTopology::numberOfLayers, phase2PixelTopology::numberOfModules, and mitigatedMETSequence_cff::U.

98  {
99  bool res = true;
100  for (auto i = 0U; i < TrackerTraits::numberOfModules; ++i) {
101  auto j = i / maxModuleStride<TrackerTraits>;
102  res &= (layer<TrackerTraits>[j] < TrackerTraits::numberOfLayers);
103  res &= (i >= TrackerTraits::layerStart[layer<TrackerTraits>[j]]);
104  res &= (i < TrackerTraits::layerStart[layer<TrackerTraits>[j] + 1]);
105  }
106  return res;
107  }
Definition: Electron.h:6
constexpr uint32_t layerStart(uint32_t i)
constexpr uint32_t numberOfLayers
constexpr uint16_t numberOfModules

Variable Documentation

◆ last_barrel_layer

constexpr uint16_t pixelTopology::last_barrel_layer = 3

Definition at line 31 of file SimplePixelTopology.h.

Referenced by gpuPixelDoublets::for().

◆ layer

template<typename TrackerTraits >
constexpr std::array<uint8_t, layerIndexSize<TrackerTraits> > pixelTopology::layer = map_to_array<layerIndexSize<TrackerTraits>>(findLayerFromCompact<TrackerTraits>)

Definition at line 90 of file SimplePixelTopology.h.

◆ layerIndexSize

template<typename TrackerTraits >
constexpr uint32_t pixelTopology::layerIndexSize = TrackerTraits::numberOfModules / maxModuleStride<TrackerTraits>

Definition at line 83 of file SimplePixelTopology.h.

◆ maxLayers

constexpr uint32_t pixelTopology::maxLayers = 28

◆ maxModuleStride

template<typename TrackerTraits >
constexpr uint16_t pixelTopology::maxModuleStride = findMaxModuleStride<TrackerTraits>()

Definition at line 63 of file SimplePixelTopology.h.

◆ maxNumberOfLadders

constexpr auto pixelTopology::maxNumberOfLadders = 160

Definition at line 11 of file SimplePixelTopology.h.

◆ phi0p05

constexpr int16_t pixelTopology::phi0p05 = 522

Definition at line 26 of file SimplePixelTopology.h.

◆ phi0p06

constexpr int16_t pixelTopology::phi0p06 = 626

Definition at line 27 of file SimplePixelTopology.h.

◆ phi0p07

constexpr int16_t pixelTopology::phi0p07 = 730

Definition at line 28 of file SimplePixelTopology.h.

◆ phi0p09

constexpr int16_t pixelTopology::phi0p09 = 900

Definition at line 29 of file SimplePixelTopology.h.