CMS 3D CMS Logo

Public Member Functions | Private Attributes | Friends

PedsOnlyAnalysis Class Reference

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

#include <PedsOnlyAnalysis.h>

Inheritance diagram for PedsOnlyAnalysis:
CommissioningAnalysis

List of all members.

Public Member Functions

bool isValid () const
const VVFloatpeds () const
const VFloatpedsMax () const
const VFloatpedsMean () const
const VFloatpedsMin () const
 PedsOnlyAnalysis ()
 PedsOnlyAnalysis (const uint32_t &key)
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 ~PedsOnlyAnalysis ()

Private Attributes

bool legacy_
VVFloat peds_
VFloat pedsMax_
VFloat pedsMean_
VFloat pedsMin_
VFloat pedsSpread_
VVFloat raw_
VFloat rawMax_
VFloat rawMean_
VFloat rawMin_
VFloat rawSpread_

Friends

class PedsOnlyAlgorithm

Detailed Description

Histogram-based analysis for pedestal run.

Author:
M. Wingham, R.Bainbridge

Definition at line 15 of file PedsOnlyAnalysis.h.


Constructor & Destructor Documentation

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

Definition at line 25 of file PedsOnlyAnalysis.h.

{;}

Member Function Documentation

bool PedsOnlyAnalysis::isValid ( void  ) const [virtual]
const PedsOnlyAnalysis::VVFloat & PedsOnlyAnalysis::peds ( ) const [inline]

Definition at line 106 of file PedsOnlyAnalysis.h.

References peds_.

Referenced by PedsOnlySummaryFactory::extract(), and PedsOnlyHistosUsingDb::update().

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

Definition at line 114 of file PedsOnlyAnalysis.h.

References pedsMax_.

Referenced by PedsOnlyHistosUsingDb::create(), and PedsOnlySummaryFactory::extract().

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

Definition at line 109 of file PedsOnlyAnalysis.h.

References pedsMean_.

Referenced by PedsOnlyHistosUsingDb::create(), and PedsOnlySummaryFactory::extract().

{ return pedsMean_; }
const PedsOnlyAnalysis::VFloat & PedsOnlyAnalysis::pedsMin ( ) const [inline]
const PedsOnlyAnalysis::VFloat & PedsOnlyAnalysis::pedsSpread ( ) const [inline]

Definition at line 110 of file PedsOnlyAnalysis.h.

References pedsSpread_.

Referenced by PedsOnlyHistosUsingDb::create(), and PedsOnlySummaryFactory::extract().

{ return pedsSpread_; }
void PedsOnlyAnalysis::print ( std::stringstream &  ss,
uint32_t  apv_number = 0 
) [virtual]

Prints analysis results.

Implements CommissioningAnalysis.

Definition at line 159 of file PedsOnlyAnalysis.cc.

References relativeConstraints::empty, CommissioningAnalysis::getErrorCodes(), CommissioningAnalysis::header(), isValid(), sistrip::mlCommissioning_, CommissioningAnalysis::myName(), 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 ||
       raw_[iapv].size() < 128 ) { 
    edm::LogWarning(mlCommissioning_)
      << "[" << myName() << "::" << __func__ << "]"
      << " Unexpected number of pedestal/noise values: " 
      << peds_[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
     << "  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;
  ss << " Mean peds +/- spread      [ADC] : " << pedsMean_[iapv] << " +/- " << pedsSpread_[iapv] << std::endl 
     << " Min/Max pedestal          [ADC] : " << pedsMin_[iapv] << " <-> " << pedsMax_[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
     << 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 PedsOnlyAnalysis::VVFloat & PedsOnlyAnalysis::raw ( ) const [inline]

Definition at line 107 of file PedsOnlyAnalysis.h.

References raw_.

Referenced by PedsOnlySummaryFactory::extract(), and PedsOnlyHistosUsingDb::update().

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

Definition at line 116 of file PedsOnlyAnalysis.h.

References rawMax_.

Referenced by PedsOnlyHistosUsingDb::create(), and PedsOnlySummaryFactory::extract().

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

Definition at line 111 of file PedsOnlyAnalysis.h.

References rawMean_.

Referenced by PedsOnlyHistosUsingDb::create(), and PedsOnlySummaryFactory::extract().

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

Definition at line 117 of file PedsOnlyAnalysis.h.

References rawMin_.

Referenced by PedsOnlyHistosUsingDb::create(), and PedsOnlySummaryFactory::extract().

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

Definition at line 112 of file PedsOnlyAnalysis.h.

References rawSpread_.

Referenced by PedsOnlyHistosUsingDb::create(), and PedsOnlySummaryFactory::extract().

{ return rawSpread_; }
void PedsOnlyAnalysis::reset ( void  ) [virtual]
void PedsOnlyAnalysis::summary ( std::stringstream &  ss) const [virtual]

Overrides base method.

Reimplemented from CommissioningAnalysis.

Definition at line 85 of file PedsOnlyAnalysis.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, 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 PedsOnlyAlgorithm [friend]

Definition at line 27 of file PedsOnlyAnalysis.h.


Member Data Documentation

bool PedsOnlyAnalysis::legacy_ [private]

Peds values.

Definition at line 68 of file PedsOnlyAnalysis.h.

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

Max peds value.

Definition at line 88 of file PedsOnlyAnalysis.h.

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

Mean peds value.

Definition at line 76 of file PedsOnlyAnalysis.h.

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

Min peds value.

Definition at line 91 of file PedsOnlyAnalysis.h.

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

Rms spread in peds.

Definition at line 79 of file PedsOnlyAnalysis.h.

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

Raw noise values.

Definition at line 71 of file PedsOnlyAnalysis.h.

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

Max raw noise value.

Definition at line 94 of file PedsOnlyAnalysis.h.

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

Mean raw noise value.

Definition at line 82 of file PedsOnlyAnalysis.h.

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

Min raw noise value.

Definition at line 97 of file PedsOnlyAnalysis.h.

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

Rms spread in raw noise.

Definition at line 85 of file PedsOnlyAnalysis.h.

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