![]() |
![]() |
#include <CSCConditions.h>
Public Member Functions | |
float | anodeBXoffset (const CSCDetId &detId) const |
anode bx offset in bx given detId of chamber | |
float | averageGain () const |
average gain over entire CSC system (logically const although must be cached here). | |
const std::bitset< 80 > & | badStripWord (const CSCDetId &id) const |
bad channel words per CSCLayer - 1 bit per channel | |
const std::bitset< 112 > & | badWireWord (const CSCDetId &id) const |
float | chamberTimingCorrection (const CSCDetId &detId) const |
chamber timing correction in ns given detId of chamber | |
int | channelFromStrip (const CSCDetId &id, int geomStrip) const |
feedthrough for external access | |
float | chipCorrection (const CSCDetId &detId, int channel) const |
chip speed correction in ns given detId (w/layer) and strip channel | |
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 | |
float | crosstalkIntercept (const CSCDetId &detId, int channel, bool leftRight) const |
crosstalk intercept for left and right | |
float | crosstalkSlope (const CSCDetId &detId, int channel, bool leftRight) const |
crosstalk slope for left and right | |
CSCConditions (const edm::ParameterSet &ps) | |
void | fillBadStripWords () |
fill bad channel words | |
void | fillBadWireWords () |
float | gain (const CSCDetId &detId, int channel) const |
gain per channel | |
float | gainSigma (const CSCDetId &detId, int channel) const |
overall calibration precision | |
float | gasGainCorrection (const CSCDetId &detId, int strip, int wire) const |
gas gain correction as a function of detId (w/layer), strip, and wire channels | |
void | initializeEvent (const edm::EventSetup &es) |
fetch database content via EventSetup | |
bool | isInBadChamber (const CSCDetId &id) const |
Is the gven chamber flagged as bad? | |
const CSCDBNoiseMatrix::Item & | noiseMatrix (const CSCDetId &detId, int channel) const |
raw noise matrix (unscaled short int elements) | |
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) | |
float | pedestal (const CSCDetId &detId, int channel) const |
static ped in ADC counts | |
float | pedestalSigma (const CSCDetId &detId, int channel) const |
static ped rms in ADC counts | |
void | print () const |
int | rawStripChannel (const CSCDetId &id, int geomChannel) const |
bool | readBadChambers () const |
did we request reading bad chamber info from db? | |
bool | readBadChannels () const |
did we request reading bad channel info from db? | |
bool | useGasGainCorrections () const |
did we request reading gas gain correction info from db? | |
bool | useTimingCorrections () const |
did we request reading timing correction info from db? | |
~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.
enum CSCConditions::elayers [private] |
CSCConditions::CSCConditions | ( | const edm::ParameterSet & | ps | ) | [explicit] |
Definition at line 36 of file CSCConditions.cc.
References badStripWords, badWireWords, edm::ParameterSet::getParameter(), MAX_LAYERS, readBadChambers_, readBadChannels_, useGasGainCorrections_, and useTimingCorrections_.
: theGains(), theCrosstalk(), thePedestals(), theNoiseMatrix(), theBadStrips(), theBadWires(), theBadChambers(), theChipCorrections(), theChamberTimingCorrections(), theGasGainCorrections(), indexer_(0), mapper_(0), readBadChannels_(false), readBadChambers_(false), useTimingCorrections_(false), useGasGainCorrections_(false), theAverageGain( -1.0 ) { readBadChannels_ = ps.getParameter<bool>("readBadChannels"); readBadChambers_ = ps.getParameter<bool>("readBadChambers"); useTimingCorrections_ = ps.getParameter<bool>("CSCUseTimingCorrections"); useGasGainCorrections_ = ps.getParameter<bool>("CSCUseGasGainCorrections"); // set size to hold all layers, using enum defined in .h badStripWords.resize( MAX_LAYERS, 0 ); badWireWords.resize( MAX_LAYERS, 0 ); }
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().
{ if ( useTimingCorrections() ){ assert(theChamberTimingCorrections.isValid()); CSCDetId idraw = mapper_->rawCSCDetId( id ); int index = indexer_->chamberIndex(idraw) - 1; // NOTE THE MINUS ONE! return float ( theChamberTimingCorrections->item(index).anode_bx_offset*1./theChamberTimingCorrections->precision() ); } else return 0; }
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 float loEdge = 5.0; // consider gains above this const float hiEdge = 10.0; // consider gains below this const float loLimit = 6.0; // lowest acceptable average gain const float hiLimit = 9.0; // highest acceptable average gain const float expectedAverage = 7.5; // default average gain if ( theAverageGain > 0. ) return theAverageGain; // only recalculate if necessary int n_strip = 0; float gain_tot = 0.; CSCDBGains::GainContainer::const_iterator it; for ( it=theGains->gains.begin(); it!=theGains->gains.end(); ++it ) { float the_gain = float( it->gain_slope )/theGains->scale(); if (the_gain > loEdge && the_gain < hiEdge ) { gain_tot += the_gain; ++n_strip; } } // Average gain if ( n_strip > 0 ) { theAverageGain = gain_tot / n_strip; } // Average gain has been around 7.5 in real data if ( theAverageGain < loLimit || theAverageGain > hiLimit ) { // LogTrace("CSC") << "Average CSC strip gain = " // << theAverageGain << " is reset to expected value " << expectedAverage; theAverageGain = expectedAverage; } return theAverageGain; }
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().
{ //@@ NOT YET THOUGHT THROUGH FOR UNGANGED ME11A CSCDetId idraw = mapper_->rawCSCDetId( id ); return badStripWords[indexer_->layerIndex(idraw) - 1]; }
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().
{ //@@ NEED TO THINK ABOUT THIS SINCE ME11A & ME11B SHARE A COMMON WIRE PLANE //@@ SHOULD WE JUST USE ME11B? CSCDetId idraw = mapper_->rawCSCDetId( id ); return badWireWords[indexer_->layerIndex(idraw) - 1]; }
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().
{ if ( useTimingCorrections() ){ assert(theChamberTimingCorrections.isValid()); CSCDetId idraw = mapper_->rawCSCDetId( id ); int index = indexer_->chamberIndex(idraw) - 1; // NOTE THE MINUS ONE! return float ( theChamberTimingCorrections->item(index).cfeb_tmb_skew_delay*1./theChamberTimingCorrections->precision() + theChamberTimingCorrections->item(index).cfeb_timing_corr*1./theChamberTimingCorrections->precision() + (theChamberTimingCorrections->item(index).cfeb_cable_delay*25. ) ); } else return 0; }
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().
{ return mapper_->channelFromStrip(id, geomStrip); }
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().
{ if ( useTimingCorrections() ){ assert(theChipCorrections.isValid()); CSCDetId idraw = mapper_->rawCSCDetId( id ); int iraw = mapper_->rawStripChannel( id, geomChannel); int ichip = indexer_->chipIndex(iraw); // converts 1-80 to 1-5 (chip#, CFEB#) int index = indexer_->chipIndex(idraw, ichip) - 1; // NOTE THE MINUS ONE! return float ( theChipCorrections->value(index) )/theChipCorrections->scale(); } else return 0; }
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().
{ assert(theCrosstalk.isValid()); CSCDetId idraw = mapper_->rawCSCDetId( id ); int iraw = mapper_->rawStripChannel( id, geomChannel ); int index = indexer_->stripChannelIndex( idraw, iraw ) - 1; // NOTE THE MINUS ONE! ct[0] = float ( theCrosstalk->lslope(index) )/theCrosstalk->sscale(); ct[1] = float ( theCrosstalk->linter(index) )/theCrosstalk->iscale(); ct[2] = float ( theCrosstalk->rslope(index) )/theCrosstalk->sscale(); ct[3] = float ( theCrosstalk->rinter(index) )/theCrosstalk->iscale(); }
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().
{ assert(theCrosstalk.isValid()); CSCDetId idraw = mapper_->rawCSCDetId( id ); int iraw = mapper_->rawStripChannel( id, geomChannel ); int index = indexer_->stripChannelIndex( idraw, iraw ) - 1; // NOTE THE MINUS ONE! // resistive fraction is at the peak, where t=0 return leftRight ? float ( theCrosstalk->rinter(index) )/theCrosstalk->iscale() : float ( theCrosstalk->linter(index) )/theCrosstalk->iscale() ; }
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().
{ assert(theCrosstalk.isValid()); CSCDetId idraw = mapper_->rawCSCDetId( id ); int iraw = mapper_->rawStripChannel( id, geomChannel ); int index = indexer_->stripChannelIndex( idraw, iraw ) - 1; // NOTE THE MINUS ONE! // resistive fraction is at the peak, where t=0 return leftRight ? float ( theCrosstalk->rslope(index) )/theCrosstalk->sscale() : float ( theCrosstalk->lslope(index) )/theCrosstalk->sscale() ; }
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().
{ //@@ NOT YET THOUGHT THROUGH FOR UNGANGED ME11A // reset existing values badStripWords.assign( MAX_LAYERS, 0 ); if ( readBadChannels() ) { // unpack what we've read from theBadStrips // chambers is a vector<BadChamber> // channels is a vector<BadChannel> // Each BadChamber contains its index (1-468 or 540 w. ME42), the no. of bad channels, // and the index within vector<BadChannel> where this chamber's bad channels start. for ( size_t i=0; i<theBadStrips->chambers.size(); ++i ) { // loop over bad chambers int indexc = theBadStrips->chambers[i].chamber_index; int start = theBadStrips->chambers[i].pointer; // where this chamber's bad channels start in vector<BadChannel> int nbad = theBadStrips->chambers[i].bad_channels; CSCDetId id = indexer_->detIdFromChamberIndex( indexc ); // We need this to build layer index (1-2808) for ( int j=start-1; j<start-1+nbad; ++j ) { // bad channels in this chamber short lay = theBadStrips->channels[j].layer; // value 1-6 short chan = theBadStrips->channels[j].channel; // value 1-80 // short f1 = theBadStrips->channels[j].flag1; // short f2 = theBadStrips->channels[j].flag2; // short f3 = theBadStrips->channels[j].flag3; int indexl = indexer_->layerIndex( id.endcap(), id.station(), id.ring(), id.chamber(), lay ); badStripWords[indexl-1].set( chan-1, 1 ); // set bit 0-79 in 80-bit bitset representing this layer } // j } // i } }
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().
{ // reset existing values badWireWords.assign( MAX_LAYERS, 0 ); if ( readBadChannels() ) { // unpack what we've read from theBadWires for ( size_t i=0; i<theBadWires->chambers.size(); ++i ) { // loop over bad chambers int indexc = theBadWires->chambers[i].chamber_index; int start = theBadWires->chambers[i].pointer; // where this chamber's bad channels start in vector<BadChannel> int nbad = theBadWires->chambers[i].bad_channels; CSCDetId id = indexer_->detIdFromChamberIndex( indexc ); // We need this to build layer index (1-2808) for ( int j=start-1; j<start-1+nbad; ++j ) { // bad channels in this chamber short lay = theBadWires->channels[j].layer; // value 1-6 short chan = theBadWires->channels[j].channel; // value 1-80 // short f1 = theBadWires->channels[j].flag1; // short f2 = theBadWires->channels[j].flag2; // short f3 = theBadWires->channels[j].flag3; int indexl = indexer_->layerIndex( id.endcap(), id.station(), id.ring(), id.chamber(), lay ); badWireWords[indexl-1].set( chan-1, 1 ); // set bit 0-111 in 112-bit bitset representing this layer } // j } // i } }
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().
float CSCConditions::gainSigma | ( | const CSCDetId & | detId, |
int | channel | ||
) | const [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().
{ if ( useGasGainCorrections() ){ assert(theGasGainCorrections.isValid()); CSCDetId idraw = mapper_->rawCSCDetId( id ); int iraw = mapper_->rawStripChannel( id, geomChannel ); int index = indexer_->gasGainIndex(idraw, iraw, iwiregroup) - 1; // NOTE THE MINUS ONE! return float ( theGasGainCorrections->value(index) ); } else { return 1.; } }
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().
{ // Algorithms es.get<CSCIndexerRecord>().get( indexer_ ); es.get<CSCChannelMapperRecord>().get( mapper_ ); // Strip gains es.get<CSCDBGainsRcd>().get( theGains ); // Strip X-talk es.get<CSCDBCrosstalkRcd>().get( theCrosstalk ); // Strip pedestals es.get<CSCDBPedestalsRcd>().get( thePedestals ); // Strip autocorrelation noise matrix es.get<CSCDBNoiseMatrixRcd>().get( theNoiseMatrix ); if ( useTimingCorrections()){ // Buckeye chip speeds es.get<CSCDBChipSpeedCorrectionRcd>().get( theChipCorrections ); // Cable lengths from chambers to peripheral crate and additional chamber level timing correction es.get<CSCChamberTimeCorrectionsRcd>().get( theChamberTimingCorrections ); } if ( readBadChannels() ) { // Bad strip channels es.get<CSCBadStripsRcd>().get( theBadStrips ); // Bad wiregroup channels es.get<CSCBadWiresRcd>().get( theBadWires ); //@@ if( badStripsWatcher_.check( es ) ) { fillBadStripWords(); //@@ } //@@ if( badWiresWatcher_.check( es ) ) { fillBadWireWords(); //@ } } // Has GainsRcd changed? if( gainsWatcher_.check( es ) ) { // Yes... theAverageGain = -1.0; // ...reset, so next access will recalculate it } if ( readBadChambers() ) { // Entire bad chambers es.get<CSCBadChambersRcd>().get( theBadChambers ); } if ( useGasGainCorrections()){ es.get<CSCDBGasGainCorrectionRcd>().get( theGasGainCorrections ); } // print(); }
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().
{ //@@ NOT YET THOUGHT THROUGH FOR UNGANGED ME11A if ( readBadChambers() ) { CSCDetId idraw = mapper_->rawCSCDetId( id ); int index = indexer_->chamberIndex( idraw ); return theBadChambers->isInBadChamber( index ); } else return false; }
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().
{ //@@ BEWARE - THIS FUNCTION DOES NOT APPLy SCALE FACTOR USED IN PACKING VALUES IN CONDITIONS DATA //@@ MAY BE AN ERROR? WHO WOULD WANT ACCESS WITHOUT IT? assert(theNoiseMatrix.isValid()); CSCDetId idraw = mapper_->rawCSCDetId( id ); int iraw = mapper_->rawStripChannel( id, geomChannel ); int index = indexer_->stripChannelIndex( idraw, iraw ) - 1; // NOTE THE MINUS ONE! return theNoiseMatrix->item(index); }
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().
{ assert(me.size() > 11 ); const CSCDBNoiseMatrix::Item& item = noiseMatrix(id, geomChannel); // i.e. the function above me[0] = float ( item.elem33 )/theNoiseMatrix->scale(); me[1] = float ( item.elem34 )/theNoiseMatrix->scale(); me[2] = float ( item.elem35 )/theNoiseMatrix->scale(); me[3] = float ( item.elem44 )/theNoiseMatrix->scale(); me[4] = float ( item.elem45 )/theNoiseMatrix->scale(); me[5] = float ( item.elem46 )/theNoiseMatrix->scale(); me[6] = float ( item.elem55 )/theNoiseMatrix->scale(); me[7] = float ( item.elem56 )/theNoiseMatrix->scale(); me[8] = float ( item.elem57 )/theNoiseMatrix->scale(); me[9] = float ( item.elem66 )/theNoiseMatrix->scale(); me[10] = float ( item.elem67 )/theNoiseMatrix->scale(); me[11] = float ( item.elem77 )/theNoiseMatrix->scale(); }
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().
{ assert(thePedestals.isValid()); CSCDetId idraw = mapper_->rawCSCDetId( id ); int iraw = mapper_->rawStripChannel( id, geomChannel ); int index = indexer_->stripChannelIndex( idraw, iraw ) - 1; // NOTE THE MINUS ONE! return float( thePedestals->pedestal(index) )/thePedestals->scale_ped(); }
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().
{ assert(thePedestals.isValid()); CSCDetId idraw = mapper_->rawCSCDetId( id ); int iraw = mapper_->rawStripChannel( id, geomChannel ); int index = indexer_->stripChannelIndex( idraw, iraw ) - 1; // NOTE THE MINUS ONE! return float( thePedestals->pedestal_rms(index) )/thePedestals->scale_rms(); }
void CSCConditions::print | ( | void | ) | const |
Definition at line 392 of file CSCConditions.cc.
{ /* std::cout << "SIZES: GAINS: " << theGains->gains.size() << " PEDESTALS: " << thePedestals->pedestals.size() << " NOISES " << theNoiseMatrix->matrix.size() << std::endl;; std::map< int,std::vector<CSCDBGains::Item> >::const_iterator layerGainsItr = theGains->gains.begin(), lastGain = theGains->gains.end(); for( ; layerGainsItr != lastGain; ++layerGainsItr) { std::cout << "GAIN " << layerGainsItr->first << " STRIPS " << layerGainsItr->second.size() << " " << layerGainsItr->second[0].gain_slope << " " << layerGainsItr->second[0].gain_intercept << std::endl; } std::map< int,std::vector<CSCDBPedestals::Item> >::const_iterator pedestalItr = thePedestals->pedestals.begin(), lastPedestal = thePedestals->pedestals.end(); for( ; pedestalItr != lastPedestal; ++pedestalItr) { std::cout << "PEDS " << pedestalItr->first << " " << " STRIPS " << pedestalItr->second.size() << " "; for(int i = 1; i < 80; ++i) { std::cout << pedestalItr->second[i-1].rms << " " ; } std::cout << std::endl; } std::map< int,std::vector<CSCDBCrosstalk::Item> >::const_iterator crosstalkItr = theCrosstalk->crosstalk.begin(), lastCrosstalk = theCrosstalk->crosstalk.end(); for( ; crosstalkItr != lastCrosstalk; ++crosstalkItr) { std::cout << "XTALKS " << crosstalkItr->first << " STRIPS " << crosstalkItr->second.size() << " " << crosstalkItr->second[5].xtalk_slope_left << " " << crosstalkItr->second[5].xtalk_slope_right << " " << crosstalkItr->second[5].xtalk_intercept_left << " " << crosstalkItr->second[5].xtalk_intercept_right << std::endl; } */ }
int CSCConditions::rawStripChannel | ( | const CSCDetId & | id, |
int | geomChannel | ||
) | const |
Definition at line 388 of file CSCConditions.cc.
References mapper_.
Referenced by CSCRecoConditions::badStrip().
{ return mapper_->rawStripChannel( id, geomChannel); }
bool CSCConditions::readBadChambers | ( | ) | const [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().
{ return readBadChambers_; }
bool CSCConditions::readBadChannels | ( | ) | const [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().
{ return readBadChannels_; }
bool CSCConditions::useGasGainCorrections | ( | ) | const [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().
{ return useGasGainCorrections_; }
bool CSCConditions::useTimingCorrections | ( | ) | const [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().
{ return useTimingCorrections_; }
std::vector< std::bitset<80> > CSCConditions::badStripWords [private] |
Definition at line 151 of file CSCConditions.h.
Referenced by badStripWord(), CSCConditions(), and fillBadStripWords().
std::vector< std::bitset<112> > CSCConditions::badWireWords [private] |
Definition at line 152 of file CSCConditions.h.
Referenced by badWireWord(), CSCConditions(), and fillBadWireWords().
Definition at line 156 of file CSCConditions.h.
Referenced by initializeEvent().
edm::ESHandle<CSCIndexerBase> CSCConditions::indexer_ [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().
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().
bool CSCConditions::readBadChambers_ [private] |
Definition at line 146 of file CSCConditions.h.
Referenced by CSCConditions(), and readBadChambers().
bool CSCConditions::readBadChannels_ [private] |
Definition at line 145 of file CSCConditions.h.
Referenced by CSCConditions(), and readBadChannels().
float CSCConditions::theAverageGain [mutable, private] |
Definition at line 154 of file CSCConditions.h.
Referenced by averageGain(), and initializeEvent().
Definition at line 133 of file CSCConditions.h.
Referenced by initializeEvent(), and isInBadChamber().
edm::ESHandle<CSCBadStrips> CSCConditions::theBadStrips [private] |
Definition at line 131 of file CSCConditions.h.
Referenced by fillBadStripWords(), and initializeEvent().
edm::ESHandle<CSCBadWires> CSCConditions::theBadWires [private] |
Definition at line 132 of file CSCConditions.h.
Referenced by fillBadWireWords(), and initializeEvent().
Definition at line 135 of file CSCConditions.h.
Referenced by anodeBXoffset(), chamberTimingCorrection(), and initializeEvent().
Definition at line 134 of file CSCConditions.h.
Referenced by chipCorrection(), and initializeEvent().
Definition at line 128 of file CSCConditions.h.
Referenced by crossTalk(), crosstalkIntercept(), crosstalkSlope(), and initializeEvent().
edm::ESHandle<CSCDBGains> CSCConditions::theGains [private] |
Definition at line 127 of file CSCConditions.h.
Referenced by averageGain(), gain(), and initializeEvent().
Definition at line 136 of file CSCConditions.h.
Referenced by gasGainCorrection(), and initializeEvent().
Definition at line 130 of file CSCConditions.h.
Referenced by initializeEvent(), noiseMatrix(), and noiseMatrixElements().
Definition at line 129 of file CSCConditions.h.
Referenced by initializeEvent(), pedestal(), and pedestalSigma().
bool CSCConditions::useGasGainCorrections_ [private] |
Definition at line 148 of file CSCConditions.h.
Referenced by CSCConditions(), and useGasGainCorrections().
bool CSCConditions::useTimingCorrections_ [private] |
Definition at line 147 of file CSCConditions.h.
Referenced by CSCConditions(), and useTimingCorrections().