Histogram-based analysis for pedestal run. More...
#include <NoiseAnalysis.h>
Public Member Functions | |
const VVInt & | dead () const |
bool | isValid () const |
const VVFloat & | noise () const |
NoiseAnalysis (const uint32_t &key) | |
NoiseAnalysis () | |
const VFloat & | noiseMax () const |
const VFloat & | noiseMean () const |
const VFloat & | noiseMin () const |
const VFloat & | noiseSpread () const |
const VVInt & | noisy () const |
const VVFloat & | peds () const |
const VFloat & | pedsMax () const |
const VFloat & | pedsMean () const |
const VFloat & | pedsMin () const |
const VFloat & | pedsSpread () const |
void | print (std::stringstream &, uint32_t apv_number=0) |
const VVFloat & | raw () const |
const VFloat & | rawMax () const |
const VFloat & | rawMean () const |
const VFloat & | rawMin () const |
const VFloat & | rawSpread () const |
void | reset () |
void | summary (std::stringstream &) const |
virtual | ~NoiseAnalysis () |
Private Attributes | |
VVInt | dead_ |
bool | legacy_ |
VVFloat | noise_ |
VFloat | noiseMax_ |
VFloat | noiseMean_ |
VFloat | noiseMin_ |
VFloat | noiseSpread_ |
VVInt | noisy_ |
VVFloat | peds_ |
VFloat | pedsMax_ |
VFloat | pedsMean_ |
VFloat | pedsMin_ |
VFloat | pedsSpread_ |
VVFloat | raw_ |
VFloat | rawMax_ |
VFloat | rawMean_ |
VFloat | rawMin_ |
VFloat | rawSpread_ |
Friends | |
class | NoiseAlgorithm |
Histogram-based analysis for pedestal run.
Definition at line 15 of file NoiseAnalysis.h.
NoiseAnalysis::NoiseAnalysis | ( | const uint32_t & | key | ) |
Definition at line 13 of file NoiseAnalysis.cc.
: CommissioningAnalysis(key,"NoiseAnalysis"), peds_(2,VFloat(128,sistrip::invalid_)), noise_(2,VFloat(128,sistrip::invalid_)), raw_(2,VFloat(128,sistrip::invalid_)), dead_(2,VInt(0,sistrip::invalid_)), noisy_(2,VInt(0,sistrip::invalid_)), pedsMean_(2,sistrip::invalid_), pedsSpread_(2,sistrip::invalid_), noiseMean_(2,sistrip::invalid_), noiseSpread_(2,sistrip::invalid_), rawMean_(2,sistrip::invalid_), rawSpread_(2,sistrip::invalid_), pedsMax_(2,sistrip::invalid_), pedsMin_(2,sistrip::invalid_), noiseMax_(2,sistrip::invalid_), noiseMin_(2,sistrip::invalid_), rawMax_(2,sistrip::invalid_), rawMin_(2,sistrip::invalid_), legacy_(false) { dead_[0].reserve(256); dead_[1].reserve(256); noisy_[0].reserve(256); noisy_[1].reserve(256); }
NoiseAnalysis::NoiseAnalysis | ( | ) |
Definition at line 40 of file NoiseAnalysis.cc.
: CommissioningAnalysis("NoiseAnalysis"), peds_(2,VFloat(128,sistrip::invalid_)), noise_(2,VFloat(128,sistrip::invalid_)), raw_(2,VFloat(128,sistrip::invalid_)), dead_(2,VInt(0,sistrip::invalid_)), noisy_(2,VInt(0,sistrip::invalid_)), pedsMean_(2,sistrip::invalid_), pedsSpread_(2,sistrip::invalid_), noiseMean_(2,sistrip::invalid_), noiseSpread_(2,sistrip::invalid_), rawMean_(2,sistrip::invalid_), rawSpread_(2,sistrip::invalid_), pedsMax_(2,sistrip::invalid_), pedsMin_(2,sistrip::invalid_), noiseMax_(2,sistrip::invalid_), noiseMin_(2,sistrip::invalid_), rawMax_(2,sistrip::invalid_), rawMin_(2,sistrip::invalid_), legacy_(false) { dead_[0].reserve(256); dead_[1].reserve(256); noisy_[0].reserve(256); noisy_[1].reserve(256); }
virtual NoiseAnalysis::~NoiseAnalysis | ( | ) | [inline, virtual] |
Definition at line 25 of file NoiseAnalysis.h.
{;}
const NoiseAnalysis::VVInt & NoiseAnalysis::dead | ( | ) | const [inline] |
Definition at line 142 of file NoiseAnalysis.h.
References dead_.
Referenced by NoiseHistosUsingDb::create(), and NoiseSummaryFactory::extract().
{ return dead_; }
bool NoiseAnalysis::isValid | ( | void | ) | const [virtual] |
Identifies if analysis is valid or not.
Reimplemented from CommissioningAnalysis.
Definition at line 94 of file NoiseAnalysis.cc.
References relativeConstraints::empty, CommissioningAnalysis::getErrorCodes(), sistrip::maximum_, noiseMax_, noiseMean_, noiseMin_, noiseSpread_, pedsMax_, pedsMean_, pedsMin_, pedsSpread_, rawMax_, rawMean_, rawMin_, and rawSpread_.
Referenced by NoiseHistosUsingDb::create(), NoiseHistograms::histoAnalysis(), print(), and summary().
{ return ( pedsMean_[0] < sistrip::maximum_ && pedsMean_[1] < sistrip::maximum_ && pedsSpread_[0] < sistrip::maximum_ && pedsSpread_[1] < sistrip::maximum_ && noiseMean_[0] < sistrip::maximum_ && noiseMean_[1] < sistrip::maximum_ && noiseSpread_[0] < sistrip::maximum_ && noiseSpread_[1] < sistrip::maximum_ && rawMean_[0] < sistrip::maximum_ && rawMean_[1] < sistrip::maximum_ && rawSpread_[0] < sistrip::maximum_ && rawSpread_[1] < sistrip::maximum_ && pedsMax_[0] < sistrip::maximum_ && pedsMax_[1] < sistrip::maximum_ && pedsMin_[0] < sistrip::maximum_ && pedsMin_[1] < sistrip::maximum_ && noiseMax_[0] < sistrip::maximum_ && noiseMax_[1] < sistrip::maximum_ && noiseMin_[0] < sistrip::maximum_ && noiseMin_[1] < sistrip::maximum_ && rawMax_[0] < sistrip::maximum_ && rawMax_[1] < sistrip::maximum_ && rawMin_[0] < sistrip::maximum_ && rawMin_[1] < sistrip::maximum_ && getErrorCodes().empty() ); //noiseMean_[0] <= rawMean_[0] && //@@ temp //noiseMean_[1] <= rawMean_[1] ); //@@ temp }
const NoiseAnalysis::VVFloat & NoiseAnalysis::noise | ( | ) | const [inline] |
Definition at line 139 of file NoiseAnalysis.h.
References noise_.
Referenced by NoiseSummaryFactory::extract(), and NoiseHistosUsingDb::update().
{ return noise_; }
const NoiseAnalysis::VFloat & NoiseAnalysis::noiseMax | ( | ) | const [inline] |
Definition at line 154 of file NoiseAnalysis.h.
References noiseMax_.
Referenced by NoiseHistosUsingDb::create(), and NoiseSummaryFactory::extract().
{ return noiseMax_; }
const NoiseAnalysis::VFloat & NoiseAnalysis::noiseMean | ( | ) | const [inline] |
Definition at line 147 of file NoiseAnalysis.h.
References noiseMean_.
Referenced by NoiseHistosUsingDb::create(), and NoiseSummaryFactory::extract().
{ return noiseMean_; }
const NoiseAnalysis::VFloat & NoiseAnalysis::noiseMin | ( | ) | const [inline] |
Definition at line 155 of file NoiseAnalysis.h.
References noiseMin_.
Referenced by NoiseHistosUsingDb::create(), and NoiseSummaryFactory::extract().
{ return noiseMin_; }
const NoiseAnalysis::VFloat & NoiseAnalysis::noiseSpread | ( | ) | const [inline] |
Definition at line 148 of file NoiseAnalysis.h.
References noiseSpread_.
Referenced by NoiseHistosUsingDb::create(), and NoiseSummaryFactory::extract().
{ return noiseSpread_; }
const NoiseAnalysis::VVInt & NoiseAnalysis::noisy | ( | ) | const [inline] |
Definition at line 143 of file NoiseAnalysis.h.
References noisy_.
Referenced by NoiseHistosUsingDb::create(), and NoiseSummaryFactory::extract().
{ return noisy_; }
const NoiseAnalysis::VVFloat & NoiseAnalysis::peds | ( | ) | const [inline] |
Definition at line 138 of file NoiseAnalysis.h.
References peds_.
Referenced by NoiseSummaryFactory::extract(), and NoiseHistosUsingDb::update().
{ return peds_; }
const NoiseAnalysis::VFloat & NoiseAnalysis::pedsMax | ( | ) | const [inline] |
Definition at line 152 of file NoiseAnalysis.h.
References pedsMax_.
Referenced by NoiseHistosUsingDb::create(), and NoiseSummaryFactory::extract().
{ return pedsMax_; }
const NoiseAnalysis::VFloat & NoiseAnalysis::pedsMean | ( | ) | const [inline] |
Definition at line 145 of file NoiseAnalysis.h.
References pedsMean_.
Referenced by NoiseHistosUsingDb::create(), and NoiseSummaryFactory::extract().
{ return pedsMean_; }
const NoiseAnalysis::VFloat & NoiseAnalysis::pedsMin | ( | ) | const [inline] |
Definition at line 153 of file NoiseAnalysis.h.
References pedsMin_.
Referenced by NoiseHistosUsingDb::create(), and NoiseSummaryFactory::extract().
{ return pedsMin_; }
const NoiseAnalysis::VFloat & NoiseAnalysis::pedsSpread | ( | ) | const [inline] |
Definition at line 146 of file NoiseAnalysis.h.
References pedsSpread_.
Referenced by NoiseHistosUsingDb::create(), and NoiseSummaryFactory::extract().
{ return pedsSpread_; }
void NoiseAnalysis::print | ( | std::stringstream & | ss, |
uint32_t | apv_number = 0 |
||
) | [virtual] |
Prints analysis results.
Implements CommissioningAnalysis.
Definition at line 200 of file NoiseAnalysis.cc.
References dead_, relativeConstraints::empty, CommissioningAnalysis::getErrorCodes(), CommissioningAnalysis::header(), cuy::ii, isValid(), sistrip::mlCommissioning_, CommissioningAnalysis::myName(), noise_, noiseMax_, noiseMean_, noiseMin_, noiseSpread_, noisy_, peds_, pedsMax_, pedsMean_, pedsMin_, pedsSpread_, raw_, rawMax_, rawMean_, rawMin_, rawSpread_, and findQualityFiles::size.
{ if ( iapv == 1 || iapv == 2 ) { iapv--; } else { iapv = 0; } if ( peds_[iapv].size() < 128 || noise_[iapv].size() < 128 || raw_[iapv].size() < 128 ) { edm::LogWarning(mlCommissioning_) << "[" << myName() << "::" << __func__ << "]" << " Unexpected number of pedestal/noise values: " << peds_[iapv].size() << ", " << noise_[iapv].size() << ", " << raw_[iapv].size(); return; } header( ss ); ss << " Monitorables for APV number : " << iapv; if ( iapv == 0 ) { ss << " (first of pair)"; } else if ( iapv == 1 ) { ss << " (second of pair)"; } ss << std::endl; ss << std::fixed << std::setprecision(2); ss << " Example peds/noise for strips : " << " 0, 31, 63, 127" << std::endl << " Peds [ADC] : " << std::setw(6) << peds_[iapv][0] << ", " << std::setw(6) << peds_[iapv][31] << ", " << std::setw(6) << peds_[iapv][63] << ", " << std::setw(6) << peds_[iapv][127] << std::endl << " Noise [ADC] : " << std::setw(6) << noise_[iapv][0] << ", " << std::setw(6) << noise_[iapv][31] << ", " << std::setw(6) << noise_[iapv][63] << ", " << std::setw(6) << noise_[iapv][127] << std::endl << " Raw noise [ADC] : " << std::setw(6) << raw_[iapv][0] << ", " << std::setw(6) << raw_[iapv][31] << ", " << std::setw(6) << raw_[iapv][63] << ", " << std::setw(6) << raw_[iapv][127] << std::endl << " Dead strips (<5s) [strip] : (" << dead_[iapv].size() << " in total) "; for ( uint16_t ii = 0; ii < dead_[iapv].size(); ii++ ) { ss << dead_[iapv][ii] << " "; } ss << std::endl; ss << " Noisy strips (>5s) [strip] : (" << noisy_[iapv].size() << " in total) "; for ( uint16_t ii = 0; ii < noisy_[iapv].size(); ii++ ) { ss << noisy_[iapv][ii] << " "; } ss << std::endl; ss << " Mean peds +/- spread [ADC] : " << pedsMean_[iapv] << " +/- " << pedsSpread_[iapv] << std::endl << " Min/Max pedestal [ADC] : " << pedsMin_[iapv] << " <-> " << pedsMax_[iapv] << std::endl << " Mean noise +/- spread [ADC] : " << noiseMean_[iapv] << " +/- " << noiseSpread_[iapv] << std::endl << " Min/Max noise [ADC] : " << noiseMin_[iapv] << " <-> " << noiseMax_[iapv] << std::endl << " Mean raw noise +/- spread [ADC] : " << rawMean_[iapv] << " +/- " << rawSpread_[iapv] << std::endl << " Min/Max raw noise [ADC] : " << rawMin_[iapv] << " <-> " << rawMax_[iapv] << std::endl << " Normalised noise : " << "(yet to be implemented...)" << std::endl << std::boolalpha << " isValid : " << isValid() << std::endl << std::noboolalpha << " Error codes (found " << std::setw(2) << std::setfill(' ') << getErrorCodes().size() << ") : "; if ( getErrorCodes().empty() ) { ss << "(none)"; } else { VString::const_iterator istr = getErrorCodes().begin(); VString::const_iterator jstr = getErrorCodes().end(); for ( ; istr != jstr; ++istr ) { ss << *istr << " "; } } ss << std::endl; }
const NoiseAnalysis::VVFloat & NoiseAnalysis::raw | ( | ) | const [inline] |
const NoiseAnalysis::VFloat & NoiseAnalysis::rawMax | ( | ) | const [inline] |
Definition at line 156 of file NoiseAnalysis.h.
References rawMax_.
Referenced by NoiseHistosUsingDb::create().
{ return rawMax_; }
const NoiseAnalysis::VFloat & NoiseAnalysis::rawMean | ( | ) | const [inline] |
Definition at line 149 of file NoiseAnalysis.h.
References rawMean_.
Referenced by NoiseHistosUsingDb::create().
{ return rawMean_; }
const NoiseAnalysis::VFloat & NoiseAnalysis::rawMin | ( | ) | const [inline] |
Definition at line 157 of file NoiseAnalysis.h.
References rawMin_.
Referenced by NoiseHistosUsingDb::create().
{ return rawMin_; }
const NoiseAnalysis::VFloat & NoiseAnalysis::rawSpread | ( | ) | const [inline] |
Definition at line 150 of file NoiseAnalysis.h.
References rawSpread_.
Referenced by NoiseHistosUsingDb::create().
{ return rawSpread_; }
void NoiseAnalysis::reset | ( | void | ) | [virtual] |
Resets analysis member data.
Implements CommissioningAnalysis.
Definition at line 67 of file NoiseAnalysis.cc.
References dead_, sistrip::invalid_, legacy_, noise_, noiseMax_, noiseMean_, noiseMin_, noiseSpread_, noisy_, peds_, pedsMax_, pedsMean_, pedsMin_, pedsSpread_, raw_, rawMax_, rawMean_, rawMin_, and rawSpread_.
{ peds_ = VVFloat(2,VFloat(128,sistrip::invalid_)); noise_ = VVFloat(2,VFloat(128,sistrip::invalid_)); raw_ = VVFloat(2,VFloat(128,sistrip::invalid_)); dead_ = VVInt(2,VInt(0,sistrip::invalid_)); noisy_ = VVInt(2,VInt(0,sistrip::invalid_)); pedsMean_ = VFloat(2,sistrip::invalid_); pedsSpread_ = VFloat(2,sistrip::invalid_); noiseMean_ = VFloat(2,sistrip::invalid_); noiseSpread_ = VFloat(2,sistrip::invalid_); rawMean_ = VFloat(2,sistrip::invalid_); rawSpread_ = VFloat(2,sistrip::invalid_); pedsMax_ = VFloat(2,sistrip::invalid_); pedsMin_ = VFloat(2,sistrip::invalid_); noiseMax_ = VFloat(2,sistrip::invalid_); noiseMin_ = VFloat(2,sistrip::invalid_); rawMax_ = VFloat(2,sistrip::invalid_); rawMin_ = VFloat(2,sistrip::invalid_); dead_[0].reserve(256); dead_[1].reserve(256); noisy_[0].reserve(256); noisy_[1].reserve(256); legacy_ = false; }
void NoiseAnalysis::summary | ( | std::stringstream & | ss | ) | const [virtual] |
Overrides base method.
Reimplemented from CommissioningAnalysis.
Definition at line 126 of file NoiseAnalysis.cc.
References sistrip::APV, SiStripFecKey::ccuAddr(), SiStripFecKey::ccuChan(), sistrip::extrainfo::commonMode_, sistrip::controlView_, sistrip::dir_, sistrip::dqmRoot_, sistrip::EXPERT_HISTO, funct::false, SiStripFecKey::fecCrate(), CommissioningAnalysis::fecKey(), SiStripFecKey::fecRing(), SiStripFecKey::fecSlot(), sistrip::FED_KEY, CommissioningAnalysis::fedKey(), SiStripFecKey::i2cAddr(), isValid(), SiStripKey::key(), legacy_, sistrip::LLD_CHAN, SiStripFecKey::lldChan(), CommissioningAnalysis::myName(), getHLTPrescaleColumns::path, sistrip::extrainfo::pedestals_, sistrip::extrainfo::pedsAndCmSubNoise_, sistrip::extrainfo::pedsAndRawNoise_, sistrip::extrainfo::rawNoise_, environment_file_cff::runType, AlCaHLTBitMon_QueryRunRegistry::string, indexGen::title, and funct::true.
{ SiStripFecKey fec_key( fecKey() ); SiStripFedKey fed_key( fedKey() ); sistrip::RunType type = SiStripEnumsAndStrings::runType( myName() ); std::stringstream extra1,extra2,extra3; if ( legacy_ ) { extra1 << sistrip::extrainfo::pedsAndRawNoise_; extra2 << sistrip::extrainfo::pedsAndCmSubNoise_; extra3 << sistrip::extrainfo::commonMode_; } else { extra1 << sistrip::extrainfo::pedestals_; extra2 << sistrip::extrainfo::rawNoise_; extra3 << sistrip::extrainfo::commonMode_; } std::string title1 = SiStripHistoTitle( sistrip::EXPERT_HISTO, type, sistrip::FED_KEY, fed_key.key(), sistrip::LLD_CHAN, fec_key.lldChan(), extra1.str() ).title(); std::string title2 = SiStripHistoTitle( sistrip::EXPERT_HISTO, type, sistrip::FED_KEY, fed_key.key(), sistrip::LLD_CHAN, fec_key.lldChan(), extra2.str() ).title(); std::string title3 = SiStripHistoTitle( sistrip::EXPERT_HISTO, type, sistrip::FED_KEY, fed_key.key(), sistrip::APV, SiStripFecKey::i2cAddr( fec_key.lldChan(), true ), extra3.str() ).title(); std::string title4 = SiStripHistoTitle( sistrip::EXPERT_HISTO, type, sistrip::FED_KEY, fed_key.key(), sistrip::APV, SiStripFecKey::i2cAddr( fec_key.lldChan(), false ), extra3.str() ).title(); ss << " Summary" << ":" << ( isValid() ? "Valid" : "Invalid" ) << ":" << sistrip::controlView_ << ":" << fec_key.fecCrate() << "/" << fec_key.fecSlot() << "/" << fec_key.fecRing() << "/" << fec_key.ccuAddr() << "/" << fec_key.ccuChan() << ":" << sistrip::dqmRoot_ << sistrip::dir_ << "Collate" << sistrip::dir_ << SiStripFecKey( fec_key.fecCrate(), fec_key.fecSlot(), fec_key.fecRing(), fec_key.ccuAddr(), fec_key.ccuChan() ).path() << ":" << title1 << ";" << title2 << ";" << title3 << ";" << title4 << std::endl; }
friend class NoiseAlgorithm [friend] |
Definition at line 27 of file NoiseAnalysis.h.
VVInt NoiseAnalysis::dead_ [private] |
Dead strips.
Definition at line 88 of file NoiseAnalysis.h.
Referenced by NoiseAlgorithm::analyse(), dead(), NoiseAnalysis(), print(), and reset().
bool NoiseAnalysis::legacy_ [private] |
Definition at line 132 of file NoiseAnalysis.h.
Referenced by NoiseAlgorithm::extract(), reset(), and summary().
VVFloat NoiseAnalysis::noise_ [private] |
Noise values.
Definition at line 80 of file NoiseAnalysis.h.
Referenced by NoiseAlgorithm::analyse(), noise(), print(), and reset().
VFloat NoiseAnalysis::noiseMax_ [private] |
Max noise value.
Definition at line 120 of file NoiseAnalysis.h.
Referenced by NoiseAlgorithm::analyse(), isValid(), noiseMax(), print(), and reset().
VFloat NoiseAnalysis::noiseMean_ [private] |
Mean noise value.
Definition at line 102 of file NoiseAnalysis.h.
Referenced by NoiseAlgorithm::analyse(), isValid(), noiseMean(), print(), and reset().
VFloat NoiseAnalysis::noiseMin_ [private] |
Min noise value.
Definition at line 123 of file NoiseAnalysis.h.
Referenced by NoiseAlgorithm::analyse(), isValid(), noiseMin(), print(), and reset().
VFloat NoiseAnalysis::noiseSpread_ [private] |
Rms spread in noise.
Definition at line 105 of file NoiseAnalysis.h.
Referenced by NoiseAlgorithm::analyse(), isValid(), noiseSpread(), print(), and reset().
VVInt NoiseAnalysis::noisy_ [private] |
Noisy strips.
Definition at line 91 of file NoiseAnalysis.h.
Referenced by NoiseAlgorithm::analyse(), NoiseAnalysis(), noisy(), print(), and reset().
VVFloat NoiseAnalysis::peds_ [private] |
Peds values.
Definition at line 77 of file NoiseAnalysis.h.
Referenced by NoiseAlgorithm::analyse(), peds(), print(), and reset().
VFloat NoiseAnalysis::pedsMax_ [private] |
Max peds value.
Definition at line 114 of file NoiseAnalysis.h.
Referenced by NoiseAlgorithm::analyse(), isValid(), pedsMax(), print(), and reset().
VFloat NoiseAnalysis::pedsMean_ [private] |
Mean peds value.
Definition at line 96 of file NoiseAnalysis.h.
Referenced by NoiseAlgorithm::analyse(), isValid(), pedsMean(), print(), and reset().
VFloat NoiseAnalysis::pedsMin_ [private] |
Min peds value.
Definition at line 117 of file NoiseAnalysis.h.
Referenced by NoiseAlgorithm::analyse(), isValid(), pedsMin(), print(), and reset().
VFloat NoiseAnalysis::pedsSpread_ [private] |
Rms spread in peds.
Definition at line 99 of file NoiseAnalysis.h.
Referenced by NoiseAlgorithm::analyse(), isValid(), pedsSpread(), print(), and reset().
VVFloat NoiseAnalysis::raw_ [private] |
Raw noise values.
Definition at line 83 of file NoiseAnalysis.h.
Referenced by NoiseAlgorithm::analyse(), print(), raw(), and reset().
VFloat NoiseAnalysis::rawMax_ [private] |
Max raw noise value.
Definition at line 126 of file NoiseAnalysis.h.
Referenced by NoiseAlgorithm::analyse(), isValid(), print(), rawMax(), and reset().
VFloat NoiseAnalysis::rawMean_ [private] |
Mean raw noise value.
Definition at line 108 of file NoiseAnalysis.h.
Referenced by NoiseAlgorithm::analyse(), isValid(), print(), rawMean(), and reset().
VFloat NoiseAnalysis::rawMin_ [private] |
Min raw noise value.
Definition at line 129 of file NoiseAnalysis.h.
Referenced by NoiseAlgorithm::analyse(), isValid(), print(), rawMin(), and reset().
VFloat NoiseAnalysis::rawSpread_ [private] |
Rms spread in raw noise.
Definition at line 111 of file NoiseAnalysis.h.
Referenced by NoiseAlgorithm::analyse(), isValid(), print(), rawSpread(), and reset().