CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
CSCConditions Class Reference

#include <CSCConditions.h>

Public Member Functions

float anodeBXoffset (const CSCDetId &detId) const
 anode bx offset in bx given detId of chamber More...
 
float averageGain () const
 
const std::bitset< 112 > & badStripWord () const
 bad strip channel word for a CSCLayer - 1 bit per channel More...
 
const std::bitset< 112 > & badWireWord () const
 bad wiregroup channel word for a CSCLayer - 1 bit per channel More...
 
float chamberTimingCorrection (const CSCDetId &detId) const
 chamber timing correction in ns given detId of chamber More...
 
int channelFromStrip (const CSCDetId &id, int geomStrip) const
 feedthrough for external access More...
 
float chipCorrection (const CSCDetId &detId, int channel) const
 chip speed correction in ns given detId (w/layer) and strip channel More...
 
void crossTalk (const CSCDetId &id, int channel, std::vector< float > &ct) const
 
float crosstalkIntercept (const CSCDetId &detId, int channel, bool leftRight) const
 crosstalk intercept for left and right More...
 
float crosstalkSlope (const CSCDetId &detId, int channel, bool leftRight) const
 crosstalk slope for left and right More...
 
 CSCConditions (const edm::ParameterSet &ps, edm::ConsumesCollector)
 
void fillBadChannelWords (const CSCDetId &id)
 
float gain (const CSCDetId &detId, int channel) const
 gain per channel More...
 
float gainSigma (const CSCDetId &detId, int channel) const
 overall calibration precision More...
 
float gasGainCorrection (const CSCDetId &detId, int strip, int wire) const
 
const CSCDetIdidOfBadChannelWords () const
 the offline CSCDetId of current bad channel words More...
 
void initializeEvent (const edm::EventSetup &es)
 fetch database content via EventSetup More...
 
bool isInBadChamber (const CSCDetId &id) const
 Is the gven chamber flagged as bad? More...
 
const CSCDBNoiseMatrix::ItemnoiseMatrix (const CSCDetId &detId, int channel) const
 raw noise matrix (unscaled short int elements) More...
 
void noiseMatrixElements (const CSCDetId &id, int channel, std::vector< float > &me) const
 
float pedestal (const CSCDetId &detId, int channel) const
 static ped in ADC counts More...
 
float pedestalSigma (const CSCDetId &detId, int channel) const
 static ped rms in ADC counts More...
 
void print () const
 
int rawStripChannel (const CSCDetId &id, int geomChannel) const
 
bool readBadChambers () const
 did we request reading bad chamber info from db? More...
 
bool readBadChannels () const
 did we request reading bad channel info from db? More...
 
bool useGasGainCorrections () const
 did we request reading gas gain correction info from db? More...
 
bool useTimingCorrections () const
 did we request reading timing correction info from db? More...
 
 ~CSCConditions ()
 

Private Types

enum  elayers { MAX_LAYERS = 3240 }
 

Private Member Functions

void fillBadStripWord (const CSCDetId &id)
 fill bad channel words for offline id More...
 
void fillBadWireWord (const CSCDetId &id)
 
void setIdOfBadChannelWords (const CSCDetId &id)
 

Private Attributes

edm::ESGetToken< CSCBadChambers, CSCBadChambersRcdbadChambersToken_
 
edm::ESGetToken< CSCBadStrips, CSCBadStripsRcdbadStripsToken_
 
std::bitset< 112 > badStripWord_
 
edm::ESGetToken< CSCBadWires, CSCBadWiresRcdbadWiresToken_
 
std::bitset< 112 > badWireWord_
 
edm::ESGetToken< CSCChamberTimeCorrections, CSCChamberTimeCorrectionsRcdchamberTimingCorrectionsToken_
 
edm::ESGetToken< CSCDBChipSpeedCorrection, CSCDBChipSpeedCorrectionRcdchipCorrectionsToken_
 
edm::ESGetToken< CSCDBCrosstalk, CSCDBCrosstalkRcdcrosstalkToken_
 
edm::ESGetToken< CSCDBGains, CSCDBGainsRcdgainsToken_
 
edm::ESWatcher< CSCDBGainsRcdgainsWatcher_
 
edm::ESGetToken< CSCDBGasGainCorrection, CSCDBGasGainCorrectionRcdgasGainCorrectionsToken_
 
CSCDetId idOfBadChannelWords_
 
edm::ESHandle< CSCIndexerBaseindexer_
 
edm::ESGetToken< CSCIndexerBase, CSCIndexerRecordindexerToken_
 
edm::ESHandle< CSCChannelMapperBasemapper_
 
edm::ESGetToken< CSCChannelMapperBase, CSCChannelMapperRecordmapperToken_
 
edm::ESGetToken< CSCDBNoiseMatrix, CSCDBNoiseMatrixRcdnoiseMatrixToken_
 
edm::ESGetToken< CSCDBPedestals, CSCDBPedestalsRcdpedestalsToken_
 
bool readBadChambers_
 
bool readBadChannels_
 
float theAverageGain
 
edm::ESHandle< CSCBadChamberstheBadChambers
 
edm::ESHandle< CSCBadStripstheBadStrips
 
edm::ESHandle< CSCBadWirestheBadWires
 
edm::ESHandle< CSCChamberTimeCorrectionstheChamberTimingCorrections
 
edm::ESHandle< CSCDBChipSpeedCorrectiontheChipCorrections
 
edm::ESHandle< CSCDBCrosstalktheCrosstalk
 
edm::ESHandle< CSCDBGainstheGains
 
edm::ESHandle< CSCDBGasGainCorrectiontheGasGainCorrections
 
edm::ESHandle< CSCDBNoiseMatrixtheNoiseMatrix
 
edm::ESHandle< CSCDBPedestalsthePedestals
 
bool useGasGainCorrections_
 
bool useTimingCorrections_
 

Detailed Description

Encapsulates a user interface into the CSC conditions

Author
Rick Wilkinson
Tim Cox

Interfaces generally use "channels" which count from 1 and are 'geometric' i.e. in the order matching local coordinates. This is the channel labelling in CSCStripDigi (and CSCWireDigi) after internal corrections within CSCRawToDigi.

The input CSCDetId is also 'geometric channel level' i.e. ME11A has its own CSCDetId even in the ganged case,

Ganged ME1a channels are 1-16 (and unganged, of course, 1-48)

From CMSSW 61X, this class also handles separate algorithm versions for indexing the conditions data and for mapping between online and offline channel labelling.

Definition at line 58 of file CSCConditions.h.

Member Enumeration Documentation

◆ elayers

enum CSCConditions::elayers
private
Enumerator
MAX_LAYERS 

Definition at line 208 of file CSCConditions.h.

Constructor & Destructor Documentation

◆ CSCConditions()

CSCConditions::CSCConditions ( const edm::ParameterSet ps,
edm::ConsumesCollector  cc 
)
explicit

Definition at line 25 of file CSCConditions.cc.

References badChambersToken_, badStripsToken_, badWiresToken_, gpuPixelDoublets::cc, chamberTimingCorrectionsToken_, chipCorrectionsToken_, crosstalkToken_, gainsToken_, gasGainCorrectionsToken_, edm::ParameterSet::getParameter(), indexerToken_, mapperToken_, noiseMatrixToken_, pedestalsToken_, readBadChambers(), readBadChambers_, readBadChannels(), readBadChannels_, useGasGainCorrections(), useGasGainCorrections_, useTimingCorrections(), and useTimingCorrections_.

26  : theGains(),
27  theCrosstalk(),
28  thePedestals(),
30  theBadStrips(),
31  theBadWires(),
36  indexer_(nullptr),
37  mapper_(nullptr),
38  readBadChannels_(false),
39  readBadChambers_(false),
40  useTimingCorrections_(false),
43  badStripWord_(0),
44  badWireWord_(0),
45  theAverageGain(-1.0) {
46  readBadChannels_ = ps.getParameter<bool>("readBadChannels");
47  readBadChambers_ = ps.getParameter<bool>("readBadChambers");
48  useTimingCorrections_ = ps.getParameter<bool>("CSCUseTimingCorrections");
49  useGasGainCorrections_ = ps.getParameter<bool>("CSCUseGasGainCorrections");
52  gainsToken_ = cc.esConsumes<CSCDBGains, CSCDBGainsRcd>();
56  if (useTimingCorrections()) {
59  }
60  if (readBadChannels()) {
63  }
64  if (readBadChambers()) {
66  }
67  if (useGasGainCorrections()) {
69  }
70 }
edm::ESGetToken< CSCDBNoiseMatrix, CSCDBNoiseMatrixRcd > noiseMatrixToken_
edm::ESHandle< CSCDBGasGainCorrection > theGasGainCorrections
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::ESGetToken< CSCIndexerBase, CSCIndexerRecord > indexerToken_
edm::ESHandle< CSCDBNoiseMatrix > theNoiseMatrix
edm::ESHandle< CSCBadWires > theBadWires
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
edm::ESGetToken< CSCDBGains, CSCDBGainsRcd > gainsToken_
edm::ESGetToken< CSCDBCrosstalk, CSCDBCrosstalkRcd > crosstalkToken_
edm::ESHandle< CSCChamberTimeCorrections > theChamberTimingCorrections
edm::ESHandle< CSCBadStrips > theBadStrips
edm::ESGetToken< CSCBadStrips, CSCBadStripsRcd > badStripsToken_
bool readBadChannels() const
did we request reading bad channel info from db?
edm::ESHandle< CSCIndexerBase > indexer_
bool useTimingCorrections() const
did we request reading timing correction info from db?
edm::ESGetToken< CSCChamberTimeCorrections, CSCChamberTimeCorrectionsRcd > chamberTimingCorrectionsToken_
bool useTimingCorrections_
edm::ESGetToken< CSCDBPedestals, CSCDBPedestalsRcd > pedestalsToken_
std::bitset< 112 > badWireWord_
edm::ESHandle< CSCChannelMapperBase > mapper_
bool useGasGainCorrections_
bool useGasGainCorrections() const
did we request reading gas gain correction info from db?
edm::ESGetToken< CSCBadWires, CSCBadWiresRcd > badWiresToken_
edm::ESHandle< CSCBadChambers > theBadChambers
edm::ESHandle< CSCDBGains > theGains
edm::ESGetToken< CSCDBGasGainCorrection, CSCDBGasGainCorrectionRcd > gasGainCorrectionsToken_
edm::ESGetToken< CSCDBChipSpeedCorrection, CSCDBChipSpeedCorrectionRcd > chipCorrectionsToken_
edm::ESGetToken< CSCBadChambers, CSCBadChambersRcd > badChambersToken_
edm::ESHandle< CSCDBChipSpeedCorrection > theChipCorrections
edm::ESHandle< CSCDBCrosstalk > theCrosstalk
bool readBadChambers() const
did we request reading bad chamber info from db?
float theAverageGain
edm::ESHandle< CSCDBPedestals > thePedestals
std::bitset< 112 > badStripWord_
CSCDetId idOfBadChannelWords_
edm::ESGetToken< CSCChannelMapperBase, CSCChannelMapperRecord > mapperToken_

◆ ~CSCConditions()

CSCConditions::~CSCConditions ( )

Definition at line 72 of file CSCConditions.cc.

72 {}

Member Function Documentation

◆ anodeBXoffset()

float CSCConditions::anodeBXoffset ( const CSCDetId detId) const

anode bx offset in bx given detId of chamber

Definition at line 345 of file CSCConditions.cc.

References CSCChamberTimeCorrections::ChamberTimeCorrections::anode_bx_offset, cms::cuda::assert(), CSCIndexerBase::chamberIndex(), nano_mu_digi_cff::float, indexer_, edm::ESHandleBase::isValid(), CSCChamberTimeCorrections::item(), mapper_, CSCChamberTimeCorrections::precision(), CSCChannelMapperBase::rawCSCDetId(), theChamberTimingCorrections, and useTimingCorrections().

Referenced by CSCRecoConditions::anodeBXoffset().

345  {
346  if (useTimingCorrections()) {
348  CSCDetId idraw = mapper_->rawCSCDetId(id);
349  int index = indexer_->chamberIndex(idraw) - 1; // NOTE THE MINUS ONE!
352  } else
353  return 0;
354 }
IndexType chamberIndex(IndexType ie, IndexType is, IndexType ir, IndexType ic) const
edm::ESHandle< CSCChamberTimeCorrections > theChamberTimingCorrections
assert(be >=bs)
virtual CSCDetId rawCSCDetId(const CSCDetId &id) const =0
edm::ESHandle< CSCIndexerBase > indexer_
bool useTimingCorrections() const
did we request reading timing correction info from db?
const ChamberTimeCorrections & item(int index) const
edm::ESHandle< CSCChannelMapperBase > mapper_
bool isValid() const
Definition: ESHandle.h:44

◆ averageGain()

float CSCConditions::averageGain ( ) const

average gain over entire CSC system (logically const although must be cached here).

Return average strip gain for full CSC system. Lazy evaluation. Restrict averaging to gains between 5 and 10, and require average is between 6 or 9 otherwise fix it to 7.5. These values came from Dominique and Stan,

Definition at line 360 of file CSCConditions.cc.

References nano_mu_digi_cff::float, CSCDBGains::gains, CSCDBGains::scale(), theAverageGain, and theGains.

Referenced by CSCRecoConditions::averageGain().

360  {
361  const float loEdge = 5.0; // consider gains above this
362  const float hiEdge = 10.0; // consider gains below this
363  const float loLimit = 6.0; // lowest acceptable average gain
364  const float hiLimit = 9.0; // highest acceptable average gain
365  const float expectedAverage = 7.5; // default average gain
366 
367  if (theAverageGain > 0.)
368  return theAverageGain; // only recalculate if necessary
369 
370  int n_strip = 0;
371  float gain_tot = 0.;
372 
373  CSCDBGains::GainContainer::const_iterator it;
374  for (it = theGains->gains.begin(); it != theGains->gains.end(); ++it) {
375  float the_gain = float(it->gain_slope) / theGains->scale();
376  if (the_gain > loEdge && the_gain < hiEdge) {
377  gain_tot += the_gain;
378  ++n_strip;
379  }
380  }
381 
382  // Average gain
383  if (n_strip > 0) {
384  theAverageGain = gain_tot / n_strip;
385  }
386 
387  // Average gain has been around 7.5 in real data
388  if (theAverageGain < loLimit || theAverageGain > hiLimit) {
389  // LogTrace("CSC") << "Average CSC strip gain = "
390  // << theAverageGain << " is reset to expected value "
391  // << expectedAverage;
392  theAverageGain = expectedAverage;
393  }
394 
395  return theAverageGain;
396 }
GainContainer gains
Definition: CSCDBGains.h:24
edm::ESHandle< CSCDBGains > theGains
int scale() const
Definition: CSCDBGains.h:28
float theAverageGain

◆ badStripWord()

const std::bitset<112>& CSCConditions::badStripWord ( ) const
inline

bad strip channel word for a CSCLayer - 1 bit per channel

Definition at line 102 of file CSCConditions.h.

References badStripWord_.

Referenced by CSCRecoConditions::badStrip().

102 { return badStripWord_; }
std::bitset< 112 > badStripWord_

◆ badWireWord()

const std::bitset<112>& CSCConditions::badWireWord ( ) const
inline

bad wiregroup channel word for a CSCLayer - 1 bit per channel

Definition at line 105 of file CSCConditions.h.

References badWireWord_.

Referenced by CSCRecoConditions::badWireWord().

105 { return badWireWord_; }
std::bitset< 112 > badWireWord_

◆ chamberTimingCorrection()

float CSCConditions::chamberTimingCorrection ( const CSCDetId detId) const

chamber timing correction in ns given detId of chamber

Definition at line 333 of file CSCConditions.cc.

References cms::cuda::assert(), CSCChamberTimeCorrections::ChamberTimeCorrections::cfeb_cable_delay, CSCChamberTimeCorrections::ChamberTimeCorrections::cfeb_timing_corr, CSCChamberTimeCorrections::ChamberTimeCorrections::cfeb_tmb_skew_delay, CSCIndexerBase::chamberIndex(), nano_mu_digi_cff::float, indexer_, edm::ESHandleBase::isValid(), CSCChamberTimeCorrections::item(), mapper_, CSCChamberTimeCorrections::precision(), CSCChannelMapperBase::rawCSCDetId(), theChamberTimingCorrections, and useTimingCorrections().

Referenced by CSCRecoConditions::chamberTimingCorrection().

333  {
334  if (useTimingCorrections()) {
336  CSCDetId idraw = mapper_->rawCSCDetId(id);
337  int index = indexer_->chamberIndex(idraw) - 1; // NOTE THE MINUS ONE!
338  return float(
342  } else
343  return 0;
344 }
IndexType chamberIndex(IndexType ie, IndexType is, IndexType ir, IndexType ic) const
edm::ESHandle< CSCChamberTimeCorrections > theChamberTimingCorrections
assert(be >=bs)
virtual CSCDetId rawCSCDetId(const CSCDetId &id) const =0
edm::ESHandle< CSCIndexerBase > indexer_
bool useTimingCorrections() const
did we request reading timing correction info from db?
const ChamberTimeCorrections & item(int index) const
edm::ESHandle< CSCChannelMapperBase > mapper_
bool isValid() const
Definition: ESHandle.h:44

◆ channelFromStrip()

int CSCConditions::channelFromStrip ( const CSCDetId id,
int  geomStrip 
) const

feedthrough for external access

Definition at line 410 of file CSCConditions.cc.

References CSCChannelMapperBase::channelFromStrip(), and mapper_.

Referenced by CSCRecoConditions::badStrip(), CSCRecoConditions::chipCorrection(), CSCRecoConditions::crossTalk(), CSCRecoConditions::gasGainCorrection(), CSCRecoConditions::noiseMatrix(), and CSCRecoConditions::stripWeight().

410  {
411  return mapper_->channelFromStrip(id, geomStrip);
412 }
virtual int channelFromStrip(const CSCDetId &id, int strip) const =0
edm::ESHandle< CSCChannelMapperBase > mapper_

◆ chipCorrection()

float CSCConditions::chipCorrection ( const CSCDetId detId,
int  channel 
) const

chip speed correction in ns given detId (w/layer) and strip channel

Definition at line 322 of file CSCConditions.cc.

References cms::cuda::assert(), CSCIndexerBase::chipIndex(), nano_mu_digi_cff::float, indexer_, edm::ESHandleBase::isValid(), mapper_, CSCChannelMapperBase::rawCSCDetId(), CSCChannelMapperBase::rawStripChannel(), CSCDBChipSpeedCorrection::scale(), theChipCorrections, useTimingCorrections(), and CSCDBChipSpeedCorrection::value().

Referenced by CSCRecoConditions::chipCorrection().

322  {
323  if (useTimingCorrections()) {
325  CSCDetId idraw = mapper_->rawCSCDetId(id);
326  int iraw = mapper_->rawStripChannel(id, geomChannel);
327  int ichip = indexer_->chipIndex(iraw); // converts 1-80 to 1-5 (chip#, CFEB#)
328  int index = indexer_->chipIndex(idraw, ichip) - 1; // NOTE THE MINUS ONE!
330  } else
331  return 0;
332 }
IndexType chipIndex(IndexType ie, IndexType is, IndexType ir, IndexType ic, IndexType il, IndexType ichip) const
assert(be >=bs)
short int value(int index) const
virtual CSCDetId rawCSCDetId(const CSCDetId &id) const =0
edm::ESHandle< CSCIndexerBase > indexer_
bool useTimingCorrections() const
did we request reading timing correction info from db?
edm::ESHandle< CSCChannelMapperBase > mapper_
bool isValid() const
Definition: ESHandle.h:44
edm::ESHandle< CSCDBChipSpeedCorrection > theChipCorrections
virtual int rawStripChannel(const CSCDetId &id, int igeom) const =0
Return raw strip channel number for input geometrical channel number.

◆ crossTalk()

void CSCConditions::crossTalk ( const CSCDetId id,
int  channel,
std::vector< float > &  ct 
) const

fill vector (dim 4, must be allocated by caller) with crosstalk sl, il, sr, ir

Definition at line 310 of file CSCConditions.cc.

References cms::cuda::assert(), nano_mu_digi_cff::float, indexer_, CSCDBCrosstalk::iscale(), edm::ESHandleBase::isValid(), CSCDBCrosstalk::linter(), CSCDBCrosstalk::lslope(), mapper_, CSCChannelMapperBase::rawCSCDetId(), CSCChannelMapperBase::rawStripChannel(), CSCDBCrosstalk::rinter(), CSCDBCrosstalk::rslope(), CSCDBCrosstalk::sscale(), CSCIndexerBase::stripChannelIndex(), and theCrosstalk.

Referenced by CSCRecoConditions::crossTalk().

310  {
312  CSCDetId idraw = mapper_->rawCSCDetId(id);
313  int iraw = mapper_->rawStripChannel(id, geomChannel);
314  int index = indexer_->stripChannelIndex(idraw, iraw) - 1; // NOTE THE MINUS ONE!
315 
320 }
short int linter(int index) const
short int rinter(int index) const
assert(be >=bs)
short int lslope(int index) const
virtual CSCDetId rawCSCDetId(const CSCDetId &id) const =0
edm::ESHandle< CSCIndexerBase > indexer_
edm::ESHandle< CSCChannelMapperBase > mapper_
int sscale() const
int iscale() const
bool isValid() const
Definition: ESHandle.h:44
virtual int rawStripChannel(const CSCDetId &id, int igeom) const =0
Return raw strip channel number for input geometrical channel number.
edm::ESHandle< CSCDBCrosstalk > theCrosstalk
LongIndexType stripChannelIndex(IndexType ie, IndexType is, IndexType ir, IndexType ic, IndexType il, IndexType istrip) const
short int rslope(int index) const

◆ crosstalkIntercept()

float CSCConditions::crosstalkIntercept ( const CSCDetId detId,
int  channel,
bool  leftRight 
) const

crosstalk intercept for left and right

Definition at line 261 of file CSCConditions.cc.

References cms::cuda::assert(), nano_mu_digi_cff::float, indexer_, CSCDBCrosstalk::iscale(), edm::ESHandleBase::isValid(), CSCDBCrosstalk::linter(), mapper_, CSCChannelMapperBase::rawCSCDetId(), CSCChannelMapperBase::rawStripChannel(), CSCDBCrosstalk::rinter(), CSCIndexerBase::stripChannelIndex(), and theCrosstalk.

Referenced by CSCDbStripConditions::crosstalk().

261  {
263  CSCDetId idraw = mapper_->rawCSCDetId(id);
264  int iraw = mapper_->rawStripChannel(id, geomChannel);
265  int index = indexer_->stripChannelIndex(idraw, iraw) - 1; // NOTE THE MINUS ONE!
266  // resistive fraction is at the peak, where t=0
267  return leftRight ? float(theCrosstalk->rinter(index)) / theCrosstalk->iscale()
269 }
short int linter(int index) const
short int rinter(int index) const
assert(be >=bs)
virtual CSCDetId rawCSCDetId(const CSCDetId &id) const =0
edm::ESHandle< CSCIndexerBase > indexer_
edm::ESHandle< CSCChannelMapperBase > mapper_
int iscale() const
bool isValid() const
Definition: ESHandle.h:44
virtual int rawStripChannel(const CSCDetId &id, int igeom) const =0
Return raw strip channel number for input geometrical channel number.
edm::ESHandle< CSCDBCrosstalk > theCrosstalk
LongIndexType stripChannelIndex(IndexType ie, IndexType is, IndexType ir, IndexType ic, IndexType il, IndexType istrip) const

◆ crosstalkSlope()

float CSCConditions::crosstalkSlope ( const CSCDetId detId,
int  channel,
bool  leftRight 
) const

crosstalk slope for left and right

Definition at line 271 of file CSCConditions.cc.

References cms::cuda::assert(), nano_mu_digi_cff::float, indexer_, edm::ESHandleBase::isValid(), CSCDBCrosstalk::lslope(), mapper_, CSCChannelMapperBase::rawCSCDetId(), CSCChannelMapperBase::rawStripChannel(), CSCDBCrosstalk::rslope(), CSCDBCrosstalk::sscale(), CSCIndexerBase::stripChannelIndex(), and theCrosstalk.

Referenced by CSCDbStripConditions::crosstalk().

271  {
273  CSCDetId idraw = mapper_->rawCSCDetId(id);
274  int iraw = mapper_->rawStripChannel(id, geomChannel);
275  int index = indexer_->stripChannelIndex(idraw, iraw) - 1; // NOTE THE MINUS ONE!
276  // resistive fraction is at the peak, where t=0
277  return leftRight ? float(theCrosstalk->rslope(index)) / theCrosstalk->sscale()
279 }
assert(be >=bs)
short int lslope(int index) const
virtual CSCDetId rawCSCDetId(const CSCDetId &id) const =0
edm::ESHandle< CSCIndexerBase > indexer_
edm::ESHandle< CSCChannelMapperBase > mapper_
int sscale() const
bool isValid() const
Definition: ESHandle.h:44
virtual int rawStripChannel(const CSCDetId &id, int igeom) const =0
Return raw strip channel number for input geometrical channel number.
edm::ESHandle< CSCDBCrosstalk > theCrosstalk
LongIndexType stripChannelIndex(IndexType ie, IndexType is, IndexType ir, IndexType ic, IndexType il, IndexType istrip) const
short int rslope(int index) const

◆ fillBadChannelWords()

void CSCConditions::fillBadChannelWords ( const CSCDetId id)

Fill bad channel words - one for strips, one for wires, for an offline CSCDetId

Definition at line 127 of file CSCConditions.cc.

References badStripWord_, badWireWord_, fillBadStripWord(), fillBadWireWord(), idOfBadChannelWords(), mapper_, CSCChannelMapperBase::rawCSCDetId(), readBadChannels(), and setIdOfBadChannelWords().

Referenced by CSCRecoConditions::fillBadChannelWords().

127  {
128  // input CSCDetId is expected to be an offline value i.e. different for ME1/1A
129  // and ME1/1B
130 
131  // Only update content if necessary
132  if (id != idOfBadChannelWords()) {
133  // store offline CSCDetId for the two bad channel words
135 
136  // reset to all zeroes
137  badStripWord_.reset();
138  badWireWord_.reset();
139 
140  if (readBadChannels()) {
141  // convert to online CSCDetId since that is how conditions data are stored
142  CSCDetId idraw = mapper_->rawCSCDetId(id);
143  fillBadStripWord(idraw);
144  fillBadWireWord(idraw);
145  }
146  }
147 }
const CSCDetId & idOfBadChannelWords() const
the offline CSCDetId of current bad channel words
bool readBadChannels() const
did we request reading bad channel info from db?
virtual CSCDetId rawCSCDetId(const CSCDetId &id) const =0
void fillBadWireWord(const CSCDetId &id)
std::bitset< 112 > badWireWord_
edm::ESHandle< CSCChannelMapperBase > mapper_
void fillBadStripWord(const CSCDetId &id)
fill bad channel words for offline id
void setIdOfBadChannelWords(const CSCDetId &id)
std::bitset< 112 > badStripWord_

◆ fillBadStripWord()

void CSCConditions::fillBadStripWord ( const CSCDetId id)
private

fill bad channel words for offline id

Next function private.

Definition at line 151 of file CSCConditions.cc.

References badStripWord_, CSCIndexerBase::chamberIndex(), CSCBadStrips::chambers, officialStyle::chan, CSCBadStrips::channels, mps_fire::i, indexer_, dqmiolumiharvest::j, and theBadStrips.

Referenced by fillBadChannelWords().

151  {
152  // Input CSCDetId is expected to be a 'raw' value
153 
154  // Find linear index of chamber for input CSCDetId
155  int inputIndex = indexer_->chamberIndex(id);
156  short inputLayer = id.layer();
157 
158  // Does this chamber occur in bad channel list? If so, unpack its bad channels
159 
160  // chambers is a vector<BadChamber>
161  // channels is a vector<BadChannel>
162  // Each BadChamber contains its index (1-468 or 540 w. ME42), the no. of bad
163  // channels, and the index within vector<BadChannel> where this chamber's bad
164  // channels start.
165 
166  for (size_t i = 0; i < theBadStrips->chambers.size(); ++i) { // loop over bad chambers
167  int indexc = theBadStrips->chambers[i].chamber_index;
168  if (indexc != inputIndex)
169  continue; // next iteration if not a match
170 
171  int start = theBadStrips->chambers[i].pointer;
172  int nbad = theBadStrips->chambers[i].bad_channels;
173 
174  for (int j = start - 1; j < start - 1 + nbad; ++j) { // bad channels in this chamber
175  short lay = theBadStrips->channels[j].layer; // value 1-6
176  if (lay != inputLayer)
177  continue;
178 
179  short chan = theBadStrips->channels[j].channel; // value 1-80 (->112 for unganged ME1/1A)
180  // Flags so far unused (and unset in conditins data)
181  // short f1 = theBadStrips->channels[j].flag1;
182  // short f2 = theBadStrips->channels[j].flag2;
183  // short f3 = theBadStrips->channels[j].flag3;
184  badStripWord_.set(chan - 1, true); // set bit 0-79 (111) in 80 (112)-bit
185  // bitset representing this layer
186  } // j
187  } // i
188 }
Definition: start.py:1
IndexType chamberIndex(IndexType ie, IndexType is, IndexType ir, IndexType ic) const
BadChamberContainer chambers
Definition: CSCBadStrips.h:35
edm::ESHandle< CSCBadStrips > theBadStrips
edm::ESHandle< CSCIndexerBase > indexer_
BadChannelContainer channels
Definition: CSCBadStrips.h:36
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi...
std::bitset< 112 > badStripWord_

◆ fillBadWireWord()

void CSCConditions::fillBadWireWord ( const CSCDetId id)
private

Definition at line 190 of file CSCConditions.cc.

References badWireWord_, CSCIndexerBase::chamberIndex(), CSCBadWires::chambers, officialStyle::chan, CSCBadWires::channels, mps_fire::i, indexer_, dqmiolumiharvest::j, and theBadWires.

Referenced by fillBadChannelWords().

190  {
191  // Input CSCDetId is expected to be a 'raw' value
192 
193  // Find linear index of chamber for input CSCDetId
194  int inputIndex = indexer_->chamberIndex(id);
195  short inputLayer = id.layer();
196 
197  // unpack what we've read from theBadWires
198 
199  for (size_t i = 0; i < theBadWires->chambers.size(); ++i) { // loop over bad chambers
200  int indexc = theBadWires->chambers[i].chamber_index;
201 
202  if (indexc != inputIndex)
203  continue; // next iteration if not a match
204 
205  int start = theBadWires->chambers[i].pointer;
206  int nbad = theBadWires->chambers[i].bad_channels;
207 
208  for (int j = start - 1; j < start - 1 + nbad; ++j) { // bad channels in this chamber
209  short lay = theBadWires->channels[j].layer; // value 1-6
210  if (lay != inputLayer)
211  continue;
212 
213  short chan = theBadWires->channels[j].channel; // value 1-112
214  // short f1 = theBadWires->channels[j].flag1;
215  // short f2 = theBadWires->channels[j].flag2;
216  // short f3 = theBadWires->channels[j].flag3;
217  badWireWord_.set(chan - 1,
218  true); // set bit 0-111 in 112-bit bitset representing this layer
219  } // j
220  } // i
221 }
Definition: start.py:1
IndexType chamberIndex(IndexType ie, IndexType is, IndexType ir, IndexType ic) const
edm::ESHandle< CSCBadWires > theBadWires
BadChamberContainer chambers
Definition: CSCBadWires.h:35
edm::ESHandle< CSCIndexerBase > indexer_
std::bitset< 112 > badWireWord_
BadChannelContainer channels
Definition: CSCBadWires.h:36
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi...

◆ gain()

float CSCConditions::gain ( const CSCDetId detId,
int  channel 
) const

gain per channel

Definition at line 237 of file CSCConditions.cc.

References cms::cuda::assert(), nano_mu_digi_cff::float, CSCDBGains::gain(), indexer_, edm::ESHandleBase::isValid(), mapper_, CSCChannelMapperBase::rawCSCDetId(), CSCChannelMapperBase::rawStripChannel(), CSCDBGains::scale(), CSCIndexerBase::stripChannelIndex(), and theGains.

Referenced by CSCDbStripConditions::gain(), and CSCRecoConditions::gain().

237  {
239  CSCDetId idraw = mapper_->rawCSCDetId(id);
240  int iraw = mapper_->rawStripChannel(id, geomChannel);
241  int index = indexer_->stripChannelIndex(idraw, iraw) - 1; // NOTE THE MINUS ONE!
242  return float(theGains->gain(index)) / theGains->scale();
243 }
short int gain(int index) const
Definition: CSCDBGains.h:27
assert(be >=bs)
virtual CSCDetId rawCSCDetId(const CSCDetId &id) const =0
edm::ESHandle< CSCIndexerBase > indexer_
edm::ESHandle< CSCChannelMapperBase > mapper_
edm::ESHandle< CSCDBGains > theGains
bool isValid() const
Definition: ESHandle.h:44
int scale() const
Definition: CSCDBGains.h:28
virtual int rawStripChannel(const CSCDetId &id, int igeom) const =0
Return raw strip channel number for input geometrical channel number.
LongIndexType stripChannelIndex(IndexType ie, IndexType is, IndexType ir, IndexType ic, IndexType il, IndexType istrip) const

◆ gainSigma()

float CSCConditions::gainSigma ( const CSCDetId detId,
int  channel 
) const
inline

overall calibration precision

Definition at line 69 of file CSCConditions.h.

69 { return 0.005; }

◆ gasGainCorrection()

float CSCConditions::gasGainCorrection ( const CSCDetId detId,
int  strip,
int  wire 
) const

gas gain correction as a function of detId (w/layer), strip, and wire channels

Definition at line 398 of file CSCConditions.cc.

References cms::cuda::assert(), nano_mu_digi_cff::float, CSCIndexerBase::gasGainIndex(), indexer_, edm::ESHandleBase::isValid(), mapper_, CSCChannelMapperBase::rawCSCDetId(), CSCChannelMapperBase::rawStripChannel(), theGasGainCorrections, useGasGainCorrections(), and CSCDBGasGainCorrection::value().

Referenced by CSCRecoConditions::gasGainCorrection().

398  {
399  if (useGasGainCorrections()) {
401  CSCDetId idraw = mapper_->rawCSCDetId(id);
402  int iraw = mapper_->rawStripChannel(id, geomChannel);
403  int index = indexer_->gasGainIndex(idraw, iraw, iwiregroup) - 1; // NOTE THE MINUS ONE!
405  } else {
406  return 1.;
407  }
408 }
edm::ESHandle< CSCDBGasGainCorrection > theGasGainCorrections
IndexType gasGainIndex(IndexType ie, IndexType is, IndexType ir, IndexType ic, IndexType il, IndexType ihvsegment, IndexType ichip) const
assert(be >=bs)
virtual CSCDetId rawCSCDetId(const CSCDetId &id) const =0
edm::ESHandle< CSCIndexerBase > indexer_
float value(int index) const
edm::ESHandle< CSCChannelMapperBase > mapper_
bool useGasGainCorrections() const
did we request reading gas gain correction info from db?
bool isValid() const
Definition: ESHandle.h:44
virtual int rawStripChannel(const CSCDetId &id, int igeom) const =0
Return raw strip channel number for input geometrical channel number.

◆ idOfBadChannelWords()

const CSCDetId& CSCConditions::idOfBadChannelWords ( ) const
inline

the offline CSCDetId of current bad channel words

Definition at line 108 of file CSCConditions.h.

References idOfBadChannelWords_.

Referenced by CSCRecoConditions::badStrip(), and fillBadChannelWords().

108 { return idOfBadChannelWords_; }
CSCDetId idOfBadChannelWords_

◆ initializeEvent()

void CSCConditions::initializeEvent ( const edm::EventSetup es)

fetch database content via EventSetup

Definition at line 74 of file CSCConditions.cc.

References badChambersToken_, badStripsToken_, badWiresToken_, chamberTimingCorrectionsToken_, edm::ESWatcher< T >::check(), chipCorrectionsToken_, crosstalkToken_, gainsToken_, gainsWatcher_, gasGainCorrectionsToken_, edm::EventSetup::getHandle(), indexer_, indexerToken_, mapper_, mapperToken_, noiseMatrixToken_, pedestalsToken_, readBadChambers(), readBadChannels(), theAverageGain, theBadChambers, theBadStrips, theBadWires, theChamberTimingCorrections, theChipCorrections, theCrosstalk, theGains, theGasGainCorrections, theNoiseMatrix, thePedestals, useGasGainCorrections(), and useTimingCorrections().

Referenced by CSCDbStripConditions::initializeEvent(), and CSCRecoConditions::initializeEvent().

74  {
75  // Algorithms
78 
79  // Strip gains
81  // Strip X-talk
83  // Strip pedestals
85  // Strip autocorrelation noise matrix
87 
88  if (useTimingCorrections()) {
89  // Buckeye chip speeds
91  // Cable lengths from chambers to peripheral crate and additional chamber
92  // level timing correction
94  }
95 
96  if (readBadChannels()) {
97  // Bad strip channels
99  // Bad wiregroup channels
101 
102  //@@ if( badStripsWatcher_.check( es ) ) {
103  // fillBadStripWords();
104  //@@ }
105  //@@ if( badWiresWatcher_.check( es ) ) {
106  // fillBadWireWords();
107  //@ }
108  }
109 
110  // Has GainsRcd changed?
111  if (gainsWatcher_.check(es)) { // Yes...
112  theAverageGain = -1.0; // ...reset, so next access will recalculate it
113  }
114 
115  if (readBadChambers()) {
116  // Entire bad chambers
118  }
119 
120  if (useGasGainCorrections()) {
122  }
123 
124  // print();
125 }
edm::ESGetToken< CSCDBNoiseMatrix, CSCDBNoiseMatrixRcd > noiseMatrixToken_
edm::ESHandle< CSCDBGasGainCorrection > theGasGainCorrections
edm::ESGetToken< CSCIndexerBase, CSCIndexerRecord > indexerToken_
edm::ESHandle< CSCDBNoiseMatrix > theNoiseMatrix
edm::ESHandle< CSCBadWires > theBadWires
edm::ESGetToken< CSCDBGains, CSCDBGainsRcd > gainsToken_
edm::ESGetToken< CSCDBCrosstalk, CSCDBCrosstalkRcd > crosstalkToken_
edm::ESHandle< CSCChamberTimeCorrections > theChamberTimingCorrections
edm::ESHandle< CSCBadStrips > theBadStrips
edm::ESGetToken< CSCBadStrips, CSCBadStripsRcd > badStripsToken_
bool readBadChannels() const
did we request reading bad channel info from db?
edm::ESHandle< CSCIndexerBase > indexer_
bool useTimingCorrections() const
did we request reading timing correction info from db?
edm::ESWatcher< CSCDBGainsRcd > gainsWatcher_
edm::ESGetToken< CSCChamberTimeCorrections, CSCChamberTimeCorrectionsRcd > chamberTimingCorrectionsToken_
edm::ESGetToken< CSCDBPedestals, CSCDBPedestalsRcd > pedestalsToken_
edm::ESHandle< CSCChannelMapperBase > mapper_
bool useGasGainCorrections() const
did we request reading gas gain correction info from db?
edm::ESGetToken< CSCBadWires, CSCBadWiresRcd > badWiresToken_
edm::ESHandle< CSCBadChambers > theBadChambers
edm::ESHandle< CSCDBGains > theGains
edm::ESGetToken< CSCDBGasGainCorrection, CSCDBGasGainCorrectionRcd > gasGainCorrectionsToken_
edm::ESGetToken< CSCDBChipSpeedCorrection, CSCDBChipSpeedCorrectionRcd > chipCorrectionsToken_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
edm::ESGetToken< CSCBadChambers, CSCBadChambersRcd > badChambersToken_
edm::ESHandle< CSCDBChipSpeedCorrection > theChipCorrections
edm::ESHandle< CSCDBCrosstalk > theCrosstalk
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
bool readBadChambers() const
did we request reading bad chamber info from db?
float theAverageGain
edm::ESHandle< CSCDBPedestals > thePedestals
edm::ESGetToken< CSCChannelMapperBase, CSCChannelMapperRecord > mapperToken_

◆ isInBadChamber()

bool CSCConditions::isInBadChamber ( const CSCDetId id) const

Is the gven chamber flagged as bad?

Definition at line 223 of file CSCConditions.cc.

References CSCIndexerBase::chamberIndex(), indexer_, CSCBadChambers::isInBadChamber(), mapper_, CSCChannelMapperBase::rawCSCDetId(), readBadChambers(), and theBadChambers.

Referenced by CSCDbStripConditions::isInBadChamber().

223  {
224  //@@ We do not consider the possibility of having ME1/1A & ME1/1B
225  // independently 'bad'.
226  //@@ To do that we would need to define separate chamber indexes for ME1/1A &
227  // ME1/1B.
228 
229  if (readBadChambers()) {
230  CSCDetId idraw = mapper_->rawCSCDetId(id);
231  int index = indexer_->chamberIndex(idraw);
233  } else
234  return false;
235 }
IndexType chamberIndex(IndexType ie, IndexType is, IndexType ir, IndexType ic) const
virtual CSCDetId rawCSCDetId(const CSCDetId &id) const =0
edm::ESHandle< CSCIndexerBase > indexer_
edm::ESHandle< CSCChannelMapperBase > mapper_
edm::ESHandle< CSCBadChambers > theBadChambers
bool isInBadChamber(IndexType ichamber) const
Is the chamber with index &#39;ichamber&#39; flagged as bad?
bool readBadChambers() const
did we request reading bad chamber info from db?

◆ noiseMatrix()

const CSCDBNoiseMatrix::Item & CSCConditions::noiseMatrix ( const CSCDetId detId,
int  channel 
) const

raw noise matrix (unscaled short int elements)

Definition at line 281 of file CSCConditions.cc.

References cms::cuda::assert(), indexer_, edm::ESHandleBase::isValid(), CSCDBNoiseMatrix::item(), mapper_, CSCChannelMapperBase::rawCSCDetId(), CSCChannelMapperBase::rawStripChannel(), CSCIndexerBase::stripChannelIndex(), and theNoiseMatrix.

Referenced by noiseMatrixElements().

281  {
282  //@@ BEWARE - THIS FUNCTION DOES NOT APPLY SCALE FACTOR USED IN PACKING VALUES
283  // IN CONDITIONS DATA
284  //@@ MAY BE AN ERROR? WHO WOULD WANT ACCESS WITHOUT IT?
285 
287  CSCDetId idraw = mapper_->rawCSCDetId(id);
288  int iraw = mapper_->rawStripChannel(id, geomChannel);
289  int index = indexer_->stripChannelIndex(idraw, iraw) - 1; // NOTE THE MINUS ONE!
290  return theNoiseMatrix->item(index);
291 }
edm::ESHandle< CSCDBNoiseMatrix > theNoiseMatrix
assert(be >=bs)
virtual CSCDetId rawCSCDetId(const CSCDetId &id) const =0
edm::ESHandle< CSCIndexerBase > indexer_
edm::ESHandle< CSCChannelMapperBase > mapper_
bool isValid() const
Definition: ESHandle.h:44
virtual int rawStripChannel(const CSCDetId &id, int igeom) const =0
Return raw strip channel number for input geometrical channel number.
LongIndexType stripChannelIndex(IndexType ie, IndexType is, IndexType ir, IndexType ic, IndexType il, IndexType istrip) const
const Item & item(int index) const

◆ noiseMatrixElements()

void CSCConditions::noiseMatrixElements ( const CSCDetId id,
int  channel,
std::vector< float > &  me 
) const

fill vector (dim 12, must be allocated by caller) with noise matrix elements (scaled to float)

Definition at line 293 of file CSCConditions.cc.

References cms::cuda::assert(), nano_mu_digi_cff::float, B2GTnPMonitor_cfi::item, hlt_dqm_clientPB-live_cfg::me, noiseMatrix(), CSCDBNoiseMatrix::scale(), and theNoiseMatrix.

Referenced by CSCDbStripConditions::fetchNoisifier(), and CSCRecoConditions::noiseMatrix().

293  {
294  assert(me.size() > 11);
295  const CSCDBNoiseMatrix::Item &item = noiseMatrix(id, geomChannel); // i.e. the function above
296  me[0] = float(item.elem33) / theNoiseMatrix->scale();
297  me[1] = float(item.elem34) / theNoiseMatrix->scale();
298  me[2] = float(item.elem35) / theNoiseMatrix->scale();
299  me[3] = float(item.elem44) / theNoiseMatrix->scale();
300  me[4] = float(item.elem45) / theNoiseMatrix->scale();
301  me[5] = float(item.elem46) / theNoiseMatrix->scale();
302  me[6] = float(item.elem55) / theNoiseMatrix->scale();
303  me[7] = float(item.elem56) / theNoiseMatrix->scale();
304  me[8] = float(item.elem57) / theNoiseMatrix->scale();
305  me[9] = float(item.elem66) / theNoiseMatrix->scale();
306  me[10] = float(item.elem67) / theNoiseMatrix->scale();
307  me[11] = float(item.elem77) / theNoiseMatrix->scale();
308 }
edm::ESHandle< CSCDBNoiseMatrix > theNoiseMatrix
assert(be >=bs)
const CSCDBNoiseMatrix::Item & noiseMatrix(const CSCDetId &detId, int channel) const
raw noise matrix (unscaled short int elements)

◆ pedestal()

float CSCConditions::pedestal ( const CSCDetId detId,
int  channel 
) const

static ped in ADC counts

Definition at line 245 of file CSCConditions.cc.

References cms::cuda::assert(), nano_mu_digi_cff::float, indexer_, edm::ESHandleBase::isValid(), mapper_, CSCDBPedestals::pedestal(), CSCChannelMapperBase::rawCSCDetId(), CSCChannelMapperBase::rawStripChannel(), CSCDBPedestals::scale_ped(), CSCIndexerBase::stripChannelIndex(), and thePedestals.

Referenced by CSCDbStripConditions::pedestal(), and CSCRecoConditions::pedestal().

245  {
247  CSCDetId idraw = mapper_->rawCSCDetId(id);
248  int iraw = mapper_->rawStripChannel(id, geomChannel);
249  int index = indexer_->stripChannelIndex(idraw, iraw) - 1; // NOTE THE MINUS ONE!
251 }
assert(be >=bs)
int scale_ped() const
virtual CSCDetId rawCSCDetId(const CSCDetId &id) const =0
edm::ESHandle< CSCIndexerBase > indexer_
short int pedestal(int index) const
edm::ESHandle< CSCChannelMapperBase > mapper_
bool isValid() const
Definition: ESHandle.h:44
virtual int rawStripChannel(const CSCDetId &id, int igeom) const =0
Return raw strip channel number for input geometrical channel number.
edm::ESHandle< CSCDBPedestals > thePedestals
LongIndexType stripChannelIndex(IndexType ie, IndexType is, IndexType ir, IndexType ic, IndexType il, IndexType istrip) const

◆ pedestalSigma()

float CSCConditions::pedestalSigma ( const CSCDetId detId,
int  channel 
) const

static ped rms in ADC counts

Definition at line 253 of file CSCConditions.cc.

References cms::cuda::assert(), nano_mu_digi_cff::float, indexer_, edm::ESHandleBase::isValid(), mapper_, CSCDBPedestals::pedestal_rms(), CSCChannelMapperBase::rawCSCDetId(), CSCChannelMapperBase::rawStripChannel(), CSCDBPedestals::scale_rms(), CSCIndexerBase::stripChannelIndex(), and thePedestals.

Referenced by CSCDbStripConditions::pedestalSigma(), and CSCRecoConditions::pedestalSigma().

253  {
255  CSCDetId idraw = mapper_->rawCSCDetId(id);
256  int iraw = mapper_->rawStripChannel(id, geomChannel);
257  int index = indexer_->stripChannelIndex(idraw, iraw) - 1; // NOTE THE MINUS ONE!
259 }
assert(be >=bs)
virtual CSCDetId rawCSCDetId(const CSCDetId &id) const =0
edm::ESHandle< CSCIndexerBase > indexer_
edm::ESHandle< CSCChannelMapperBase > mapper_
short int pedestal_rms(int index) const
int scale_rms() const
bool isValid() const
Definition: ESHandle.h:44
virtual int rawStripChannel(const CSCDetId &id, int igeom) const =0
Return raw strip channel number for input geometrical channel number.
edm::ESHandle< CSCDBPedestals > thePedestals
LongIndexType stripChannelIndex(IndexType ie, IndexType is, IndexType ir, IndexType ic, IndexType il, IndexType istrip) const

◆ print()

void CSCConditions::print ( void  ) const

Definition at line 418 of file CSCConditions.cc.

420 {
421  /*
422  std::cout << "SIZES: GAINS: " << theGains->gains.size()
423  << " PEDESTALS: " << thePedestals->pedestals.size()
424  << " NOISES " << theNoiseMatrix->matrix.size() << std::endl;;
425 
426  std::map< int,std::vector<CSCDBGains::Item> >::const_iterator layerGainsItr
427  = theGains->gains.begin(), lastGain = theGains->gains.end(); for( ;
428  layerGainsItr != lastGain; ++layerGainsItr)
429  {
430  std::cout << "GAIN " << layerGainsItr->first
431  << " STRIPS " << layerGainsItr->second.size() << " "
432  << layerGainsItr->second[0].gain_slope
433  << " " << layerGainsItr->second[0].gain_intercept << std::endl;
434  }
435 
436  std::map< int,std::vector<CSCDBPedestals::Item> >::const_iterator
437  pedestalItr = thePedestals->pedestals.begin(), lastPedestal =
438  thePedestals->pedestals.end(); for( ; pedestalItr != lastPedestal;
439  ++pedestalItr)
440  {
441  std::cout << "PEDS " << pedestalItr->first << " "
442  << " STRIPS " << pedestalItr->second.size() << " ";
443  for(int i = 1; i < 80; ++i)
444  {
445  std::cout << pedestalItr->second[i-1].rms << " " ;
446  }
447  std::cout << std::endl;
448  }
449 
450  std::map< int,std::vector<CSCDBCrosstalk::Item> >::const_iterator
451  crosstalkItr = theCrosstalk->crosstalk.begin(), lastCrosstalk =
452  theCrosstalk->crosstalk.end(); for( ; crosstalkItr != lastCrosstalk;
453  ++crosstalkItr)
454  {
455  std::cout << "XTALKS " << crosstalkItr->first
456  << " STRIPS " << crosstalkItr->second.size() << " "
457  << crosstalkItr->second[5].xtalk_slope_left << " "
458  << crosstalkItr->second[5].xtalk_slope_right << " "
459  << crosstalkItr->second[5].xtalk_intercept_left << " "
460  << crosstalkItr->second[5].xtalk_intercept_right << std::endl;
461  }
462  */
463 }

◆ rawStripChannel()

int CSCConditions::rawStripChannel ( const CSCDetId id,
int  geomChannel 
) const

Definition at line 414 of file CSCConditions.cc.

References mapper_, and CSCChannelMapperBase::rawStripChannel().

Referenced by CSCRecoConditions::badStrip().

414  {
415  return mapper_->rawStripChannel(id, geomChannel);
416 }
edm::ESHandle< CSCChannelMapperBase > mapper_
virtual int rawStripChannel(const CSCDetId &id, int igeom) const =0
Return raw strip channel number for input geometrical channel number.

◆ readBadChambers()

bool CSCConditions::readBadChambers ( ) const
inline

did we request reading bad chamber info from db?

Definition at line 119 of file CSCConditions.h.

References readBadChambers_.

Referenced by CSCConditions(), initializeEvent(), and isInBadChamber().

119 { return readBadChambers_; }

◆ readBadChannels()

bool CSCConditions::readBadChannels ( ) const
inline

did we request reading bad channel info from db?

Definition at line 116 of file CSCConditions.h.

References readBadChannels_.

Referenced by CSCConditions(), fillBadChannelWords(), and initializeEvent().

116 { return readBadChannels_; }

◆ setIdOfBadChannelWords()

void CSCConditions::setIdOfBadChannelWords ( const CSCDetId id)
inlineprivate

Set id for current content of bad channel words - this is offline id i.e. separate for ME11A & ME11B

Definition at line 149 of file CSCConditions.h.

References l1ctLayer2EG_cff::id, and idOfBadChannelWords_.

Referenced by fillBadChannelWords().

◆ useGasGainCorrections()

bool CSCConditions::useGasGainCorrections ( ) const
inline

did we request reading gas gain correction info from db?

Definition at line 137 of file CSCConditions.h.

References useGasGainCorrections_.

Referenced by CSCConditions(), gasGainCorrection(), and initializeEvent().

137 { return useGasGainCorrections_; }
bool useGasGainCorrections_

◆ useTimingCorrections()

bool CSCConditions::useTimingCorrections ( ) const
inline

did we request reading timing correction info from db?

Definition at line 122 of file CSCConditions.h.

References useTimingCorrections_.

Referenced by anodeBXoffset(), chamberTimingCorrection(), chipCorrection(), CSCConditions(), and initializeEvent().

122 { return useTimingCorrections_; }
bool useTimingCorrections_

Member Data Documentation

◆ badChambersToken_

edm::ESGetToken<CSCBadChambers, CSCBadChambersRcd> CSCConditions::badChambersToken_
private

Definition at line 176 of file CSCConditions.h.

Referenced by CSCConditions(), and initializeEvent().

◆ badStripsToken_

edm::ESGetToken<CSCBadStrips, CSCBadStripsRcd> CSCConditions::badStripsToken_
private

Definition at line 174 of file CSCConditions.h.

Referenced by CSCConditions(), and initializeEvent().

◆ badStripWord_

std::bitset<112> CSCConditions::badStripWord_
private

Definition at line 196 of file CSCConditions.h.

Referenced by badStripWord(), fillBadChannelWords(), and fillBadStripWord().

◆ badWiresToken_

edm::ESGetToken<CSCBadWires, CSCBadWiresRcd> CSCConditions::badWiresToken_
private

Definition at line 175 of file CSCConditions.h.

Referenced by CSCConditions(), and initializeEvent().

◆ badWireWord_

std::bitset<112> CSCConditions::badWireWord_
private

Definition at line 197 of file CSCConditions.h.

Referenced by badWireWord(), fillBadChannelWords(), and fillBadWireWord().

◆ chamberTimingCorrectionsToken_

edm::ESGetToken<CSCChamberTimeCorrections, CSCChamberTimeCorrectionsRcd> CSCConditions::chamberTimingCorrectionsToken_
private

Definition at line 178 of file CSCConditions.h.

Referenced by CSCConditions(), and initializeEvent().

◆ chipCorrectionsToken_

edm::ESGetToken<CSCDBChipSpeedCorrection, CSCDBChipSpeedCorrectionRcd> CSCConditions::chipCorrectionsToken_
private

Definition at line 177 of file CSCConditions.h.

Referenced by CSCConditions(), and initializeEvent().

◆ crosstalkToken_

edm::ESGetToken<CSCDBCrosstalk, CSCDBCrosstalkRcd> CSCConditions::crosstalkToken_
private

Definition at line 171 of file CSCConditions.h.

Referenced by CSCConditions(), and initializeEvent().

◆ gainsToken_

edm::ESGetToken<CSCDBGains, CSCDBGainsRcd> CSCConditions::gainsToken_
private

Definition at line 170 of file CSCConditions.h.

Referenced by CSCConditions(), and initializeEvent().

◆ gainsWatcher_

edm::ESWatcher<CSCDBGainsRcd> CSCConditions::gainsWatcher_
private

Definition at line 202 of file CSCConditions.h.

Referenced by initializeEvent().

◆ gasGainCorrectionsToken_

edm::ESGetToken<CSCDBGasGainCorrection, CSCDBGasGainCorrectionRcd> CSCConditions::gasGainCorrectionsToken_
private

Definition at line 179 of file CSCConditions.h.

Referenced by CSCConditions(), and initializeEvent().

◆ idOfBadChannelWords_

CSCDetId CSCConditions::idOfBadChannelWords_
private

Definition at line 195 of file CSCConditions.h.

Referenced by idOfBadChannelWords(), and setIdOfBadChannelWords().

◆ indexer_

edm::ESHandle<CSCIndexerBase> CSCConditions::indexer_
private

◆ indexerToken_

edm::ESGetToken<CSCIndexerBase, CSCIndexerRecord> CSCConditions::indexerToken_
private

Definition at line 180 of file CSCConditions.h.

Referenced by CSCConditions(), and initializeEvent().

◆ mapper_

edm::ESHandle<CSCChannelMapperBase> CSCConditions::mapper_
private

◆ mapperToken_

edm::ESGetToken<CSCChannelMapperBase, CSCChannelMapperRecord> CSCConditions::mapperToken_
private

Definition at line 181 of file CSCConditions.h.

Referenced by CSCConditions(), and initializeEvent().

◆ noiseMatrixToken_

edm::ESGetToken<CSCDBNoiseMatrix, CSCDBNoiseMatrixRcd> CSCConditions::noiseMatrixToken_
private

Definition at line 173 of file CSCConditions.h.

Referenced by CSCConditions(), and initializeEvent().

◆ pedestalsToken_

edm::ESGetToken<CSCDBPedestals, CSCDBPedestalsRcd> CSCConditions::pedestalsToken_
private

Definition at line 172 of file CSCConditions.h.

Referenced by CSCConditions(), and initializeEvent().

◆ readBadChambers_

bool CSCConditions::readBadChambers_
private

Definition at line 187 of file CSCConditions.h.

Referenced by CSCConditions(), and readBadChambers().

◆ readBadChannels_

bool CSCConditions::readBadChannels_
private

Definition at line 185 of file CSCConditions.h.

Referenced by CSCConditions(), and readBadChannels().

◆ theAverageGain

float CSCConditions::theAverageGain
mutableprivate

Definition at line 199 of file CSCConditions.h.

Referenced by averageGain(), and initializeEvent().

◆ theBadChambers

edm::ESHandle<CSCBadChambers> CSCConditions::theBadChambers
private

Definition at line 159 of file CSCConditions.h.

Referenced by initializeEvent(), and isInBadChamber().

◆ theBadStrips

edm::ESHandle<CSCBadStrips> CSCConditions::theBadStrips
private

Definition at line 157 of file CSCConditions.h.

Referenced by fillBadStripWord(), and initializeEvent().

◆ theBadWires

edm::ESHandle<CSCBadWires> CSCConditions::theBadWires
private

Definition at line 158 of file CSCConditions.h.

Referenced by fillBadWireWord(), and initializeEvent().

◆ theChamberTimingCorrections

edm::ESHandle<CSCChamberTimeCorrections> CSCConditions::theChamberTimingCorrections
private

Definition at line 161 of file CSCConditions.h.

Referenced by anodeBXoffset(), chamberTimingCorrection(), and initializeEvent().

◆ theChipCorrections

edm::ESHandle<CSCDBChipSpeedCorrection> CSCConditions::theChipCorrections
private

Definition at line 160 of file CSCConditions.h.

Referenced by chipCorrection(), and initializeEvent().

◆ theCrosstalk

edm::ESHandle<CSCDBCrosstalk> CSCConditions::theCrosstalk
private

Definition at line 154 of file CSCConditions.h.

Referenced by crossTalk(), crosstalkIntercept(), crosstalkSlope(), and initializeEvent().

◆ theGains

edm::ESHandle<CSCDBGains> CSCConditions::theGains
private

Definition at line 153 of file CSCConditions.h.

Referenced by averageGain(), gain(), and initializeEvent().

◆ theGasGainCorrections

edm::ESHandle<CSCDBGasGainCorrection> CSCConditions::theGasGainCorrections
private

Definition at line 162 of file CSCConditions.h.

Referenced by gasGainCorrection(), and initializeEvent().

◆ theNoiseMatrix

edm::ESHandle<CSCDBNoiseMatrix> CSCConditions::theNoiseMatrix
private

Definition at line 156 of file CSCConditions.h.

Referenced by initializeEvent(), noiseMatrix(), and noiseMatrixElements().

◆ thePedestals

edm::ESHandle<CSCDBPedestals> CSCConditions::thePedestals
private

Definition at line 155 of file CSCConditions.h.

Referenced by initializeEvent(), pedestal(), and pedestalSigma().

◆ useGasGainCorrections_

bool CSCConditions::useGasGainCorrections_
private

Definition at line 191 of file CSCConditions.h.

Referenced by CSCConditions(), and useGasGainCorrections().

◆ useTimingCorrections_

bool CSCConditions::useTimingCorrections_
private

Definition at line 189 of file CSCConditions.h.

Referenced by CSCConditions(), and useTimingCorrections().