CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Protected Member Functions
PedsFullNoiseSummaryFactory Class Reference

#include <PedsFullNoiseSummaryFactory.h>

Inheritance diagram for PedsFullNoiseSummaryFactory:
SummaryPlotFactory< CommissioningAnalysis * > SummaryPlotFactoryBase

Protected Member Functions

void extract (Iterator)
 
void format ()
 
- Protected Member Functions inherited from SummaryPlotFactoryBase
void fill (TH1 &summary_histo)
 
void init (const sistrip::Monitorable &, const sistrip::Presentation &, const sistrip::View &, const std::string &top_level_dir, const sistrip::Granularity &)
 
 SummaryPlotFactoryBase ()
 
 ~SummaryPlotFactoryBase ()
 

Additional Inherited Members

- Public Types inherited from SummaryPlotFactory< CommissioningAnalysis * >
typedef std::map< uint32_t,
CommissioningAnalysis * >
::const_iterator 
Iterator
 
- Public Member Functions inherited from SummaryPlotFactory< CommissioningAnalysis * >
void fill (TH1 &summary_histo)
 
uint32_t init (const sistrip::Monitorable &, const sistrip::Presentation &, const sistrip::View &, const std::string &top_level_dir, const sistrip::Granularity &, const std::map< uint32_t, CommissioningAnalysis * > &data)
 
 SummaryPlotFactory ()
 
virtual ~SummaryPlotFactory ()
 
- Protected Attributes inherited from SummaryPlotFactoryBase
SummaryGeneratorgenerator_
 
sistrip::Granularity gran_
 
std::string level_
 
sistrip::Monitorable mon_
 
sistrip::Presentation pres_
 
sistrip::View view_
 

Detailed Description

Definition at line 6 of file PedsFullNoiseSummaryFactory.h.

Member Function Documentation

void PedsFullNoiseSummaryFactory::extract ( Iterator  iter)
protectedvirtual

Reimplemented from SummaryPlotFactory< CommissioningAnalysis * >.

Definition at line 12 of file PedsFullNoiseSummaryFactory.cc.

References PedsFullNoiseAnalysis::chi2Prob(), PedsFullNoiseAnalysis::dead(), SummaryGenerator::fillMap(), SummaryPlotFactoryBase::generator_, SummaryPlotFactoryBase::gran_, sistrip::invalid_, PedsFullNoiseAnalysis::ksProb(), SummaryPlotFactoryBase::level_, sistrip::mlSummaryPlots_, SummaryPlotFactoryBase::mon_, SiStripEnumsAndStrings::monitorable(), PedsFullNoiseAnalysis::noise(), HLT_25ns14e33_v1_cff::noise, sistrip::NOISE_ALL_STRIPS, sistrip::NOISE_BIN_84_ALL_STRIPS, sistrip::NOISE_CHI2_ALL_STRIPS, sistrip::NOISE_GAUS_ALL_STRIPS, sistrip::NOISE_KS_ALL_STRIPS, sistrip::NOISE_MAX, sistrip::NOISE_MEAN, sistrip::NOISE_MIN, sistrip::NOISE_RMS_ALL_STRIPS, sistrip::NOISE_SIGNIF_ALL_STRIPS, sistrip::NOISE_SPREAD, PedsFullNoiseAnalysis::noiseBin84(), PedsFullNoiseAnalysis::noiseGaus(), PedsFullNoiseAnalysis::noiseMax(), PedsFullNoiseAnalysis::noiseMean(), PedsFullNoiseAnalysis::noiseMin(), PedsFullNoiseAnalysis::noiseRMS(), PedsFullNoiseAnalysis::noiseSignif(), PedsFullNoiseAnalysis::noiseSpread(), PedsFullNoiseAnalysis::noisy(), sistrip::NUM_OF_DEAD, sistrip::NUM_OF_NOISY, sistrip::PEDESTALS_ALL_STRIPS, sistrip::PEDESTALS_MAX, sistrip::PEDESTALS_MEAN, sistrip::PEDESTALS_MIN, sistrip::PEDESTALS_SPREAD, PedsFullNoiseAnalysis::peds(), PedsFullNoiseAnalysis::pedsMax(), PedsFullNoiseAnalysis::pedsMean(), PedsFullNoiseAnalysis::pedsMin(), PedsFullNoiseAnalysis::pedsSpread(), plotscripts::rms(), findQualityFiles::size, groupFilesInBlocks::temp, and relativeConstraints::value.

Referenced by BeautifulSoup.PageElement::_invert(), and BeautifulSoup.Tag::decompose().

12  {
13 
14  PedsFullNoiseAnalysis* anal = dynamic_cast<PedsFullNoiseAnalysis*>( iter->second );
15  if ( !anal ) { return; }
16 
17  std::vector< float > temp(128, 1. * sistrip::invalid_ );
18  std::vector< std::vector<float> > value( 2, temp );
19  std::vector< std::vector<float> > peds( 2, temp );
20  std::vector< std::vector<float> > noise( 2, temp );
21  std::vector< std::vector<float> > ks( 2, temp );
22  std::vector< std::vector<float> > noiseG( 2, temp );
23  std::vector< std::vector<float> > bin84( 2, temp );
24  std::vector< std::vector<float> > chi2( 2, temp );
25  std::vector< std::vector<float> > signif( 2, temp );
26  std::vector< std::vector<float> > rms( 2, temp );
27  peds[0] = anal->peds()[0];
28  peds[1] = anal->peds()[1];
29  noise[0] = anal->noise()[0];
30  noise[1] = anal->noise()[1];
31  ks[0] = anal->ksProb()[0]; // dummy values //replaced with ksProb now, wing
32  ks[1] = anal->ksProb()[1]; // dummy values
33  noiseG[0] = anal->noiseGaus()[0];
34  noiseG[1] = anal->noiseGaus()[1];
35  bin84[0] = anal->noiseBin84()[0];
36  bin84[1] = anal->noiseBin84()[1];
37  rms[0] = anal->noiseRMS()[0];
38  rms[1] = anal->noiseRMS()[1];
39  chi2[0] = anal->chi2Prob()[0];
40  chi2[1] = anal->chi2Prob()[1];
41  signif[0] = anal->noiseSignif()[0];
42  signif[1] = anal->noiseSignif()[1];
43  bool all_strips = false;
45  all_strips = true;
46  uint16_t bins = peds[0].size();
47  if ( peds[0].size() < peds[1].size() ) { bins = peds[1].size(); }
48  for ( uint16_t iped = 0; iped < bins; iped++ ) {
49  value[0][iped] = peds[0][iped];
50  value[1][iped] = peds[1][iped];
51  }
52  } else if ( mon_ == sistrip::PEDESTALS_MEAN ) {
53  value[0][0] = anal->pedsMean()[0];
54  value[1][0] = anal->pedsMean()[1];
55  } else if ( mon_ == sistrip::PEDESTALS_SPREAD ) {
56  value[0][0] = anal->pedsSpread()[0];
57  value[1][0] = anal->pedsSpread()[1];
58  } else if ( mon_ == sistrip::PEDESTALS_MAX ) {
59  value[0][0] = anal->pedsMax()[0];
60  value[1][0] = anal->pedsMax()[1];
61  } else if ( mon_ == sistrip::PEDESTALS_MIN ) {
62  value[0][0] = anal->pedsMin()[0];
63  value[1][0] = anal->pedsMin()[1];
64  } else if ( mon_ == sistrip::NOISE_ALL_STRIPS ) {
65  all_strips = true;
66  uint16_t bins = noise[0].size();
67  if ( noise[0].size() < noise[1].size() ) { bins = noise[1].size(); }
68  for ( uint16_t inoise = 0; inoise < bins; inoise++ ) {
69  value[0][inoise] = noise[0][inoise];
70  value[1][inoise] = noise[1][inoise];
71  }
72  } else if ( mon_ == sistrip::NOISE_KS_ALL_STRIPS ) {
73  all_strips = true;
74  uint16_t bins = ks[0].size();
75  if ( ks[0].size() < ks[1].size() ) { bins = ks[1].size(); }
76  for ( uint16_t iks = 0; iks < bins; iks++ ) {
77  value[0][iks] = ks[0][iks];
78  value[1][iks] = ks[1][iks];
79  }
80  } else if ( mon_ == sistrip::NOISE_CHI2_ALL_STRIPS ) {
81  all_strips = true;
82  uint16_t bins = chi2[0].size();
83  if ( ks[0].size() < chi2[1].size() ) { bins = chi2[1].size(); }
84  for ( uint16_t iks = 0; iks < bins; iks++ ) {
85  value[0][iks] = chi2[0][iks];
86  value[1][iks] = chi2[1][iks];
87  }
88  } else if ( mon_ == sistrip::NOISE_GAUS_ALL_STRIPS ) {
89  all_strips = true;
90  uint16_t bins = noiseG[0].size();
91  if ( noiseG[0].size() < noiseG[1].size() ) { bins = noiseG[1].size(); }
92  for ( uint16_t iks = 0; iks < bins; iks++ ) {
93  value[0][iks] = noiseG[0][iks];
94  value[1][iks] = noiseG[1][iks];
95  }
96  } else if ( mon_ == sistrip::NOISE_BIN_84_ALL_STRIPS ) {
97  all_strips = true;
98  uint16_t bins = bin84[0].size();
99  if ( bin84[0].size() < bin84[1].size() ) { bins = bin84[1].size(); }
100  for ( uint16_t iks = 0; iks < bins; iks++ ) {
101  value[0][iks] = bin84[0][iks];
102  value[1][iks] = bin84[1][iks];
103  }
104  } else if ( mon_ == sistrip::NOISE_RMS_ALL_STRIPS ) {
105  all_strips = true;
106  uint16_t bins = rms[0].size();
107  if ( rms[0].size() < rms[1].size() ) { bins = rms[1].size(); }
108  for ( uint16_t iks = 0; iks < bins; iks++ ) {
109  value[0][iks] = rms[0][iks];
110  value[1][iks] = rms[1][iks];
111  }
112  } else if ( mon_ == sistrip::NOISE_SIGNIF_ALL_STRIPS ) {
113  all_strips = true;
114  uint16_t bins = signif[0].size();
115  if ( signif[0].size() < signif[1].size() ) { bins = signif[1].size(); }
116  for ( uint16_t iks = 0; iks < bins; iks++ ) {
117  value[0][iks] = signif[0][iks];
118  value[1][iks] = signif[1][iks];
119  }
120  } else if ( mon_ == sistrip::NOISE_MEAN ) {
121  value[0][0] = anal->noiseMean()[0];
122  value[1][0] = anal->noiseMean()[1];
123  } else if ( mon_ == sistrip::NOISE_SPREAD ) {
124  value[0][0] = anal->noiseSpread()[0];
125  value[1][0] = anal->noiseSpread()[1];
126  } else if ( mon_ == sistrip::NOISE_MAX ) {
127  value[0][0] = anal->noiseMax()[0];
128  value[1][0] = anal->noiseMax()[1];
129  } else if ( mon_ == sistrip::NOISE_MIN ) {
130  value[0][0] = anal->noiseMin()[0];
131  value[1][0] = anal->noiseMin()[1];
132  } else if ( mon_ == sistrip::NUM_OF_DEAD ) {
133  value[0][0] = 1. * anal->dead()[0].size();
134  value[1][0] = 1. * anal->dead()[1].size();
135  } else if ( mon_ == sistrip::NUM_OF_NOISY ) {
136  value[0][0] = 1. * anal->noisy()[0].size();
137  value[1][0] = 1. * anal->noisy()[1].size();
138  } else {
140  << "[SummaryPlotFactory::" << __func__ << "]"
141  << " Unexpected monitorable: "
143  return;
144  }
145 
146  if ( !all_strips ) {
147 
150  iter->first,
151  value[0][0] );
152 
155  iter->first,
156  value[1][0] );
157 
158  }
159  else {
160 
161  for ( uint16_t istr = 0; istr < value[0].size(); istr++ ) {
164  iter->first,
165  value[0][istr] );
166  }
167 
168  for ( uint16_t istr = 0; istr < value[1].size(); istr++ ) {
171  iter->first,
172  value[1][istr] );
173  }
174  }
175 }
static std::string monitorable(const sistrip::Monitorable &)
sistrip::Monitorable mon_
const VVFloat & noiseRMS() const
const VVFloat & noiseSignif() const
const VVFloat & peds() const
const VFloat & noiseMax() const
const VVFloat & noiseGaus() const
const VVFloat & chi2Prob() const
Histogram-based analysis for pedestal run.
const VVInt & noisy() const
const VFloat & noiseMin() const
void fillMap(const std::string &top_level_dir, const sistrip::Granularity &, const uint32_t &key, const float &value, const float &error=0.)
const VFloat & pedsSpread() const
const VFloat & pedsMax() const
const VFloat & pedsMean() const
const VFloat & pedsMin() const
const VVFloat & noiseBin84() const
sistrip::Granularity gran_
static const char mlSummaryPlots_[]
const VVFloat & noise() const
SummaryGenerator * generator_
static const uint16_t invalid_
Definition: Constants.h:16
const VFloat & noiseSpread() const
const VVInt & dead() const
const VFloat & noiseMean() const
tuple size
Write out results.
const VVFloat & ksProb() const
void PedsFullNoiseSummaryFactory::format ( )
protectedvirtual

Reimplemented from SummaryPlotFactory< CommissioningAnalysis * >.

Definition at line 179 of file PedsFullNoiseSummaryFactory.cc.

References sistrip::mlSummaryPlots_, SummaryPlotFactoryBase::mon_, SiStripEnumsAndStrings::monitorable(), sistrip::NOISE_ALL_STRIPS, sistrip::NOISE_BIN_84_ALL_STRIPS, sistrip::NOISE_CHI2_ALL_STRIPS, sistrip::NOISE_GAUS_ALL_STRIPS, sistrip::NOISE_KS_ALL_STRIPS, sistrip::NOISE_MAX, sistrip::NOISE_MEAN, sistrip::NOISE_MIN, sistrip::NOISE_RMS_ALL_STRIPS, sistrip::NOISE_SPREAD, sistrip::NUM_OF_DEAD, sistrip::NUM_OF_NOISY, sistrip::PEDESTALS_ALL_STRIPS, sistrip::PEDESTALS_MAX, sistrip::PEDESTALS_MEAN, sistrip::PEDESTALS_MIN, and sistrip::PEDESTALS_SPREAD.

179  {
180 
182  generator_->axisLabel( "Pedestal value [adc]" );
183  } else if ( mon_ == sistrip::PEDESTALS_MEAN ) {
184  } else if ( mon_ == sistrip::PEDESTALS_SPREAD ) {
185  } else if ( mon_ == sistrip::PEDESTALS_MAX ) {
186  } else if ( mon_ == sistrip::PEDESTALS_MIN ) {
187  } else if ( mon_ == sistrip::NOISE_ALL_STRIPS ) {
188  generator_->axisLabel( "Noise [adc]" );
189  } else if ( mon_ == sistrip::NOISE_MEAN ) {
190  } else if ( mon_ == sistrip::NOISE_SPREAD ) {
191  } else if ( mon_ == sistrip::NOISE_MAX ) {
192  } else if ( mon_ == sistrip::NOISE_MIN ) {
193  } else if ( mon_ == sistrip::NUM_OF_DEAD ) {
194  } else if ( mon_ == sistrip::NUM_OF_NOISY ) {
195  } else if ( mon_ == sistrip::NOISE_KS_ALL_STRIPS ) {
196  generator_->axisLabel( "KS Prob." );
197  } else if ( mon_ == sistrip::NOISE_GAUS_ALL_STRIPS ) {
198  generator_->axisLabel( "Noise Gaus." );
199  } else if ( mon_ == sistrip::NOISE_BIN_84_ALL_STRIPS ) {
200  generator_->axisLabel( "Noise Bin 84." );
201  } else if ( mon_ == sistrip::NOISE_RMS_ALL_STRIPS ) {
202  generator_->axisLabel( "Noise RMS." );
203  } else if ( mon_ == sistrip::NOISE_CHI2_ALL_STRIPS ) {
204  generator_->axisLabel( "Chi2 Prob." );
205  } else {
207  << "[SummaryPlotFactory::" << __func__ << "]"
208  << " Unexpected SummaryHisto value:"
210  }
211 
212 }
static std::string monitorable(const sistrip::Monitorable &)
sistrip::Monitorable mon_
static const char mlSummaryPlots_[]
SummaryGenerator * generator_
void axisLabel(const std::string &)