CMS 3D CMS Logo

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

#include <CalibrationScanSummaryFactory.h>

Inheritance diagram for CalibrationScanSummaryFactory:
SummaryPlotFactory< CommissioningAnalysis * > SummaryPlotFactoryBase

Protected Member Functions

void extract (Iterator) override
 
void format () override
 
- 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 CalibrationScanSummaryFactory.h.

Member Function Documentation

void CalibrationScanSummaryFactory::extract ( Iterator  iter)
overrideprotectedvirtual

Reimplemented from SummaryPlotFactory< CommissioningAnalysis * >.

Definition at line 12 of file CalibrationScanSummaryFactory.cc.

References CalibrationScanAnalysis::bestISHA(), CalibrationScanAnalysis::bestVFS(), sistrip::CALIBRATION_AMPLITUDE_TUNED, sistrip::CALIBRATION_BASELINE_TUNED, sistrip::CALIBRATION_CHI2_TUNED, sistrip::CALIBRATION_DECAYTIME_TUNED, sistrip::CALIBRATION_ISHA_BEST, sistrip::CALIBRATION_ISHA_TUNED, sistrip::CALIBRATION_PEAKTIME_TUNED, sistrip::CALIBRATION_RISETIME_TUNED, sistrip::CALIBRATION_SMEARING_TUNED, sistrip::CALIBRATION_TAIL_TUNED, sistrip::CALIBRATION_TURNON_TUNED, sistrip::CALIBRATION_UNDERSHOOT_TUNED, sistrip::CALIBRATION_VFS_BEST, sistrip::CALIBRATION_VFS_TUNED, SiStripFecKey::ccuAddr(), SiStripFecKey::ccuChan(), SiStripFecKey::fecCrate(), SiStripFecKey::fecRing(), SiStripFecKey::fecSlot(), SummaryGenerator::fillMap(), diffTreeTool::format(), SummaryPlotFactoryBase::generator_, SummaryPlotFactoryBase::gran_, SiStripFecKey::i2cAddr(), sistrip::invalid_, SiStripKey::key(), SummaryPlotFactoryBase::level_, SiStripFecKey::lldChan(), sistrip::mlSummaryPlots_, SummaryPlotFactoryBase::mon_, SiStripEnumsAndStrings::monitorable(), CalibrationScanAnalysis::tunedAmplitude(), CalibrationScanAnalysis::tunedBaseline(), CalibrationScanAnalysis::tunedChi2(), CalibrationScanAnalysis::tunedDecayTime(), CalibrationScanAnalysis::tunedISHA(), CalibrationScanAnalysis::tunedPeakTime(), CalibrationScanAnalysis::tunedRiseTime(), CalibrationScanAnalysis::tunedSmearing(), CalibrationScanAnalysis::tunedTail(), CalibrationScanAnalysis::tunedTurnOn(), CalibrationScanAnalysis::tunedUndershoot(), CalibrationScanAnalysis::tunedVFS(), and relativeConstraints::value.

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

12  {
13  CalibrationScanAnalysis* anal = dynamic_cast<CalibrationScanAnalysis*>(iter->second);
14  if (!anal) {
15  return;
16  }
17 
18  SiStripFecKey lldKey = SiStripFecKey(iter->first);
19 
20  uint32_t key1 = SiStripFecKey(lldKey.fecCrate(),
21  lldKey.fecSlot(),
22  lldKey.fecRing(),
23  lldKey.ccuAddr(),
24  lldKey.ccuChan(),
25  lldKey.lldChan(),
26  lldKey.i2cAddr(lldKey.lldChan(), true))
27  .key();
28 
29  uint32_t key2 = SiStripFecKey(lldKey.fecCrate(),
30  lldKey.fecSlot(),
31  lldKey.fecRing(),
32  lldKey.ccuAddr(),
33  lldKey.ccuChan(),
34  lldKey.lldChan(),
35  lldKey.i2cAddr(lldKey.lldChan(), false))
36  .key();
37 
38  std::vector<float> value(2, 1 * sistrip::invalid_);
39 
40  // search for the best isha and VFS values cose to the optimal ones
42  value[0] = anal->tunedAmplitude()[0];
43  value[1] = anal->tunedAmplitude()[1];
45  value[0] = anal->tunedBaseline()[0];
46  value[1] = anal->tunedBaseline()[1];
48  value[0] = anal->tunedTurnOn()[0];
49  value[1] = anal->tunedTurnOn()[1];
51  value[0] = anal->tunedRiseTime()[0];
52  value[1] = anal->tunedRiseTime()[1];
54  value[0] = anal->tunedDecayTime()[0];
55  value[1] = anal->tunedDecayTime()[1];
57  value[0] = anal->tunedPeakTime()[0];
58  value[1] = anal->tunedPeakTime()[1];
60  value[0] = anal->tunedUndershoot()[0];
61  value[1] = anal->tunedUndershoot()[1];
62  } else if (mon_ == sistrip::CALIBRATION_TAIL_TUNED) {
63  value[0] = anal->tunedTail()[0];
64  value[1] = anal->tunedTail()[1];
66  value[0] = anal->tunedSmearing()[0];
67  value[1] = anal->tunedSmearing()[1];
68  } else if (mon_ == sistrip::CALIBRATION_CHI2_TUNED) {
69  value[0] = anal->tunedChi2()[0];
70  value[1] = anal->tunedChi2()[1];
71  } else if (mon_ == sistrip::CALIBRATION_ISHA_TUNED) {
72  value[0] = anal->tunedISHA()[0];
73  value[1] = anal->tunedISHA()[1];
74  } else if (mon_ == sistrip::CALIBRATION_VFS_TUNED) {
75  value[0] = anal->tunedVFS()[0];
76  value[1] = anal->tunedVFS()[1];
77  } else if (mon_ == sistrip::CALIBRATION_ISHA_BEST) {
78  value[0] = anal->bestISHA()[0];
79  value[1] = anal->bestISHA()[1];
80  } else if (mon_ == sistrip::CALIBRATION_VFS_BEST) {
81  value[0] = anal->bestVFS()[0];
82  value[1] = anal->bestVFS()[1];
83  } else {
84  edm::LogWarning(mlSummaryPlots_) << "[SummaryPlotFactory::" << __func__ << "]"
85  << " Unexpected monitorable: "
87  return;
88  }
89 
92 
95 
96  // set the x-axis
97  format();
98 }
static std::string monitorable(const sistrip::Monitorable &)
sistrip::Monitorable mon_
const uint16_t & fecRing() const
const uint16_t & lldChan() const
const uint16_t & fecSlot() const
const uint16_t & i2cAddr() const
const uint32_t & key() const
Definition: SiStripKey.h:120
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
void fillMap(const std::string &top_level_dir, const sistrip::Granularity &, const uint32_t &key, const float &value, const float &error=0.)
Analysis for calibration scans.
sistrip::Granularity gran_
const uint16_t & fecCrate() const
static const char mlSummaryPlots_[]
SummaryGenerator * generator_
const uint16_t & ccuAddr() const
static const uint16_t invalid_
Definition: Constants.h:16
const uint16_t & ccuChan() const
Log< level::Warning, false > LogWarning
void CalibrationScanSummaryFactory::format ( )
overrideprotectedvirtual

Reimplemented from SummaryPlotFactory< CommissioningAnalysis * >.

Definition at line 102 of file CalibrationScanSummaryFactory.cc.

References sistrip::CALIBRATION_AMPLITUDE_TUNED, sistrip::CALIBRATION_BASELINE_TUNED, sistrip::CALIBRATION_CHI2_TUNED, sistrip::CALIBRATION_DECAYTIME_TUNED, sistrip::CALIBRATION_ISHA_BEST, sistrip::CALIBRATION_ISHA_TUNED, sistrip::CALIBRATION_PEAKTIME_TUNED, sistrip::CALIBRATION_RISETIME_TUNED, sistrip::CALIBRATION_SMEARING_TUNED, sistrip::CALIBRATION_TAIL_TUNED, sistrip::CALIBRATION_TURNON_TUNED, sistrip::CALIBRATION_VFS_BEST, sistrip::CALIBRATION_VFS_TUNED, sistrip::mlSummaryPlots_, SummaryPlotFactoryBase::mon_, SiStripEnumsAndStrings::monitorable(), and or.

102  {
103  // Histogram formatting
105  generator_->axisLabel("Amplitude (ADC)");
106 
108  generator_->axisLabel("Baseline (ADC)");
109 
111  generator_->axisLabel("Turn-On (ns)");
112 
114  generator_->axisLabel("Tail (%)");
115 
117  generator_->axisLabel("Rise Time (ns)");
118 
120  generator_->axisLabel("Peak Time (ns)");
121 
123  generator_->axisLabel("Decay Time (ns)");
124 
126  generator_->axisLabel("Smearing (ns)");
127 
129  generator_->axisLabel("Chi2/ndf");
130 
132  generator_->axisLabel("VFS");
133 
135  generator_->axisLabel("ISHA");
136  else {
137  edm::LogWarning(mlSummaryPlots_) << "[SummaryPlotFactory::" << __func__ << "]"
138  << " Unexpected SummaryHisto value:"
140  }
141 }
static std::string monitorable(const sistrip::Monitorable &)
sistrip::Monitorable mon_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
static const char mlSummaryPlots_[]
SummaryGenerator * generator_
Log< level::Warning, false > LogWarning
void axisLabel(const std::string &)