CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes | Friends
PedsOnlyAnalysis Class Reference

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

#include <PedsOnlyAnalysis.h>

Inheritance diagram for PedsOnlyAnalysis:
CommissioningAnalysis

Public Member Functions

bool isValid () const override
 
const VVFloatpeds () const
 
const VFloatpedsMax () const
 
const VFloatpedsMean () const
 
const VFloatpedsMin () const
 
 PedsOnlyAnalysis (const uint32_t &key)
 
 PedsOnlyAnalysis ()
 
const VFloatpedsSpread () const
 
void print (std::stringstream &, uint32_t apv_number=0) override
 
const VVFloatraw () const
 
const VFloatrawMax () const
 
const VFloatrawMean () const
 
const VFloatrawMin () const
 
const VFloatrawSpread () const
 
void reset () override
 
void summary (std::stringstream &) const override
 
 ~PedsOnlyAnalysis () override
 
- Public Member Functions inherited from CommissioningAnalysis
virtual void addErrorCode (const std::string &error)
 
 CommissioningAnalysis (const uint32_t &key, const std::string &my_name)
 
 CommissioningAnalysis (const std::string &my_name)
 
const uint32_t & dcuId () const
 
void dcuId (const uint32_t &)
 
const uint32_t & detId () const
 
void detId (const uint32_t &)
 
const uint32_t & fecKey () const
 
void fecKey (const uint32_t &)
 
const uint32_t & fedKey () const
 
void fedKey (const uint32_t &)
 
const VStringgetErrorCodes () const
 
virtual void header (std::stringstream &) const
 
const std::string & myName () const
 
void setErrorCodes (const VString &errors)
 
virtual ~CommissioningAnalysis ()
 

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
 

Additional Inherited Members

- Public Types inherited from CommissioningAnalysis
typedef std::vector< bool > VBool
 
typedef std::vector< float > VFloat
 
typedef std::vector< uint16_t > VInt
 
typedef std::vector< std::string > VString
 
typedef std::vector< VBoolVVBool
 
typedef std::vector< VFloatVVFloat
 
typedef std::vector< VIntVVInt
 

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)

Definition at line 13 of file PedsOnlyAnalysis.cc.

14  : CommissioningAnalysis(key, "PedsOnlyAnalysis"),
15  peds_(2, VFloat(128, sistrip::invalid_)),
16  raw_(2, VFloat(128, sistrip::invalid_)),
25  legacy_(false) {}
std::vector< float > VFloat
tuple key
prepare the HTCondor submission files and eventually submit them
static const uint16_t invalid_
Definition: Constants.h:16
PedsOnlyAnalysis::PedsOnlyAnalysis ( )

Definition at line 29 of file PedsOnlyAnalysis.cc.

30  : CommissioningAnalysis("PedsOnlyAnalysis"),
31  peds_(2, VFloat(128, sistrip::invalid_)),
32  raw_(2, VFloat(128, sistrip::invalid_)),
41  legacy_(false) {}
std::vector< float > VFloat
static const uint16_t invalid_
Definition: Constants.h:16
PedsOnlyAnalysis::~PedsOnlyAnalysis ( )
inlineoverride

Definition at line 23 of file PedsOnlyAnalysis.h.

23 { ; }

Member Function Documentation

bool PedsOnlyAnalysis::isValid ( void  ) const
overridevirtual

Identifies if analysis is valid or not.

Reimplemented from CommissioningAnalysis.

Definition at line 61 of file PedsOnlyAnalysis.cc.

References relativeConstraints::empty, CommissioningAnalysis::getErrorCodes(), sistrip::maximum_, pedsMax_, pedsMean_, pedsMin_, pedsSpread_, rawMax_, rawMean_, rawMin_, and rawSpread_.

Referenced by ntupleDataFormat._Object::_checkIsValid(), PedsOnlyHistosUsingDb::create(), PedsOnlyHistograms::histoAnalysis(), print(), core.AutoHandle.AutoHandle::ReallyLoad(), and summary().

61  {
68 }
static const uint16_t maximum_
Definition: Constants.h:20
const VString & getErrorCodes() const
const PedsOnlyAnalysis::VVFloat & PedsOnlyAnalysis::peds ( ) const
inline

Definition at line 102 of file PedsOnlyAnalysis.h.

References peds_.

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

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

Definition at line 110 of file PedsOnlyAnalysis.h.

References pedsMax_.

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

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

Definition at line 105 of file PedsOnlyAnalysis.h.

References pedsMean_.

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

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

Definition at line 106 of file PedsOnlyAnalysis.h.

References pedsSpread_.

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

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

Prints analysis results.

Implements CommissioningAnalysis.

Definition at line 133 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.

133  {
134  if (iapv == 1 || iapv == 2) {
135  iapv--;
136  } else {
137  iapv = 0;
138  }
139 
140  if (peds_[iapv].size() < 128 || raw_[iapv].size() < 128) {
141  edm::LogWarning(mlCommissioning_) << "[" << myName() << "::" << __func__ << "]"
142  << " Unexpected number of pedestal/noise values: " << peds_[iapv].size() << ", "
143  << raw_[iapv].size();
144  return;
145  }
146 
147  header(ss);
148  ss << " Monitorables for APV number : " << iapv;
149  if (iapv == 0) {
150  ss << " (first of pair)";
151  } else if (iapv == 1) {
152  ss << " (second of pair)";
153  }
154  ss << std::endl;
155  ss << std::fixed << std::setprecision(2);
156  ss << " Example peds/noise for strips : "
157  << " 0, 31, 63, 127" << std::endl
158  << " Peds [ADC] : " << std::setw(6) << peds_[iapv][0] << ", " << std::setw(6)
159  << peds_[iapv][31] << ", " << std::setw(6) << peds_[iapv][63] << ", " << std::setw(6) << peds_[iapv][127]
160  << std::endl
161  << " Raw noise [ADC] : " << std::setw(6) << raw_[iapv][0] << ", " << std::setw(6) << raw_[iapv][31]
162  << ", " << std::setw(6) << raw_[iapv][63] << ", " << std::setw(6) << raw_[iapv][127] << std::endl;
163  ss << " Mean peds +/- spread [ADC] : " << pedsMean_[iapv] << " +/- " << pedsSpread_[iapv] << std::endl
164  << " Min/Max pedestal [ADC] : " << pedsMin_[iapv] << " <-> " << pedsMax_[iapv] << std::endl
165  << " Mean raw noise +/- spread [ADC] : " << rawMean_[iapv] << " +/- " << rawSpread_[iapv] << std::endl
166  << " Min/Max raw noise [ADC] : " << rawMin_[iapv] << " <-> " << rawMax_[iapv] << std::endl
167  << std::boolalpha << " isValid : " << isValid() << std::endl
168  << std::noboolalpha << " Error codes (found " << std::setw(2) << std::setfill(' ') << getErrorCodes().size()
169  << ") : ";
170  if (getErrorCodes().empty()) {
171  ss << "(none)";
172  } else {
173  VString::const_iterator istr = getErrorCodes().begin();
174  VString::const_iterator jstr = getErrorCodes().end();
175  for (; istr != jstr; ++istr) {
176  ss << *istr << " ";
177  }
178  }
179  ss << std::endl;
180 }
static const char mlCommissioning_[]
bool isValid() const override
virtual void header(std::stringstream &) const
Log< level::Warning, false > LogWarning
const VString & getErrorCodes() const
const std::string & myName() const
tuple size
Write out results.
const PedsOnlyAnalysis::VVFloat & PedsOnlyAnalysis::raw ( ) const
inline

Definition at line 103 of file PedsOnlyAnalysis.h.

References raw_.

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

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

Definition at line 112 of file PedsOnlyAnalysis.h.

References rawMax_.

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

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

Definition at line 107 of file PedsOnlyAnalysis.h.

References rawMean_.

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

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

Definition at line 113 of file PedsOnlyAnalysis.h.

References rawMin_.

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

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

Definition at line 108 of file PedsOnlyAnalysis.h.

References rawSpread_.

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

108 { return rawSpread_; }
void PedsOnlyAnalysis::reset ( void  )
overridevirtual

Resets analysis member data.

Implements CommissioningAnalysis.

Definition at line 45 of file PedsOnlyAnalysis.cc.

References sistrip::invalid_, legacy_, peds_, pedsMax_, pedsMean_, pedsMin_, pedsSpread_, raw_, rawMax_, rawMean_, rawMin_, and rawSpread_.

Referenced by MatrixReader.MatrixReader::__init__(), and MatrixReader.MatrixReader::showRaw().

45  {
56  legacy_ = false;
57 }
std::vector< float > VFloat
static const uint16_t invalid_
Definition: Constants.h:16
std::vector< VFloat > VVFloat
void PedsOnlyAnalysis::summary ( std::stringstream &  ss) const
overridevirtual

Overrides base method.

Reimplemented from CommissioningAnalysis.

Definition at line 72 of file PedsOnlyAnalysis.cc.

References sistrip::APV, SiStripFecKey::ccuAddr(), SiStripFecKey::ccuChan(), sistrip::extrainfo::commonMode_, sistrip::controlView_, sistrip::dir_, sistrip::dqmRoot_, sistrip::EXPERT_HISTO, 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(), fed_dqm_sourceclient-live_cfg::path, sistrip::extrainfo::pedestals_, sistrip::extrainfo::pedsAndCmSubNoise_, sistrip::extrainfo::pedsAndRawNoise_, sistrip::extrainfo::rawNoise_, SiStripEnumsAndStrings::runType(), AlCaHLTBitMon_QueryRunRegistry::string, and runGCPTkAlMap::title.

72  {
73  SiStripFecKey fec_key(fecKey());
74  SiStripFedKey fed_key(fedKey());
75 
77 
78  std::stringstream extra1, extra2, extra3;
79  if (legacy_) {
83  } else {
87  }
88 
90  type,
92  fed_key.key(),
94  fec_key.lldChan(),
95  extra1.str())
96  .title();
98  type,
100  fed_key.key(),
102  fec_key.lldChan(),
103  extra2.str())
104  .title();
106  type,
108  fed_key.key(),
109  sistrip::APV,
110  SiStripFecKey::i2cAddr(fec_key.lldChan(), true),
111  extra3.str())
112  .title();
114  type,
116  fed_key.key(),
117  sistrip::APV,
118  SiStripFecKey::i2cAddr(fec_key.lldChan(), false),
119  extra3.str())
120  .title();
121 
122  ss << " Summary"
123  << ":" << (isValid() ? "Valid" : "Invalid") << ":" << sistrip::controlView_ << ":" << fec_key.fecCrate() << "/"
124  << fec_key.fecSlot() << "/" << fec_key.fecRing() << "/" << fec_key.ccuAddr() << "/" << fec_key.ccuChan() << ":"
125  << sistrip::dqmRoot_ << sistrip::dir_ << "Collate" << sistrip::dir_
126  << SiStripFecKey(fec_key.fecCrate(), fec_key.fecSlot(), fec_key.fecRing(), fec_key.ccuAddr(), fec_key.ccuChan())
127  .path()
128  << ":" << title1 << ";" << title2 << ";" << title3 << ";" << title4 << std::endl;
129 }
static const char rawNoise_[]
const uint32_t & fedKey() const
static const char pedsAndRawNoise_[]
static const char dir_[]
Utility class that holds histogram title.
A container class for generic run and event-related info, information required by the commissioning a...
Definition: SiStripFedKey.h:56
const uint16_t & i2cAddr() const
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
static std::string runType(const sistrip::RunType &)
static const char controlView_[]
bool isValid() const override
static const char dqmRoot_[]
const uint32_t & fecKey() const
static const char commonMode_[]
static const char pedestals_[]
static const char pedsAndCmSubNoise_[]
const std::string & myName() const

Friends And Related Function Documentation

friend class PedsOnlyAlgorithm
friend

Definition at line 25 of file PedsOnlyAnalysis.h.

Member Data Documentation

bool PedsOnlyAnalysis::legacy_
private
VVFloat PedsOnlyAnalysis::peds_
private

Peds values.

Definition at line 65 of file PedsOnlyAnalysis.h.

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

VFloat PedsOnlyAnalysis::pedsMax_
private

Max peds value.

Definition at line 85 of file PedsOnlyAnalysis.h.

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

VFloat PedsOnlyAnalysis::pedsMean_
private

Mean peds value.

Definition at line 73 of file PedsOnlyAnalysis.h.

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

VFloat PedsOnlyAnalysis::pedsMin_
private

Min peds value.

Definition at line 88 of file PedsOnlyAnalysis.h.

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

VFloat PedsOnlyAnalysis::pedsSpread_
private

Rms spread in peds.

Definition at line 76 of file PedsOnlyAnalysis.h.

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

VVFloat PedsOnlyAnalysis::raw_
private

Raw noise values.

Definition at line 68 of file PedsOnlyAnalysis.h.

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

VFloat PedsOnlyAnalysis::rawMax_
private

Max raw noise value.

Definition at line 91 of file PedsOnlyAnalysis.h.

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

VFloat PedsOnlyAnalysis::rawMean_
private

Mean raw noise value.

Definition at line 79 of file PedsOnlyAnalysis.h.

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

VFloat PedsOnlyAnalysis::rawMin_
private

Min raw noise value.

Definition at line 94 of file PedsOnlyAnalysis.h.

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

VFloat PedsOnlyAnalysis::rawSpread_
private

Rms spread in raw noise.

Definition at line 82 of file PedsOnlyAnalysis.h.

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