CMS 3D CMS Logo

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 ()
 
 PedsOnlyAnalysis (const uint32_t &key)
 
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 std::string &my_name)
 
 CommissioningAnalysis (const uint32_t &key, 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() [1/2]

PedsOnlyAnalysis::PedsOnlyAnalysis ( const uint32_t &  key)

Definition at line 13 of file PedsOnlyAnalysis.cc.

◆ PedsOnlyAnalysis() [2/2]

PedsOnlyAnalysis::PedsOnlyAnalysis ( )

Definition at line 29 of file PedsOnlyAnalysis.cc.

◆ ~PedsOnlyAnalysis()

PedsOnlyAnalysis::~PedsOnlyAnalysis ( )
inlineoverride

Definition at line 23 of file PedsOnlyAnalysis.h.

23 { ; }

Member Function Documentation

◆ isValid()

bool PedsOnlyAnalysis::isValid ( void  ) const
overridevirtual

◆ peds()

const PedsOnlyAnalysis::VVFloat & PedsOnlyAnalysis::peds ( ) const
inline

Definition at line 102 of file PedsOnlyAnalysis.h.

102 { return peds_; }

References peds_.

◆ pedsMax()

const PedsOnlyAnalysis::VFloat & PedsOnlyAnalysis::pedsMax ( ) const
inline

Definition at line 110 of file PedsOnlyAnalysis.h.

110 { return pedsMax_; }

References pedsMax_.

◆ pedsMean()

const PedsOnlyAnalysis::VFloat & PedsOnlyAnalysis::pedsMean ( ) const
inline

Definition at line 105 of file PedsOnlyAnalysis.h.

105 { return pedsMean_; }

References pedsMean_.

◆ pedsMin()

const PedsOnlyAnalysis::VFloat & PedsOnlyAnalysis::pedsMin ( ) const
inline

Definition at line 111 of file PedsOnlyAnalysis.h.

111 { return pedsMin_; }

References pedsMin_.

◆ pedsSpread()

const PedsOnlyAnalysis::VFloat & PedsOnlyAnalysis::pedsSpread ( ) const
inline

Definition at line 106 of file PedsOnlyAnalysis.h.

106 { return pedsSpread_; }

References pedsSpread_.

◆ print()

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.

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 }

References relativeConstraints::empty, alignBH_cfg::fixed, CommissioningAnalysis::getErrorCodes(), CommissioningAnalysis::header(), isValid(), sistrip::mlCommissioning_, CommissioningAnalysis::myName(), peds_, pedsMax_, pedsMean_, pedsMin_, pedsSpread_, raw_, rawMax_, rawMean_, rawMin_, rawSpread_, findQualityFiles::size, and contentValuesCheck::ss.

◆ raw()

const PedsOnlyAnalysis::VVFloat & PedsOnlyAnalysis::raw ( ) const
inline

Definition at line 103 of file PedsOnlyAnalysis.h.

103 { return raw_; }

References raw_.

◆ rawMax()

const PedsOnlyAnalysis::VFloat & PedsOnlyAnalysis::rawMax ( ) const
inline

Definition at line 112 of file PedsOnlyAnalysis.h.

112 { return rawMax_; }

References rawMax_.

◆ rawMean()

const PedsOnlyAnalysis::VFloat & PedsOnlyAnalysis::rawMean ( ) const
inline

Definition at line 107 of file PedsOnlyAnalysis.h.

107 { return rawMean_; }

References rawMean_.

◆ rawMin()

const PedsOnlyAnalysis::VFloat & PedsOnlyAnalysis::rawMin ( ) const
inline

Definition at line 113 of file PedsOnlyAnalysis.h.

113 { return rawMin_; }

References rawMin_.

◆ rawSpread()

const PedsOnlyAnalysis::VFloat & PedsOnlyAnalysis::rawSpread ( ) const
inline

Definition at line 108 of file PedsOnlyAnalysis.h.

108 { return rawSpread_; }

References rawSpread_.

◆ reset()

void PedsOnlyAnalysis::reset ( void  )
overridevirtual

◆ summary()

void PedsOnlyAnalysis::summary ( std::stringstream &  ss) const
overridevirtual

Overrides base method.

Reimplemented from CommissioningAnalysis.

Definition at line 72 of file PedsOnlyAnalysis.cc.

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 }

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(), castor_dqm_sourceclient_file_cfg::path, sistrip::extrainfo::pedestals_, sistrip::extrainfo::pedsAndCmSubNoise_, sistrip::extrainfo::pedsAndRawNoise_, sistrip::extrainfo::rawNoise_, SiStripEnumsAndStrings::runType(), contentValuesCheck::ss, AlCaHLTBitMon_QueryRunRegistry::string, and runGCPTkAlMap::title.

Friends And Related Function Documentation

◆ PedsOnlyAlgorithm

friend class PedsOnlyAlgorithm
friend

Definition at line 25 of file PedsOnlyAnalysis.h.

Member Data Documentation

◆ legacy_

bool PedsOnlyAnalysis::legacy_
private

Definition at line 97 of file PedsOnlyAnalysis.h.

Referenced by reset(), and summary().

◆ peds_

VVFloat PedsOnlyAnalysis::peds_
private

Peds values.

Definition at line 65 of file PedsOnlyAnalysis.h.

Referenced by peds(), print(), and reset().

◆ pedsMax_

VFloat PedsOnlyAnalysis::pedsMax_
private

Max peds value.

Definition at line 85 of file PedsOnlyAnalysis.h.

Referenced by isValid(), pedsMax(), print(), and reset().

◆ pedsMean_

VFloat PedsOnlyAnalysis::pedsMean_
private

Mean peds value.

Definition at line 73 of file PedsOnlyAnalysis.h.

Referenced by isValid(), pedsMean(), print(), and reset().

◆ pedsMin_

VFloat PedsOnlyAnalysis::pedsMin_
private

Min peds value.

Definition at line 88 of file PedsOnlyAnalysis.h.

Referenced by isValid(), pedsMin(), print(), and reset().

◆ pedsSpread_

VFloat PedsOnlyAnalysis::pedsSpread_
private

Rms spread in peds.

Definition at line 76 of file PedsOnlyAnalysis.h.

Referenced by isValid(), pedsSpread(), print(), and reset().

◆ raw_

VVFloat PedsOnlyAnalysis::raw_
private

Raw noise values.

Definition at line 68 of file PedsOnlyAnalysis.h.

Referenced by print(), raw(), and reset().

◆ rawMax_

VFloat PedsOnlyAnalysis::rawMax_
private

Max raw noise value.

Definition at line 91 of file PedsOnlyAnalysis.h.

Referenced by isValid(), print(), rawMax(), and reset().

◆ rawMean_

VFloat PedsOnlyAnalysis::rawMean_
private

Mean raw noise value.

Definition at line 79 of file PedsOnlyAnalysis.h.

Referenced by isValid(), print(), rawMean(), and reset().

◆ rawMin_

VFloat PedsOnlyAnalysis::rawMin_
private

Min raw noise value.

Definition at line 94 of file PedsOnlyAnalysis.h.

Referenced by isValid(), print(), rawMin(), and reset().

◆ rawSpread_

VFloat PedsOnlyAnalysis::rawSpread_
private

Rms spread in raw noise.

Definition at line 82 of file PedsOnlyAnalysis.h.

Referenced by isValid(), print(), rawSpread(), and reset().

PedsOnlyAnalysis::raw_
VVFloat raw_
Definition: PedsOnlyAnalysis.h:68
CommissioningAnalysis::getErrorCodes
const VString & getErrorCodes() const
Definition: CommissioningAnalysis.h:131
SiStripEnumsAndStrings::runType
static std::string runType(const sistrip::RunType &)
Definition: SiStripEnumsAndStrings.cc:39
sistrip::extrainfo::commonMode_
static const char commonMode_[]
Definition: ConstantsForDqm.h:48
alignBH_cfg.fixed
fixed
Definition: alignBH_cfg.py:54
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
PedsOnlyAnalysis::rawMax_
VFloat rawMax_
Definition: PedsOnlyAnalysis.h:91
CommissioningAnalysis::fedKey
const uint32_t & fedKey() const
Definition: CommissioningAnalysis.h:134
sistrip::dir_
static const char dir_[]
Definition: ConstantsForDqm.h:17
PedsOnlyAnalysis::pedsSpread_
VFloat pedsSpread_
Definition: PedsOnlyAnalysis.h:76
sistrip::RunType
RunType
Definition: ConstantsForRunType.h:70
SiStripFedKey
A container class for generic run and event-related info, information required by the commissioning a...
Definition: SiStripFedKey.h:56
sistrip::extrainfo::pedsAndCmSubNoise_
static const char pedsAndCmSubNoise_[]
Definition: ConstantsForDqm.h:55
CommissioningAnalysis::VFloat
std::vector< float > VFloat
Definition: CommissioningAnalysis.h:30
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
sistrip::mlCommissioning_
static const char mlCommissioning_[]
Definition: ConstantsForLogger.h:15
CommissioningAnalysis::header
virtual void header(std::stringstream &) const
Definition: CommissioningAnalysis.cc:33
sistrip::EXPERT_HISTO
Definition: ConstantsForHistoType.h:29
sistrip::extrainfo::pedestals_
static const char pedestals_[]
Definition: ConstantsForDqm.h:45
SiStripFecKey
Utility class that identifies a position within the strip tracker control structure,...
Definition: SiStripFecKey.h:45
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CommissioningAnalysis::CommissioningAnalysis
CommissioningAnalysis()
Definition: CommissioningAnalysis.h:105
PedsOnlyAnalysis::rawSpread_
VFloat rawSpread_
Definition: PedsOnlyAnalysis.h:82
PedsOnlyAnalysis::rawMin_
VFloat rawMin_
Definition: PedsOnlyAnalysis.h:94
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
sistrip::maximum_
static const uint16_t maximum_
Definition: Constants.h:20
sistrip::controlView_
static const char controlView_[]
Definition: ConstantsForView.h:21
PedsOnlyAnalysis::pedsMean_
VFloat pedsMean_
Definition: PedsOnlyAnalysis.h:73
sistrip::APV
Definition: ConstantsForGranularity.h:79
PedsOnlyAnalysis::legacy_
bool legacy_
Definition: PedsOnlyAnalysis.h:97
sistrip::invalid_
static const uint16_t invalid_
Definition: Constants.h:16
sistrip::extrainfo::pedsAndRawNoise_
static const char pedsAndRawNoise_[]
Definition: ConstantsForDqm.h:53
sistrip::dqmRoot_
static const char dqmRoot_[]
Definition: ConstantsForDqm.h:28
PedsOnlyAnalysis::pedsMin_
VFloat pedsMin_
Definition: PedsOnlyAnalysis.h:88
SiStripFecKey::i2cAddr
const uint16_t & i2cAddr() const
Definition: SiStripFecKey.h:204
CommissioningAnalysis::fecKey
const uint32_t & fecKey() const
Definition: CommissioningAnalysis.h:133
PedsOnlyAnalysis::peds_
VVFloat peds_
Definition: PedsOnlyAnalysis.h:65
PedsOnlyAnalysis::rawMean_
VFloat rawMean_
Definition: PedsOnlyAnalysis.h:79
relativeConstraints.empty
bool empty
Definition: relativeConstraints.py:46
CommissioningAnalysis::myName
const std::string & myName() const
Definition: CommissioningAnalysis.h:139
SiStripHistoTitle
Utility class that holds histogram title.
Definition: SiStripHistoTitle.h:20
PedsOnlyAnalysis::isValid
bool isValid() const override
Definition: PedsOnlyAnalysis.cc:61
sistrip::extrainfo::rawNoise_
static const char rawNoise_[]
Definition: ConstantsForDqm.h:46
CommissioningAnalysis::VVFloat
std::vector< VFloat > VVFloat
Definition: CommissioningAnalysis.h:32
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
PedsOnlyAnalysis::pedsMax_
VFloat pedsMax_
Definition: PedsOnlyAnalysis.h:85
sistrip::FED_KEY
Definition: ConstantsForKeyType.h:30
crabWrapper.key
key
Definition: crabWrapper.py:19
sistrip::LLD_CHAN
Definition: ConstantsForGranularity.h:78
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443