#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 |
average gain over entire CSC system (logically const although must be cached here). More... | |
const std::bitset< 80 > & | badStripWord (const CSCDetId &id) const |
bad channel words per CSCLayer - 1 bit per channel More... | |
const std::bitset< 112 > & | badWireWord (const CSCDetId &id) const |
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 |
fill vector (dim 4, must be allocated by caller) with crosstalk sl, il, sr, ir More... | |
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) | |
void | fillBadStripWords () |
fill bad channel words More... | |
void | fillBadWireWords () |
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 |
gas gain correction as a function of detId (w/layer), strip, and wire channels 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 |
fill vector (dim 12, must be allocated by caller) with noise matrix elements (scaled to float) More... | |
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 Attributes | |
std::vector< std::bitset< 80 > > | badStripWords |
std::vector< std::bitset< 112 > > | badWireWords |
edm::ESWatcher< CSCDBGainsRcd > | gainsWatcher_ |
edm::ESHandle< CSCIndexerBase > | indexer_ |
edm::ESHandle < CSCChannelMapperBase > | mapper_ |
bool | readBadChambers_ |
bool | readBadChannels_ |
float | theAverageGain |
edm::ESHandle< CSCBadChambers > | theBadChambers |
edm::ESHandle< CSCBadStrips > | theBadStrips |
edm::ESHandle< CSCBadWires > | theBadWires |
edm::ESHandle < CSCChamberTimeCorrections > | theChamberTimingCorrections |
edm::ESHandle < CSCDBChipSpeedCorrection > | theChipCorrections |
edm::ESHandle< CSCDBCrosstalk > | theCrosstalk |
edm::ESHandle< CSCDBGains > | theGains |
edm::ESHandle < CSCDBGasGainCorrection > | theGasGainCorrections |
edm::ESHandle< CSCDBNoiseMatrix > | theNoiseMatrix |
edm::ESHandle< CSCDBPedestals > | thePedestals |
bool | useGasGainCorrections_ |
bool | useTimingCorrections_ |
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 46 of file CSCConditions.h.
|
private |
Enumerator | |
---|---|
MAX_LAYERS |
Definition at line 162 of file CSCConditions.h.
|
explicit |
Definition at line 36 of file CSCConditions.cc.
References badStripWords, badWireWords, edm::ParameterSet::getParameter(), MAX_LAYERS, readBadChambers_, readBadChannels_, useGasGainCorrections_, and useTimingCorrections_.
CSCConditions::~CSCConditions | ( | ) |
Definition at line 55 of file CSCConditions.cc.
float CSCConditions::anodeBXoffset | ( | const CSCDetId & | detId | ) | const |
anode bx offset in bx given detId of chamber
Definition at line 304 of file CSCConditions.cc.
References getHLTprescales::index, indexer_, edm::ESHandleBase::isValid(), mapper_, 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 335 of file CSCConditions.cc.
References theAverageGain, and theGains.
Referenced by CSCRecoConditions::averageGain().
const std::bitset< 80 > & CSCConditions::badStripWord | ( | const CSCDetId & | id | ) | const |
bad channel words per CSCLayer - 1 bit per channel
Definition at line 316 of file CSCConditions.cc.
References badStripWords, indexer_, and mapper_.
Referenced by CSCRecoConditions::badStrip().
const std::bitset< 112 > & CSCConditions::badWireWord | ( | const CSCDetId & | id | ) | const |
Definition at line 323 of file CSCConditions.cc.
References badWireWords, indexer_, and mapper_.
Referenced by CSCRecoConditions::badWireWord().
float CSCConditions::chamberTimingCorrection | ( | const CSCDetId & | detId | ) | const |
chamber timing correction in ns given detId of chamber
Definition at line 289 of file CSCConditions.cc.
References getHLTprescales::index, indexer_, edm::ESHandleBase::isValid(), mapper_, theChamberTimingCorrections, and useTimingCorrections().
Referenced by CSCRecoConditions::chamberTimingCorrection().
int CSCConditions::channelFromStrip | ( | const CSCDetId & | id, |
int | geomStrip | ||
) | const |
feedthrough for external access
Definition at line 385 of file CSCConditions.cc.
References 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 276 of file CSCConditions.cc.
References getHLTprescales::index, indexer_, edm::ESHandleBase::isValid(), mapper_, theChipCorrections, and useTimingCorrections().
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 264 of file CSCConditions.cc.
References getHLTprescales::index, indexer_, edm::ESHandleBase::isValid(), mapper_, 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 212 of file CSCConditions.cc.
References getHLTprescales::index, indexer_, edm::ESHandleBase::isValid(), mapper_, 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 224 of file CSCConditions.cc.
References getHLTprescales::index, indexer_, edm::ESHandleBase::isValid(), mapper_, and theCrosstalk.
Referenced by CSCDbStripConditions::crosstalk().
void CSCConditions::fillBadStripWords | ( | ) |
fill bad channel words
Definition at line 111 of file CSCConditions.cc.
References badStripWords, Reference_intrackfit_cff::endcap, i, indexer_, j, MAX_LAYERS, readBadChannels(), relativeConstraints::ring, dqm_diff::start, relativeConstraints::station, and theBadStrips.
Referenced by initializeEvent().
void CSCConditions::fillBadWireWords | ( | ) |
Definition at line 145 of file CSCConditions.cc.
References badWireWords, Reference_intrackfit_cff::endcap, i, indexer_, j, MAX_LAYERS, readBadChannels(), relativeConstraints::ring, dqm_diff::start, relativeConstraints::station, and theBadWires.
Referenced by initializeEvent().
float CSCConditions::gain | ( | const CSCDetId & | detId, |
int | channel | ||
) | const |
gain per channel
Definition at line 183 of file CSCConditions.cc.
References getHLTprescales::index, indexer_, edm::ESHandleBase::isValid(), mapper_, 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 372 of file CSCConditions.cc.
References getHLTprescales::index, indexer_, edm::ESHandleBase::isValid(), mapper_, theGasGainCorrections, and useGasGainCorrections().
Referenced by CSCRecoConditions::gasGainCorrection().
void CSCConditions::initializeEvent | ( | const edm::EventSetup & | es | ) |
fetch database content via EventSetup
Definition at line 57 of file CSCConditions.cc.
References edm::ESWatcher< T >::check(), fillBadStripWords(), fillBadWireWords(), gainsWatcher_, edm::EventSetup::get(), indexer_, mapper_, 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 172 of file CSCConditions.cc.
References getHLTprescales::index, indexer_, mapper_, 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 235 of file CSCConditions.cc.
References getHLTprescales::index, indexer_, edm::ESHandleBase::isValid(), mapper_, 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 247 of file CSCConditions.cc.
References noiseMatrix(), 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 192 of file CSCConditions.cc.
References getHLTprescales::index, indexer_, edm::ESHandleBase::isValid(), mapper_, 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 202 of file CSCConditions.cc.
References getHLTprescales::index, indexer_, edm::ESHandleBase::isValid(), mapper_, and thePedestals.
Referenced by CSCDbStripConditions::pedestalSigma(), and CSCRecoConditions::pedestalSigma().
void CSCConditions::print | ( | void | ) | const |
Definition at line 392 of file CSCConditions.cc.
int CSCConditions::rawStripChannel | ( | const CSCDetId & | id, |
int | geomChannel | ||
) | const |
Definition at line 388 of file CSCConditions.cc.
References mapper_.
Referenced by CSCRecoConditions::badStrip().
|
inline |
did we request reading bad chamber info from db?
Definition at line 101 of file CSCConditions.h.
References readBadChambers_.
Referenced by initializeEvent(), and isInBadChamber().
|
inline |
did we request reading bad channel info from db?
Definition at line 98 of file CSCConditions.h.
References readBadChannels_.
Referenced by fillBadStripWords(), fillBadWireWords(), and initializeEvent().
|
inline |
did we request reading gas gain correction info from db?
Definition at line 117 of file CSCConditions.h.
References useGasGainCorrections_.
Referenced by gasGainCorrection(), and initializeEvent().
|
inline |
did we request reading timing correction info from db?
Definition at line 104 of file CSCConditions.h.
References useTimingCorrections_.
Referenced by anodeBXoffset(), chamberTimingCorrection(), chipCorrection(), and initializeEvent().
|
private |
Definition at line 151 of file CSCConditions.h.
Referenced by badStripWord(), CSCConditions(), and fillBadStripWords().
|
private |
Definition at line 152 of file CSCConditions.h.
Referenced by badWireWord(), CSCConditions(), and fillBadWireWords().
|
private |
Definition at line 156 of file CSCConditions.h.
Referenced by initializeEvent().
|
private |
Definition at line 140 of file CSCConditions.h.
Referenced by anodeBXoffset(), badStripWord(), badWireWord(), chamberTimingCorrection(), chipCorrection(), crossTalk(), crosstalkIntercept(), crosstalkSlope(), fillBadStripWords(), fillBadWireWords(), gain(), gasGainCorrection(), initializeEvent(), isInBadChamber(), noiseMatrix(), pedestal(), and pedestalSigma().
|
private |
Definition at line 141 of file CSCConditions.h.
Referenced by anodeBXoffset(), badStripWord(), badWireWord(), chamberTimingCorrection(), channelFromStrip(), chipCorrection(), crossTalk(), crosstalkIntercept(), crosstalkSlope(), gain(), gasGainCorrection(), initializeEvent(), isInBadChamber(), noiseMatrix(), pedestal(), pedestalSigma(), and rawStripChannel().
|
private |
Definition at line 146 of file CSCConditions.h.
Referenced by CSCConditions(), and readBadChambers().
|
private |
Definition at line 145 of file CSCConditions.h.
Referenced by CSCConditions(), and readBadChannels().
|
mutableprivate |
Definition at line 154 of file CSCConditions.h.
Referenced by averageGain(), and initializeEvent().
|
private |
Definition at line 133 of file CSCConditions.h.
Referenced by initializeEvent(), and isInBadChamber().
|
private |
Definition at line 131 of file CSCConditions.h.
Referenced by fillBadStripWords(), and initializeEvent().
|
private |
Definition at line 132 of file CSCConditions.h.
Referenced by fillBadWireWords(), and initializeEvent().
|
private |
Definition at line 135 of file CSCConditions.h.
Referenced by anodeBXoffset(), chamberTimingCorrection(), and initializeEvent().
|
private |
Definition at line 134 of file CSCConditions.h.
Referenced by chipCorrection(), and initializeEvent().
|
private |
Definition at line 128 of file CSCConditions.h.
Referenced by crossTalk(), crosstalkIntercept(), crosstalkSlope(), and initializeEvent().
|
private |
Definition at line 127 of file CSCConditions.h.
Referenced by averageGain(), gain(), and initializeEvent().
|
private |
Definition at line 136 of file CSCConditions.h.
Referenced by gasGainCorrection(), and initializeEvent().
|
private |
Definition at line 130 of file CSCConditions.h.
Referenced by initializeEvent(), noiseMatrix(), and noiseMatrixElements().
|
private |
Definition at line 129 of file CSCConditions.h.
Referenced by initializeEvent(), pedestal(), and pedestalSigma().
|
private |
Definition at line 148 of file CSCConditions.h.
Referenced by CSCConditions(), and useGasGainCorrections().
|
private |
Definition at line 147 of file CSCConditions.h.
Referenced by CSCConditions(), and useTimingCorrections().