#include <CSCConditions.h>
Public Member Functions | |
float | anodeBXoffset (const CSCDetId &detId) const |
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 |
return 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 |
float | chipCorrection (const CSCDetId &detId, int channel) const |
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 |
float | crosstalkSlope (const CSCDetId &detId, int channel, bool leftRight) const |
CSCConditions (const edm::ParameterSet &ps) | |
void | fillBadStripWords () |
fill bad channel words More... | |
void | fillBadWireWords () |
float | gain (const CSCDetId &detId, int channel) const |
channels count from 1 More... | |
float | gainSigma (const CSCDetId &detId, int channel) const |
total 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 More... | |
void | initializeEvent (const edm::EventSetup &es) |
fetch the maps from the database 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 |
return 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 |
in ADC counts More... | |
float | pedestalSigma (const CSCDetId &detId, int channel) const |
void | print () 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_ |
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
Definition at line 35 of file CSCConditions.h.
|
private |
Enumerator | |
---|---|
MAX_LAYERS |
Definition at line 135 of file CSCConditions.h.
|
explicit |
Definition at line 22 of file CSCConditions.cc.
References badStripWords, badWireWords, edm::ParameterSet::getParameter(), MAX_LAYERS, readBadChambers_, readBadChannels_, useGasGainCorrections_, and useTimingCorrections_.
CSCConditions::~CSCConditions | ( | ) |
Definition at line 46 of file CSCConditions.cc.
float CSCConditions::anodeBXoffset | ( | const CSCDetId & | detId | ) | const |
Definition at line 310 of file CSCConditions.cc.
References edm::ESHandleBase::isValid(), 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 334 of file CSCConditions.cc.
References theAverageGain, and theGains.
Referenced by CSCRecoConditions::averageGain().
const std::bitset< 80 > & CSCConditions::badStripWord | ( | const CSCDetId & | id | ) | const |
return bad channel words per CSCLayer - 1 bit per channel
Definition at line 320 of file CSCConditions.cc.
References badStripWords, and CSCIndexer::layerIndex().
Referenced by CSCRecoConditions::badStrip().
const std::bitset< 112 > & CSCConditions::badWireWord | ( | const CSCDetId & | id | ) | const |
Definition at line 325 of file CSCConditions.cc.
References badWireWords, and CSCIndexer::layerIndex().
Referenced by CSCRecoConditions::badWireWord().
float CSCConditions::chamberTimingCorrection | ( | const CSCDetId & | detId | ) | const |
Definition at line 298 of file CSCConditions.cc.
References edm::ESHandleBase::isValid(), theChamberTimingCorrections, and useTimingCorrections().
Referenced by CSCRecoConditions::chamberTimingCorrection().
float CSCConditions::chipCorrection | ( | const CSCDetId & | detId, |
int | channel | ||
) | const |
Definition at line 286 of file CSCConditions.cc.
References CSCIndexer::chipIndex(), edm::ESHandleBase::isValid(), 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 277 of file CSCConditions.cc.
References edm::ESHandleBase::isValid(), and theCrosstalk.
Referenced by CSCRecoConditions::crossTalk().
float CSCConditions::crosstalkIntercept | ( | const CSCDetId & | detId, |
int | channel, | ||
bool | leftRight | ||
) | const |
Definition at line 233 of file CSCConditions.cc.
References edm::ESHandleBase::isValid(), and theCrosstalk.
Referenced by CSCDbStripConditions::crosstalk().
float CSCConditions::crosstalkSlope | ( | const CSCDetId & | detId, |
int | channel, | ||
bool | leftRight | ||
) | const |
Definition at line 244 of file CSCConditions.cc.
References edm::ESHandleBase::isValid(), and theCrosstalk.
Referenced by CSCDbStripConditions::crosstalk().
void CSCConditions::fillBadStripWords | ( | ) |
fill bad channel words
Definition at line 100 of file CSCConditions.cc.
References badStripWords, CSCIndexer::detIdFromChamberIndex(), Reference_intrackfit_cff::endcap, i, j, CSCIndexer::layerIndex(), MAX_LAYERS, readBadChannels(), relativeConstraints::ring, errorMatrix2Lands_multiChannel::start, relativeConstraints::station, and theBadStrips.
Referenced by initializeEvent().
void CSCConditions::fillBadWireWords | ( | ) |
Definition at line 134 of file CSCConditions.cc.
References badWireWords, CSCIndexer::detIdFromChamberIndex(), Reference_intrackfit_cff::endcap, i, j, CSCIndexer::layerIndex(), MAX_LAYERS, readBadChannels(), relativeConstraints::ring, errorMatrix2Lands_multiChannel::start, relativeConstraints::station, and theBadWires.
Referenced by initializeEvent().
float CSCConditions::gain | ( | const CSCDetId & | detId, |
int | channel | ||
) | const |
channels count from 1
Definition at line 212 of file CSCConditions.cc.
References edm::ESHandleBase::isValid(), and theGains.
Referenced by CSCDbStripConditions::gain(), CSCRecoConditions::gain(), and CSCRecoConditions::stripWeight().
|
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
Definition at line 371 of file CSCConditions.cc.
References edm::ESHandleBase::isValid(), theGasGainCorrections, and useGasGainCorrections().
Referenced by CSCRecoConditions::gasGainCorrection().
void CSCConditions::initializeEvent | ( | const edm::EventSetup & | es | ) |
fetch the maps from the database
Definition at line 50 of file CSCConditions.cc.
References edm::ESWatcher< T >::check(), fillBadStripWords(), fillBadWireWords(), gainsWatcher_, edm::EventSetup::get(), 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 162 of file CSCConditions.cc.
References readBadChambers(), and theBadChambers.
Referenced by CSCDbStripConditions::isInBadChamber().
const CSCDBNoiseMatrix::Item & CSCConditions::noiseMatrix | ( | const CSCDetId & | detId, |
int | channel | ||
) | const |
return raw noise matrix (unscaled short int elements)
Definition at line 254 of file CSCConditions.cc.
References edm::ESHandleBase::isValid(), 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 260 of file CSCConditions.cc.
References noiseMatrix(), and theNoiseMatrix.
Referenced by CSCDbStripConditions::fetchNoisifier(), and CSCRecoConditions::noiseMatrix().
float CSCConditions::pedestal | ( | const CSCDetId & | detId, |
int | channel | ||
) | const |
in ADC counts
Definition at line 219 of file CSCConditions.cc.
References edm::ESHandleBase::isValid(), and thePedestals.
Referenced by CSCDbStripConditions::pedestal(), and CSCRecoConditions::pedestal().
float CSCConditions::pedestalSigma | ( | const CSCDetId & | detId, |
int | channel | ||
) | const |
Definition at line 226 of file CSCConditions.cc.
References edm::ESHandleBase::isValid(), and thePedestals.
Referenced by CSCDbStripConditions::pedestalSigma(), and CSCRecoConditions::pedestalSigma().
void CSCConditions::print | ( | void | ) | const |
Definition at line 167 of file CSCConditions.cc.
|
inline |
did we request reading bad chamber info from db?
Definition at line 87 of file CSCConditions.h.
References readBadChambers_.
Referenced by initializeEvent(), and isInBadChamber().
|
inline |
did we request reading bad channel info from db?
Definition at line 84 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 103 of file CSCConditions.h.
References useGasGainCorrections_.
Referenced by gasGainCorrection(), and initializeEvent().
|
inline |
did we request reading timing correction info from db?
Definition at line 90 of file CSCConditions.h.
References useTimingCorrections_.
Referenced by anodeBXoffset(), chamberTimingCorrection(), chipCorrection(), and initializeEvent().
|
private |
Definition at line 124 of file CSCConditions.h.
Referenced by badStripWord(), CSCConditions(), and fillBadStripWords().
|
private |
Definition at line 125 of file CSCConditions.h.
Referenced by badWireWord(), CSCConditions(), and fillBadWireWords().
|
private |
Definition at line 129 of file CSCConditions.h.
Referenced by initializeEvent().
|
private |
Definition at line 119 of file CSCConditions.h.
Referenced by CSCConditions(), and readBadChambers().
|
private |
Definition at line 118 of file CSCConditions.h.
Referenced by CSCConditions(), and readBadChannels().
|
mutableprivate |
Definition at line 127 of file CSCConditions.h.
Referenced by averageGain(), and initializeEvent().
|
private |
Definition at line 113 of file CSCConditions.h.
Referenced by initializeEvent(), and isInBadChamber().
|
private |
Definition at line 111 of file CSCConditions.h.
Referenced by fillBadStripWords(), and initializeEvent().
|
private |
Definition at line 112 of file CSCConditions.h.
Referenced by fillBadWireWords(), and initializeEvent().
|
private |
Definition at line 115 of file CSCConditions.h.
Referenced by anodeBXoffset(), chamberTimingCorrection(), and initializeEvent().
|
private |
Definition at line 114 of file CSCConditions.h.
Referenced by chipCorrection(), and initializeEvent().
|
private |
Definition at line 108 of file CSCConditions.h.
Referenced by crossTalk(), crosstalkIntercept(), crosstalkSlope(), and initializeEvent().
|
private |
Definition at line 107 of file CSCConditions.h.
Referenced by averageGain(), gain(), and initializeEvent().
|
private |
Definition at line 116 of file CSCConditions.h.
Referenced by gasGainCorrection(), and initializeEvent().
|
private |
Definition at line 110 of file CSCConditions.h.
Referenced by initializeEvent(), noiseMatrix(), and noiseMatrixElements().
|
private |
Definition at line 109 of file CSCConditions.h.
Referenced by initializeEvent(), pedestal(), and pedestalSigma().
|
private |
Definition at line 121 of file CSCConditions.h.
Referenced by CSCConditions(), and useGasGainCorrections().
|
private |
Definition at line 120 of file CSCConditions.h.
Referenced by CSCConditions(), and useTimingCorrections().