CMS 3D CMS Logo

Public Member Functions | Private Attributes | Friends

PedsFullNoiseAnalysis Class Reference

Histogram-based analysis for pedestal run. More...

#include <PedsFullNoiseAnalysis.h>

Inheritance diagram for PedsFullNoiseAnalysis:
CommissioningAnalysis

List of all members.

Public Member Functions

const VVFloatchi2Prob () const
const VVIntdead () const
bool isValid () const
const VVFloatksProb () const
const VVFloatnoise () const
const VVFloatnoiseBin84 () const
const VVFloatnoiseGaus () const
const VFloatnoiseMax () const
const VFloatnoiseMean () const
const VFloatnoiseMin () const
const VVFloatnoiseRMS () const
const VVFloatnoiseSignif () const
const VFloatnoiseSpread () const
const VVIntnoisy () const
const VVFloatpeds () const
 PedsFullNoiseAnalysis ()
 PedsFullNoiseAnalysis (const uint32_t &key)
const VFloatpedsMax () const
const VFloatpedsMean () const
const VFloatpedsMin () const
const VFloatpedsSpread () const
void print (std::stringstream &, uint32_t apv_number=0)
const VVFloatraw () const
const VFloatrawMax () const
const VFloatrawMean () const
const VFloatrawMin () const
const VFloatrawSpread () const
void reset ()
void summary (std::stringstream &) const
virtual ~PedsFullNoiseAnalysis ()

Private Attributes

VVFloat chi2Prob_
VVInt dead_
VVFloat ksProb_
bool legacy_
VVFloat noise_
VVFloat noiseBin84_
VVFloat noiseGaus_
VFloat noiseMax_
VFloat noiseMean_
VFloat noiseMin_
VVFloat noiseRMS_
VVFloat noiseSignif_
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 PedestalsAlgorithm
class PedsFullNoiseAlgorithm

Detailed Description

Histogram-based analysis for pedestal run.

Author:
M. Wingham, R.Bainbridge

Definition at line 15 of file PedsFullNoiseAnalysis.h.


Constructor & Destructor Documentation

PedsFullNoiseAnalysis::PedsFullNoiseAnalysis ( const uint32_t &  key)
PedsFullNoiseAnalysis::PedsFullNoiseAnalysis ( )
virtual PedsFullNoiseAnalysis::~PedsFullNoiseAnalysis ( ) [inline, virtual]

Definition at line 25 of file PedsFullNoiseAnalysis.h.

{;}

Member Function Documentation

const PedsFullNoiseAnalysis::VVFloat & PedsFullNoiseAnalysis::chi2Prob ( ) const [inline]

Definition at line 161 of file PedsFullNoiseAnalysis.h.

References chi2Prob_.

Referenced by PedsFullNoiseSummaryFactory::extract().

{ return chi2Prob_; }
const PedsFullNoiseAnalysis::VVInt & PedsFullNoiseAnalysis::dead ( ) const [inline]
bool PedsFullNoiseAnalysis::isValid ( void  ) const [virtual]
const PedsFullNoiseAnalysis::VVFloat & PedsFullNoiseAnalysis::ksProb ( ) const [inline]

Definition at line 160 of file PedsFullNoiseAnalysis.h.

References ksProb_.

Referenced by PedsFullNoiseSummaryFactory::extract().

{ return ksProb_; }
const PedsFullNoiseAnalysis::VVFloat & PedsFullNoiseAnalysis::noise ( ) const [inline]

Definition at line 158 of file PedsFullNoiseAnalysis.h.

References noise_.

Referenced by PedsFullNoiseSummaryFactory::extract(), and PedsFullNoiseHistosUsingDb::update().

{ return noise_; }
const PedsFullNoiseAnalysis::VVFloat & PedsFullNoiseAnalysis::noiseBin84 ( ) const [inline]

Definition at line 163 of file PedsFullNoiseAnalysis.h.

References noiseBin84_.

Referenced by PedsFullNoiseSummaryFactory::extract().

{ return noiseBin84_; }
const PedsFullNoiseAnalysis::VVFloat & PedsFullNoiseAnalysis::noiseGaus ( ) const [inline]

Definition at line 162 of file PedsFullNoiseAnalysis.h.

References noiseGaus_.

Referenced by PedsFullNoiseSummaryFactory::extract().

{ return noiseGaus_; }
const PedsFullNoiseAnalysis::VFloat & PedsFullNoiseAnalysis::noiseMax ( ) const [inline]

Definition at line 179 of file PedsFullNoiseAnalysis.h.

References noiseMax_.

Referenced by PedsFullNoiseHistosUsingDb::create(), and PedsFullNoiseSummaryFactory::extract().

{ return noiseMax_; }
const PedsFullNoiseAnalysis::VFloat & PedsFullNoiseAnalysis::noiseMean ( ) const [inline]
const PedsFullNoiseAnalysis::VFloat & PedsFullNoiseAnalysis::noiseMin ( ) const [inline]

Definition at line 180 of file PedsFullNoiseAnalysis.h.

References noiseMin_.

Referenced by PedsFullNoiseHistosUsingDb::create(), and PedsFullNoiseSummaryFactory::extract().

{ return noiseMin_; }
const PedsFullNoiseAnalysis::VVFloat & PedsFullNoiseAnalysis::noiseRMS ( ) const [inline]

Definition at line 164 of file PedsFullNoiseAnalysis.h.

References noiseRMS_.

Referenced by PedsFullNoiseSummaryFactory::extract().

{ return noiseRMS_; }
const PedsFullNoiseAnalysis::VVFloat & PedsFullNoiseAnalysis::noiseSignif ( ) const [inline]

Definition at line 165 of file PedsFullNoiseAnalysis.h.

References noiseSignif_.

Referenced by PedsFullNoiseSummaryFactory::extract().

{ return noiseSignif_; }
const PedsFullNoiseAnalysis::VFloat & PedsFullNoiseAnalysis::noiseSpread ( ) const [inline]
const PedsFullNoiseAnalysis::VVInt & PedsFullNoiseAnalysis::noisy ( ) const [inline]
const PedsFullNoiseAnalysis::VVFloat & PedsFullNoiseAnalysis::peds ( ) const [inline]

Definition at line 157 of file PedsFullNoiseAnalysis.h.

References peds_.

Referenced by PedsFullNoiseSummaryFactory::extract(), and PedsFullNoiseHistosUsingDb::update().

{ return peds_; }
const PedsFullNoiseAnalysis::VFloat & PedsFullNoiseAnalysis::pedsMax ( ) const [inline]

Definition at line 177 of file PedsFullNoiseAnalysis.h.

References pedsMax_.

Referenced by PedsFullNoiseHistosUsingDb::create(), and PedsFullNoiseSummaryFactory::extract().

{ return pedsMax_; }
const PedsFullNoiseAnalysis::VFloat & PedsFullNoiseAnalysis::pedsMean ( ) const [inline]

Definition at line 170 of file PedsFullNoiseAnalysis.h.

References pedsMean_.

Referenced by PedsFullNoiseHistosUsingDb::create(), and PedsFullNoiseSummaryFactory::extract().

{ return pedsMean_; }
const PedsFullNoiseAnalysis::VFloat & PedsFullNoiseAnalysis::pedsMin ( ) const [inline]
const PedsFullNoiseAnalysis::VFloat & PedsFullNoiseAnalysis::pedsSpread ( ) const [inline]
void PedsFullNoiseAnalysis::print ( std::stringstream &  ss,
uint32_t  apv_number = 0 
) [virtual]

Prints analysis results.

Implements CommissioningAnalysis.

Definition at line 234 of file PedsFullNoiseAnalysis.cc.

References dead_, relativeConstraints::empty, CommissioningAnalysis::getErrorCodes(), CommissioningAnalysis::header(), 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 PedsFullNoiseAnalysis::VVFloat & PedsFullNoiseAnalysis::raw ( ) const [inline]

Definition at line 159 of file PedsFullNoiseAnalysis.h.

References raw_.

{ return raw_; }
const PedsFullNoiseAnalysis::VFloat & PedsFullNoiseAnalysis::rawMax ( ) const [inline]

Definition at line 181 of file PedsFullNoiseAnalysis.h.

References rawMax_.

Referenced by PedsFullNoiseHistosUsingDb::create().

{ return rawMax_; }
const PedsFullNoiseAnalysis::VFloat & PedsFullNoiseAnalysis::rawMean ( ) const [inline]

Definition at line 174 of file PedsFullNoiseAnalysis.h.

References rawMean_.

Referenced by PedsFullNoiseHistosUsingDb::create().

{ return rawMean_; }
const PedsFullNoiseAnalysis::VFloat & PedsFullNoiseAnalysis::rawMin ( ) const [inline]

Definition at line 182 of file PedsFullNoiseAnalysis.h.

References rawMin_.

Referenced by PedsFullNoiseHistosUsingDb::create().

{ return rawMin_; }
const PedsFullNoiseAnalysis::VFloat & PedsFullNoiseAnalysis::rawSpread ( ) const [inline]

Definition at line 175 of file PedsFullNoiseAnalysis.h.

References rawSpread_.

Referenced by PedsFullNoiseHistosUsingDb::create().

{ return rawSpread_; }
void PedsFullNoiseAnalysis::reset ( void  ) [virtual]

Resets analysis member data.

Implements CommissioningAnalysis.

Definition at line 91 of file PedsFullNoiseAnalysis.cc.

References chi2Prob_, dead_, sistrip::invalid_, ksProb_, legacy_, noise_, noiseBin84_, noiseGaus_, noiseMax_, noiseMean_, noiseMin_, noiseRMS_, noiseSignif_, noiseSpread_, noisy_, peds_, pedsMax_, pedsMean_, pedsMin_, pedsSpread_, raw_, rawMax_, rawMean_, rawMin_, and rawSpread_.

void PedsFullNoiseAnalysis::summary ( std::stringstream &  ss) const [virtual]

Overrides base method.

Reimplemented from CommissioningAnalysis.

Definition at line 160 of file PedsFullNoiseAnalysis.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;
  
}

Friends And Related Function Documentation

friend class PedestalsAlgorithm [friend]

Definition at line 27 of file PedsFullNoiseAnalysis.h.

friend class PedsFullNoiseAlgorithm [friend]

Definition at line 28 of file PedsFullNoiseAnalysis.h.


Member Data Documentation

Definition at line 100 of file PedsFullNoiseAnalysis.h.

Referenced by chi2Prob(), PedsFullNoiseAnalysis(), and reset().

Dead strips.

Definition at line 108 of file PedsFullNoiseAnalysis.h.

Referenced by PedsFullNoiseAlgorithm::analyse(), dead(), PedsFullNoiseAnalysis(), print(), and reset().

Definition at line 152 of file PedsFullNoiseAnalysis.h.

Referenced by reset(), and summary().

Noise values.

Definition at line 93 of file PedsFullNoiseAnalysis.h.

Referenced by PedsFullNoiseAlgorithm::analyse(), noise(), print(), and reset().

Max noise value.

Definition at line 140 of file PedsFullNoiseAnalysis.h.

Referenced by PedsFullNoiseAlgorithm::analyse(), isValid(), noiseMax(), print(), and reset().

Mean noise value.

Definition at line 122 of file PedsFullNoiseAnalysis.h.

Referenced by PedsFullNoiseAlgorithm::analyse(), isValid(), noiseMean(), print(), and reset().

Min noise value.

Definition at line 143 of file PedsFullNoiseAnalysis.h.

Referenced by PedsFullNoiseAlgorithm::analyse(), isValid(), noiseMin(), print(), and reset().

Rms spread in noise.

Definition at line 125 of file PedsFullNoiseAnalysis.h.

Referenced by PedsFullNoiseAlgorithm::analyse(), isValid(), noiseSpread(), print(), and reset().

Noisy strips.

Definition at line 111 of file PedsFullNoiseAnalysis.h.

Referenced by PedsFullNoiseAlgorithm::analyse(), noisy(), PedsFullNoiseAnalysis(), print(), and reset().

Peds values.

Definition at line 90 of file PedsFullNoiseAnalysis.h.

Referenced by PedsFullNoiseAlgorithm::analyse(), peds(), print(), and reset().

Max peds value.

Definition at line 134 of file PedsFullNoiseAnalysis.h.

Referenced by PedsFullNoiseAlgorithm::analyse(), isValid(), pedsMax(), print(), and reset().

Mean peds value.

Definition at line 116 of file PedsFullNoiseAnalysis.h.

Referenced by PedsFullNoiseAlgorithm::analyse(), isValid(), pedsMean(), print(), and reset().

Min peds value.

Definition at line 137 of file PedsFullNoiseAnalysis.h.

Referenced by PedsFullNoiseAlgorithm::analyse(), isValid(), pedsMin(), print(), and reset().

Rms spread in peds.

Definition at line 119 of file PedsFullNoiseAnalysis.h.

Referenced by PedsFullNoiseAlgorithm::analyse(), isValid(), pedsSpread(), print(), and reset().

Raw noise values.

Definition at line 96 of file PedsFullNoiseAnalysis.h.

Referenced by PedsFullNoiseAlgorithm::analyse(), print(), raw(), and reset().

Max raw noise value.

Definition at line 146 of file PedsFullNoiseAnalysis.h.

Referenced by PedsFullNoiseAlgorithm::analyse(), isValid(), print(), rawMax(), and reset().

Mean raw noise value.

Definition at line 128 of file PedsFullNoiseAnalysis.h.

Referenced by PedsFullNoiseAlgorithm::analyse(), isValid(), print(), rawMean(), and reset().

Min raw noise value.

Definition at line 149 of file PedsFullNoiseAnalysis.h.

Referenced by PedsFullNoiseAlgorithm::analyse(), isValid(), print(), rawMin(), and reset().

Rms spread in raw noise.

Definition at line 131 of file PedsFullNoiseAnalysis.h.

Referenced by PedsFullNoiseAlgorithm::analyse(), isValid(), print(), rawSpread(), and reset().