38 : theGains(), theCrosstalk(), thePedestals(), theNoiseMatrix(),
39 theBadStrips(), theBadWires(), theBadChambers(),
40 theChipCorrections(), theChamberTimingCorrections(), theGasGainCorrections(),
41 indexer_(0), mapper_(0),
42 readBadChannels_(
false), readBadChambers_(
false),
43 useTimingCorrections_(
false), useGasGainCorrections_(
false),
44 idOfBadChannelWords_(
CSCDetId()), badStripWord_(0), badWireWord_(0), theAverageGain( -1.0 )
140 int inputIndex =
indexer_->chamberIndex(
id );
141 short inputLayer =
id.layer();
152 if (indexc != inputIndex )
continue;
157 for (
int j=start-1;
j<start-1+nbad; ++
j ) {
159 if ( lay != inputLayer )
continue;
177 int inputIndex =
indexer_->chamberIndex(
id );
178 short inputLayer =
id.layer();
185 if (indexc != inputIndex )
continue;
190 for (
int j=start-1;
j<start-1+nbad; ++
j ) {
192 if ( lay != inputLayer )
continue;
220 int iraw =
mapper_->rawStripChannel(
id, geomChannel );
229 int iraw =
mapper_->rawStripChannel(
id, geomChannel );
239 int iraw =
mapper_->rawStripChannel(
id, geomChannel );
249 int iraw =
mapper_->rawStripChannel(
id, geomChannel );
261 int iraw =
mapper_->rawStripChannel(
id, geomChannel );
275 int iraw =
mapper_->rawStripChannel(
id, geomChannel );
281 assert(me.size() > 11 );
300 int iraw =
mapper_->rawStripChannel(
id, geomChannel );
314 int iraw =
mapper_->rawStripChannel(
id, geomChannel);
315 int ichip =
indexer_->chipIndex(iraw);
355 const float loEdge = 5.0;
356 const float hiEdge = 10.0;
357 const float loLimit = 6.0;
358 const float hiLimit = 9.0;
359 const float expectedAverage = 7.5;
366 CSCDBGains::GainContainer::const_iterator it;
368 float the_gain = float( it->gain_slope )/
theGains->scale();
369 if (the_gain > loEdge && the_gain < hiEdge ) {
370 gain_tot += the_gain;
381 if ( theAverageGain < loLimit || theAverageGain > hiLimit ) {
395 int iraw =
mapper_->rawStripChannel(
id, geomChannel );
396 int index =
indexer_->gasGainIndex(idraw, iraw, iwiregroup) - 1;
404 {
return mapper_->channelFromStrip(
id, geomStrip); }
407 {
return mapper_->rawStripChannel(
id, geomChannel); }
T getParameter(std::string const &) const
edm::ESHandle< CSCDBGasGainCorrection > theGasGainCorrections
tuple start
Check for commandline option errors.
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
fill vector (dim 12, must be allocated by caller) with noise matrix elements (scaled to float) ...
void fillBadChannelWords(const CSCDetId &id)
Fill bad channel words - one for strips, one for wires, for an offline CSCDetId.
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
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
fill vector (dim 4, must be allocated by caller) with crosstalk sl, il, sr, ir
edm::ESWatcher< CSCDBGainsRcd > gainsWatcher_
float anodeBXoffset(const CSCDetId &detId) const
anode bx offset in bx given detId of chamber
void fillBadWireWord(const CSCDetId &id)
bool useTimingCorrections_
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::ESHandle< CSCBadChambers > theBadChambers
int channelFromStrip(const CSCDetId &id, int geomStrip) const
feedthrough for external access
edm::ESHandle< CSCDBGains > theGains
void initializeEvent(const edm::EventSetup &es)
fetch database content via EventSetup
void fillBadStripWord(const CSCDetId &id)
fill bad channel words for offline id
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
CSCConditions(const edm::ParameterSet &ps)
edm::ESHandle< CSCDBChipSpeedCorrection > theChipCorrections
edm::ESHandle< CSCDBCrosstalk > theCrosstalk
bool readBadChambers() const
did we request reading bad chamber info from db?
bool check(const edm::EventSetup &iSetup)
void setIdOfBadChannelWords(const CSCDetId &id)
Set id for current content of bad channel words - this is offline id i.e. separate for ME11A & ME11B...
const CSCDetId & idOfBadChannelWords() const
the offline CSCDetId of current bad channel words
float gasGainCorrection(const CSCDetId &detId, int strip, int wire) const
gas gain correction as a function of detId (w/layer), strip, and wire channels
float averageGain() const
average gain over entire CSC system (logically const although must be cached here).
bool useGasGainCorrections() const
did we request reading gas gain correction info from db?
volatile std::atomic< bool > shutdown_flag false
edm::ESHandle< CSCDBPedestals > thePedestals
std::bitset< 112 > badStripWord_