CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Attributes | Private Attributes
SiStripClusterizerConditions Class Reference

#include <SiStripClusterizerConditions.h>

Classes

struct  Det
 

Public Member Functions

std::vector< uint32_t > const & allDetIds () const
 
auto const & allDets () const
 
std::vector< const FedChannelConnection * > const & currentConnection (const Det &det) const
 
void emplace_back (uint32_t id, SiStripQuality::Range qualityRange, SiStripNoises::Range noiseRange, const std::vector< float > &invGains, const std::vector< const FedChannelConnection *> &connections)
 
Det const & findDetId (const uint32_t id) const
 
bool isModuleBad (const uint32_t id) const
 
bool isModuleUsable (const uint32_t id) const
 
void reserve (std::size_t length)
 
 SiStripClusterizerConditions (const SiStripQuality *quality)
 

Static Public Attributes

static constexpr unsigned short invalidI = std::numeric_limits<unsigned short>::max()
 

Private Attributes

std::vector< std::vector< const FedChannelConnection * > > m_connections
 
std::vector< uint32_t > m_detIds
 
std::vector< Detm_dets
 
const SiStripQualitym_quality
 

Detailed Description

Cache of the noise and quality ranges per module, and the 1/gain value for each APV, for fast access by the clusterizer

Definition at line 11 of file SiStripClusterizerConditions.h.

Constructor & Destructor Documentation

◆ SiStripClusterizerConditions()

SiStripClusterizerConditions::SiStripClusterizerConditions ( const SiStripQuality quality)
inlineexplicit

Definition at line 34 of file SiStripClusterizerConditions.h.

34 : m_quality(quality) {}
string quality

Member Function Documentation

◆ allDetIds()

std::vector<uint32_t> const& SiStripClusterizerConditions::allDetIds ( ) const
inline

Definition at line 36 of file SiStripClusterizerConditions.h.

References m_detIds.

36 { return m_detIds; }

◆ allDets()

auto const& SiStripClusterizerConditions::allDets ( ) const
inline

Definition at line 37 of file SiStripClusterizerConditions.h.

References m_dets.

37 { return m_dets; }

◆ currentConnection()

std::vector<const FedChannelConnection*> const& SiStripClusterizerConditions::currentConnection ( const Det det) const
inline

Definition at line 39 of file SiStripClusterizerConditions.h.

References SiStripClusterizerConditions::Det::ind, and m_connections.

39  {
40  return m_connections[det.ind];
41  }
std::vector< std::vector< const FedChannelConnection * > > m_connections

◆ emplace_back()

void SiStripClusterizerConditions::emplace_back ( uint32_t  id,
SiStripQuality::Range  qualityRange,
SiStripNoises::Range  noiseRange,
const std::vector< float > &  invGains,
const std::vector< const FedChannelConnection *> &  connections 
)
inline

Definition at line 65 of file SiStripClusterizerConditions.h.

References mps_fire::i, l1ctLayer2EG_cff::id, m_connections, m_detIds, m_dets, and m_quality.

69  {
70  const unsigned short index = m_detIds.size();
71  m_detIds.push_back(id);
72  auto& det = m_dets.emplace_back();
73  det.quality = m_quality;
74  det.qualityRange = qualityRange;
75  det.noiseRange = noiseRange;
76  for (uint32_t i = 0; i != invGains.size(); ++i) {
77  det.m_weight[i] = invGains[i];
78  }
79  det.detId = id;
80  det.ind = index;
81  m_connections.push_back(connections);
82  }
std::vector< std::vector< const FedChannelConnection * > > m_connections

◆ findDetId()

Det const& SiStripClusterizerConditions::findDetId ( const uint32_t  id) const
inline

Definition at line 43 of file SiStripClusterizerConditions.h.

References b, MillePedeFileConverter_cfg::e, pfDeepBoostedJetPreprocessParams_cfi::lower_bound, m_detIds, m_dets, and AlCaHLTBitMon_ParallelJobs::p.

Referenced by StripClusterizerAlgorithm::stripByStripBegin().

43  {
44  auto b = m_detIds.begin();
45  auto e = m_detIds.end();
46  auto p = std::lower_bound(b, e, id);
47  if (p == e || id != (*p)) {
48 #ifdef NOT_ON_MONTECARLO
49  edm::LogWarning("StripClusterizerAlgorithm")
50  << "id " << id << " not connected. this is impossible on data " << std::endl;
51 #endif
52  static const Det dummy = Det();
53  return dummy;
54  }
55  return m_dets[p - m_detIds.begin()];
56  }
GeometricSearchDet Det
Definition: DetBelowR.h:8
double b
Definition: hdecay.h:118
Log< level::Warning, false > LogWarning

◆ isModuleBad()

bool SiStripClusterizerConditions::isModuleBad ( const uint32_t  id) const
inline

Definition at line 57 of file SiStripClusterizerConditions.h.

References SiStripQuality::IsModuleBad(), and m_quality.

57 { return m_quality->IsModuleBad(id); }
bool IsModuleBad(uint32_t detid) const

◆ isModuleUsable()

bool SiStripClusterizerConditions::isModuleUsable ( const uint32_t  id) const
inline

Definition at line 58 of file SiStripClusterizerConditions.h.

References SiStripQuality::IsModuleUsable(), and m_quality.

58 { return m_quality->IsModuleUsable(id); }
bool IsModuleUsable(uint32_t detid) const

◆ reserve()

void SiStripClusterizerConditions::reserve ( std::size_t  length)
inline

Definition at line 60 of file SiStripClusterizerConditions.h.

References m_connections, m_detIds, and m_dets.

60  {
61  m_detIds.reserve(length);
62  m_dets.reserve(length);
63  m_connections.reserve(length);
64  }
std::vector< std::vector< const FedChannelConnection * > > m_connections

Member Data Documentation

◆ invalidI

constexpr unsigned short SiStripClusterizerConditions::invalidI = std::numeric_limits<unsigned short>::max()
static

◆ m_connections

std::vector<std::vector<const FedChannelConnection*> > SiStripClusterizerConditions::m_connections
private

Definition at line 88 of file SiStripClusterizerConditions.h.

Referenced by currentConnection(), emplace_back(), and reserve().

◆ m_detIds

std::vector<uint32_t> SiStripClusterizerConditions::m_detIds
private

Definition at line 86 of file SiStripClusterizerConditions.h.

Referenced by allDetIds(), emplace_back(), findDetId(), and reserve().

◆ m_dets

std::vector<Det> SiStripClusterizerConditions::m_dets
private

Definition at line 87 of file SiStripClusterizerConditions.h.

Referenced by allDets(), emplace_back(), findDetId(), and reserve().

◆ m_quality

const SiStripQuality* SiStripClusterizerConditions::m_quality
private

Definition at line 85 of file SiStripClusterizerConditions.h.

Referenced by emplace_back(), isModuleBad(), and isModuleUsable().