CMS 3D CMS Logo

Functions | Variables
phase2PixelTopology Namespace Reference

Functions

constexpr uint8_t findLayerFromCompact (uint32_t detId)
 
constexpr uint16_t findMaxModuleStride ()
 
constexpr bool validateLayerIndex ()
 

Variables

constexpr std::array< uint8_t, layerIndexSizelayer
 
constexpr uint16_t layerIndexSize = numberOfModules / maxModuleStride
 
constexpr uint32_t layerStart [numberOfLayers+1]
 
constexpr uint16_t maxModuleStride = findMaxModuleStride()
 
constexpr uint32_t numberOfLaddersInBarrel = numberOfModulesInBarrel / numberOfModulesInLadder
 
constexpr uint8_t numberOfLayers = 28
 
constexpr uint32_t numberOfModules = 3892
 
constexpr uint32_t numberOfModulesInBarrel = 756
 
constexpr uint32_t numberOfModulesInLadder = 9
 

Function Documentation

◆ findLayerFromCompact()

constexpr uint8_t phase2PixelTopology::findLayerFromCompact ( uint32_t  detId)

Definition at line 263 of file SimplePixelTopology.h.

References mps_fire::i, layerStart, maxModuleStride, and numberOfLayers.

263  {
264  detId *= maxModuleStride;
265  for (uint8_t i = 0; i < numberOfLayers + 1; ++i)
266  if (detId < layerStart[i + 1])
267  return i;
268  return numberOfLayers + 1;
269  }
constexpr uint32_t layerStart[numberOfLayers+1]
const map< TString, int > numberOfLayers(TString Year="2018")
Definition: DMRtrends.cc:254
constexpr uint16_t maxModuleStride

◆ findMaxModuleStride()

constexpr uint16_t phase2PixelTopology::findMaxModuleStride ( )

Definition at line 244 of file SimplePixelTopology.h.

References mps_fire::i, layerStart, dqmiodumpmetadata::n, and numberOfLayers.

244  {
245  bool go = true;
246  int n = 2;
247  while (go) {
248  for (uint8_t i = 1; i < numberOfLayers + 1; ++i) {
249  if (layerStart[i] % n != 0) {
250  go = false;
251  break;
252  }
253  }
254  if (!go)
255  break;
256  n *= 2;
257  }
258  return n / 2;
259  }
constexpr uint32_t layerStart[numberOfLayers+1]
const map< TString, int > numberOfLayers(TString Year="2018")
Definition: DMRtrends.cc:254

◆ validateLayerIndex()

constexpr bool phase2PixelTopology::validateLayerIndex ( )

Definition at line 275 of file SimplePixelTopology.h.

References mps_fire::i, dqmiolumiharvest::j, layer, layerStart, maxModuleStride, numberOfLayers, numberOfModules, and mitigatedMETSequence_cff::U.

275  {
276  bool res = true;
277  for (auto i = 0U; i < numberOfModules; ++i) {
278  auto j = i / maxModuleStride;
279  res &= (layer[j] < numberOfLayers);
280  res &= (i >= layerStart[layer[j]]);
281  res &= (i < layerStart[layer[j] + 1]);
282  }
283  return res;
284  }
constexpr uint32_t layerStart[numberOfLayers+1]
Definition: Electron.h:6
const map< TString, int > numberOfLayers(TString Year="2018")
Definition: DMRtrends.cc:254
constexpr uint32_t numberOfModules
constexpr uint16_t maxModuleStride
constexpr std::array< uint8_t, layerIndexSize > layer

Variable Documentation

◆ layer

constexpr std::array<uint8_t, layerIndexSize> phase2PixelTopology::layer
Initial value:
=
pixelTopology::map_to_array<layerIndexSize>(findLayerFromCompact)
constexpr uint8_t findLayerFromCompact(uint32_t detId)

Definition at line 272 of file SimplePixelTopology.h.

Referenced by PixelCPEFast::fillParamsForGpu(), and validateLayerIndex().

◆ layerIndexSize

constexpr uint16_t phase2PixelTopology::layerIndexSize = numberOfModules / maxModuleStride

Definition at line 271 of file SimplePixelTopology.h.

◆ layerStart

constexpr uint32_t phase2PixelTopology::layerStart[numberOfLayers+1]
Initial value:
= {0,
108,
324,
504,
756,
864,
972,
1080,
1188,
1296,
1404,
1512,
1620,
1796,
1972,
2148,
2324,
2432,
2540,
2648,
2756,
2864,
2972,
3080,
3188,
3364,
3540,
3716,
constexpr uint32_t numberOfModules

Definition at line 214 of file SimplePixelTopology.h.

Referenced by PixelCPEFast::fillParamsForGpu(), findLayerFromCompact(), findMaxModuleStride(), SiPixelRecHitSoAFromLegacy::produce(), and validateLayerIndex().

◆ maxModuleStride

constexpr uint16_t phase2PixelTopology::maxModuleStride = findMaxModuleStride()

◆ numberOfLaddersInBarrel

constexpr uint32_t phase2PixelTopology::numberOfLaddersInBarrel = numberOfModulesInBarrel / numberOfModulesInLadder

◆ numberOfLayers

constexpr uint8_t phase2PixelTopology::numberOfLayers = 28

◆ numberOfModules

constexpr uint32_t phase2PixelTopology::numberOfModules = 3892

◆ numberOfModulesInBarrel

constexpr uint32_t phase2PixelTopology::numberOfModulesInBarrel = 756

Definition at line 207 of file SimplePixelTopology.h.

Referenced by PixelCPEFast::fillParamsForGpu().

◆ numberOfModulesInLadder

constexpr uint32_t phase2PixelTopology::numberOfModulesInLadder = 9

Definition at line 208 of file SimplePixelTopology.h.

Referenced by PixelCPEFast::fillParamsForGpu().