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) {}

Member Function Documentation

◆ allDetIds()

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

Definition at line 36 of file SiStripClusterizerConditions.h.

36 { return m_detIds; }

References m_detIds.

◆ allDets()

auto const& SiStripClusterizerConditions::allDets ( ) const
inline

Definition at line 37 of file SiStripClusterizerConditions.h.

37 { return m_dets; }

References m_dets.

◆ currentConnection()

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

Definition at line 39 of file SiStripClusterizerConditions.h.

39  {
40  return m_connections[det.ind];
41  }

References SiStripClusterizerConditions::Det::ind, and 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.

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  }

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

◆ findDetId()

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

Definition at line 43 of file SiStripClusterizerConditions.h.

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  }

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

Referenced by StripClusterizerAlgorithm::stripByStripBegin().

◆ isModuleBad()

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

Definition at line 57 of file SiStripClusterizerConditions.h.

57 { return m_quality->IsModuleBad(id); }

References SiStripQuality::IsModuleBad(), and m_quality.

◆ isModuleUsable()

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

Definition at line 58 of file SiStripClusterizerConditions.h.

58 { return m_quality->IsModuleUsable(id); }

References SiStripQuality::IsModuleUsable(), and m_quality.

◆ reserve()

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

Definition at line 60 of file SiStripClusterizerConditions.h.

60  {
61  m_detIds.reserve(length);
62  m_dets.reserve(length);
63  m_connections.reserve(length);
64  }

References m_connections, m_detIds, and m_dets.

Member Data Documentation

◆ invalidI

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

◆ 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().

mps_fire.i
i
Definition: mps_fire.py:428
SiStripClusterizerConditions::m_connections
std::vector< std::vector< const FedChannelConnection * > > m_connections
Definition: SiStripClusterizerConditions.h:88
SiStripQuality::IsModuleBad
bool IsModuleBad(const uint32_t &detid) const
Definition: SiStripQuality.cc:599
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
SiStripQuality::IsModuleUsable
bool IsModuleUsable(const uint32_t &detid) const
Definition: SiStripQuality.cc:585
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
SiStripClusterizerConditions::m_detIds
std::vector< uint32_t > m_detIds
Definition: SiStripClusterizerConditions.h:86
b
double b
Definition: hdecay.h:118
pfDeepBoostedJetPreprocessParams_cfi.lower_bound
lower_bound
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:15
SiStripClusterizerConditions::m_quality
const SiStripQuality * m_quality
Definition: SiStripClusterizerConditions.h:85
Det
GeometricSearchDet Det
Definition: DetBelowR.h:8
SiStripClusterizerConditions::m_dets
std::vector< Det > m_dets
Definition: SiStripClusterizerConditions.h:87
qcdUeDQM_cfi.quality
quality
Definition: qcdUeDQM_cfi.py:31
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
dummy
Definition: DummySelector.h:38
GeometricSearchDet
Definition: GeometricSearchDet.h:17
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37