#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 CSCDetId & | idOfBadChannelWords () 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::Item & | noiseMatrix (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) |
Encapsulates a user interface into the CSC conditions
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.
|
private |
Enumerator | |
---|---|
MAX_LAYERS |
Definition at line 208 of file CSCConditions.h.
|
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_.
CSCConditions::~CSCConditions | ( | ) |
Definition at line 72 of file CSCConditions.cc.
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(), ALCARECOEcalPhiSym_cff::float, indexer_, edm::ESHandleBase::isValid(), CSCChamberTimeCorrections::item(), mapper_, CSCChamberTimeCorrections::precision(), CSCChannelMapperBase::rawCSCDetId(), theChamberTimingCorrections, and useTimingCorrections().
Referenced by CSCRecoConditions::anodeBXoffset().
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 ALCARECOEcalPhiSym_cff::float, CSCDBGains::gains, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, CSCDBGains::scale(), theAverageGain, and theGains.
Referenced by CSCRecoConditions::averageGain().
|
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().
|
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().
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(), ALCARECOEcalPhiSym_cff::float, indexer_, edm::ESHandleBase::isValid(), CSCChamberTimeCorrections::item(), mapper_, CSCChamberTimeCorrections::precision(), CSCChannelMapperBase::rawCSCDetId(), theChamberTimingCorrections, and useTimingCorrections().
Referenced by CSCRecoConditions::chamberTimingCorrection().
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().
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(), ALCARECOEcalPhiSym_cff::float, indexer_, edm::ESHandleBase::isValid(), mapper_, CSCChannelMapperBase::rawCSCDetId(), CSCChannelMapperBase::rawStripChannel(), CSCDBChipSpeedCorrection::scale(), theChipCorrections, useTimingCorrections(), and CSCDBChipSpeedCorrection::value().
Referenced by CSCRecoConditions::chipCorrection().
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(), hgcalPlots::ct, ALCARECOEcalPhiSym_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().
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(), ALCARECOEcalPhiSym_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().
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(), ALCARECOEcalPhiSym_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().
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().
|
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().
|
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().
float CSCConditions::gain | ( | const CSCDetId & | detId, |
int | channel | ||
) | const |
gain per channel
Definition at line 237 of file CSCConditions.cc.
References cms::cuda::assert(), ALCARECOEcalPhiSym_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().
|
inline |
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(), ALCARECOEcalPhiSym_cff::float, CSCIndexerBase::gasGainIndex(), indexer_, edm::ESHandleBase::isValid(), mapper_, CSCChannelMapperBase::rawCSCDetId(), CSCChannelMapperBase::rawStripChannel(), theGasGainCorrections, useGasGainCorrections(), and CSCDBGasGainCorrection::value().
Referenced by CSCRecoConditions::gasGainCorrection().
|
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().
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().
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().
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().
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(), ALCARECOEcalPhiSym_cff::float, B2GTnPMonitor_cfi::item, hlt_dqm_clientPB-live_cfg::me, noiseMatrix(), CSCDBNoiseMatrix::scale(), and theNoiseMatrix.
Referenced by CSCDbStripConditions::fetchNoisifier(), and CSCRecoConditions::noiseMatrix().
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(), ALCARECOEcalPhiSym_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().
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(), ALCARECOEcalPhiSym_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().
void CSCConditions::print | ( | void | ) | const |
Definition at line 418 of file CSCConditions.cc.
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().
|
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().
|
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().
|
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 EcalPhiSymFlatTableProducers_cfi::id, and idOfBadChannelWords_.
Referenced by fillBadChannelWords().
|
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().
|
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().
|
private |
Definition at line 176 of file CSCConditions.h.
Referenced by CSCConditions(), and initializeEvent().
|
private |
Definition at line 174 of file CSCConditions.h.
Referenced by CSCConditions(), and initializeEvent().
|
private |
Definition at line 196 of file CSCConditions.h.
Referenced by badStripWord(), fillBadChannelWords(), and fillBadStripWord().
|
private |
Definition at line 175 of file CSCConditions.h.
Referenced by CSCConditions(), and initializeEvent().
|
private |
Definition at line 197 of file CSCConditions.h.
Referenced by badWireWord(), fillBadChannelWords(), and fillBadWireWord().
|
private |
Definition at line 178 of file CSCConditions.h.
Referenced by CSCConditions(), and initializeEvent().
|
private |
Definition at line 177 of file CSCConditions.h.
Referenced by CSCConditions(), and initializeEvent().
|
private |
Definition at line 171 of file CSCConditions.h.
Referenced by CSCConditions(), and initializeEvent().
|
private |
Definition at line 170 of file CSCConditions.h.
Referenced by CSCConditions(), and initializeEvent().
|
private |
Definition at line 202 of file CSCConditions.h.
Referenced by initializeEvent().
|
private |
Definition at line 179 of file CSCConditions.h.
Referenced by CSCConditions(), and initializeEvent().
|
private |
Definition at line 195 of file CSCConditions.h.
Referenced by idOfBadChannelWords(), and setIdOfBadChannelWords().
|
private |
Definition at line 166 of file CSCConditions.h.
Referenced by anodeBXoffset(), chamberTimingCorrection(), chipCorrection(), crossTalk(), crosstalkIntercept(), crosstalkSlope(), fillBadStripWord(), fillBadWireWord(), gain(), gasGainCorrection(), initializeEvent(), isInBadChamber(), noiseMatrix(), pedestal(), and pedestalSigma().
|
private |
Definition at line 180 of file CSCConditions.h.
Referenced by CSCConditions(), and initializeEvent().
|
private |
Definition at line 167 of file CSCConditions.h.
Referenced by anodeBXoffset(), chamberTimingCorrection(), channelFromStrip(), chipCorrection(), crossTalk(), crosstalkIntercept(), crosstalkSlope(), fillBadChannelWords(), gain(), gasGainCorrection(), initializeEvent(), isInBadChamber(), noiseMatrix(), pedestal(), pedestalSigma(), and rawStripChannel().
|
private |
Definition at line 181 of file CSCConditions.h.
Referenced by CSCConditions(), and initializeEvent().
|
private |
Definition at line 173 of file CSCConditions.h.
Referenced by CSCConditions(), and initializeEvent().
|
private |
Definition at line 172 of file CSCConditions.h.
Referenced by CSCConditions(), and initializeEvent().
|
private |
Definition at line 187 of file CSCConditions.h.
Referenced by CSCConditions(), and readBadChambers().
|
private |
Definition at line 185 of file CSCConditions.h.
Referenced by CSCConditions(), and readBadChannels().
|
mutableprivate |
Definition at line 199 of file CSCConditions.h.
Referenced by averageGain(), and initializeEvent().
|
private |
Definition at line 159 of file CSCConditions.h.
Referenced by initializeEvent(), and isInBadChamber().
|
private |
Definition at line 157 of file CSCConditions.h.
Referenced by fillBadStripWord(), and initializeEvent().
|
private |
Definition at line 158 of file CSCConditions.h.
Referenced by fillBadWireWord(), and initializeEvent().
|
private |
Definition at line 161 of file CSCConditions.h.
Referenced by anodeBXoffset(), chamberTimingCorrection(), and initializeEvent().
|
private |
Definition at line 160 of file CSCConditions.h.
Referenced by chipCorrection(), and initializeEvent().
|
private |
Definition at line 154 of file CSCConditions.h.
Referenced by crossTalk(), crosstalkIntercept(), crosstalkSlope(), and initializeEvent().
|
private |
Definition at line 153 of file CSCConditions.h.
Referenced by averageGain(), gain(), and initializeEvent().
|
private |
Definition at line 162 of file CSCConditions.h.
Referenced by gasGainCorrection(), and initializeEvent().
|
private |
Definition at line 156 of file CSCConditions.h.
Referenced by initializeEvent(), noiseMatrix(), and noiseMatrixElements().
|
private |
Definition at line 155 of file CSCConditions.h.
Referenced by initializeEvent(), pedestal(), and pedestalSigma().
|
private |
Definition at line 191 of file CSCConditions.h.
Referenced by CSCConditions(), and useGasGainCorrections().
|
private |
Definition at line 189 of file CSCConditions.h.
Referenced by CSCConditions(), and useTimingCorrections().