34 theChamberTimingCorrections(),
35 theGasGainCorrections(),
38 readBadChannels_(
false),
39 readBadChambers_(
false),
40 useTimingCorrections_(
false),
41 useGasGainCorrections_(
false),
45 theAverageGain(-1.0) {
155 int inputIndex =
indexer_->chamberIndex(
id);
156 short inputLayer =
id.layer();
168 if (indexc != inputIndex)
174 for (
int j = start - 1;
j < start - 1 + nbad; ++
j) {
176 if (lay != inputLayer)
194 int inputIndex =
indexer_->chamberIndex(
id);
195 short inputLayer =
id.layer();
202 if (indexc != inputIndex)
208 for (
int j = start - 1;
j < start - 1 + nbad; ++
j) {
210 if (lay != inputLayer)
240 int iraw =
mapper_->rawStripChannel(
id, geomChannel);
248 int iraw =
mapper_->rawStripChannel(
id, geomChannel);
256 int iraw =
mapper_->rawStripChannel(
id, geomChannel);
264 int iraw =
mapper_->rawStripChannel(
id, geomChannel);
274 int iraw =
mapper_->rawStripChannel(
id, geomChannel);
288 int iraw =
mapper_->rawStripChannel(
id, geomChannel);
313 int iraw =
mapper_->rawStripChannel(
id, geomChannel);
326 int iraw =
mapper_->rawStripChannel(
id, geomChannel);
327 int ichip =
indexer_->chipIndex(iraw);
361 const float loEdge = 5.0;
362 const float hiEdge = 10.0;
363 const float loLimit = 6.0;
364 const float hiLimit = 9.0;
365 const float expectedAverage = 7.5;
373 CSCDBGains::GainContainer::const_iterator it;
375 float the_gain = float(it->gain_slope) /
theGains->scale();
376 if (the_gain > loEdge && the_gain < hiEdge) {
377 gain_tot += the_gain;
388 if (theAverageGain < loLimit || theAverageGain > hiLimit) {
402 int iraw =
mapper_->rawStripChannel(
id, geomChannel);
403 int index =
indexer_->gasGainIndex(idraw, iraw, iwiregroup) - 1;
411 return mapper_->channelFromStrip(
id, geomStrip);
415 return mapper_->rawStripChannel(
id, geomChannel);
edm::ESGetToken< CSCDBNoiseMatrix, CSCDBNoiseMatrixRcd > noiseMatrixToken_
edm::ESHandle< CSCDBGasGainCorrection > theGasGainCorrections
edm::ESGetToken< CSCIndexerBase, CSCIndexerRecord > indexerToken_
edm::ESHandle< CSCDBNoiseMatrix > theNoiseMatrix
edm::ESHandle< CSCBadWires > theBadWires
float pedestalSigma(const CSCDetId &detId, int channel) const
static ped rms in ADC counts
void noiseMatrixElements(const CSCDetId &id, int channel, std::vector< float > &me) const
tuple chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi...
edm::ESGetToken< CSCDBGains, CSCDBGainsRcd > gainsToken_
void fillBadChannelWords(const CSCDetId &id)
CSCConditions(const edm::ParameterSet &ps, edm::ConsumesCollector)
edm::ESGetToken< CSCDBCrosstalk, CSCDBCrosstalkRcd > crosstalkToken_
edm::ESHandle< CSCChamberTimeCorrections > theChamberTimingCorrections
bool useTimingCorrections() const
did we request reading timing correction info from db?
const CSCDBNoiseMatrix::Item & noiseMatrix(const CSCDetId &detId, int channel) const
raw noise matrix (unscaled short int elements)
edm::ESHandle< CSCBadStrips > theBadStrips
edm::ESGetToken< CSCBadStrips, CSCBadStripsRcd > badStripsToken_
float chipCorrection(const CSCDetId &detId, int channel) const
chip speed correction in ns given detId (w/layer) and strip channel
float chamberTimingCorrection(const CSCDetId &detId) const
chamber timing correction in ns given detId of chamber
edm::ESHandle< CSCIndexerBase > indexer_
void crossTalk(const CSCDetId &id, int channel, std::vector< float > &ct) const
edm::ESWatcher< CSCDBGainsRcd > gainsWatcher_
edm::ESGetToken< CSCChamberTimeCorrections, CSCChamberTimeCorrectionsRcd > chamberTimingCorrectionsToken_
float anodeBXoffset(const CSCDetId &detId) const
anode bx offset in bx given detId of chamber
void fillBadWireWord(const CSCDetId &id)
bool useTimingCorrections_
edm::ESGetToken< CSCDBPedestals, CSCDBPedestalsRcd > pedestalsToken_
std::bitset< 112 > badWireWord_
float pedestal(const CSCDetId &detId, int channel) const
static ped in ADC counts
edm::ESHandle< CSCChannelMapperBase > mapper_
bool readBadChannels() const
did we request reading bad channel info from db?
bool useGasGainCorrections_
int rawStripChannel(const CSCDetId &id, int geomChannel) const
edm::ESGetToken< CSCBadWires, CSCBadWiresRcd > badWiresToken_
edm::ESHandle< CSCBadChambers > theBadChambers
int channelFromStrip(const CSCDetId &id, int geomStrip) const
feedthrough for external access
edm::ESHandle< CSCDBGains > theGains
edm::ESGetToken< CSCDBGasGainCorrection, CSCDBGasGainCorrectionRcd > gasGainCorrectionsToken_
edm::ESGetToken< CSCDBChipSpeedCorrection, CSCDBChipSpeedCorrectionRcd > chipCorrectionsToken_
void initializeEvent(const edm::EventSetup &es)
fetch database content via EventSetup
void fillBadStripWord(const CSCDetId &id)
fill bad channel words for offline id
edm::ESGetToken< CSCBadChambers, CSCBadChambersRcd > badChambersToken_
float crosstalkSlope(const CSCDetId &detId, int channel, bool leftRight) const
crosstalk slope for left and right
float crosstalkIntercept(const CSCDetId &detId, int channel, bool leftRight) const
crosstalk intercept for left and right
bool isInBadChamber(const CSCDetId &id) const
Is the gven chamber flagged as bad?
float gain(const CSCDetId &detId, int channel) const
gain per channel
edm::ESHandle< CSCDBChipSpeedCorrection > theChipCorrections
edm::ESHandle< CSCDBCrosstalk > theCrosstalk
bool readBadChambers() const
did we request reading bad chamber info from db?
T getParameter(std::string const &) const
bool check(const edm::EventSetup &iSetup)
void setIdOfBadChannelWords(const CSCDetId &id)
const CSCDetId & idOfBadChannelWords() const
the offline CSCDetId of current bad channel words
float gasGainCorrection(const CSCDetId &detId, int strip, int wire) const
float averageGain() const
bool useGasGainCorrections() const
did we request reading gas gain correction info from db?
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
edm::ESHandle< CSCDBPedestals > thePedestals
std::bitset< 112 > badStripWord_
edm::ESGetToken< CSCChannelMapperBase, CSCChannelMapperRecord > mapperToken_