CMS 3D CMS Logo

CalibrationScanSummaryFactory.cc
Go to the documentation of this file.
5 #include <iostream>
6 #include <sstream>
7 
8 using namespace sistrip;
9 
10 // -----------------------------------------------------------------------------
11 //
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];
44  } else if (mon_ == sistrip::CALIBRATION_BASELINE_TUNED) {
45  value[0] = anal->tunedBaseline()[0];
46  value[1] = anal->tunedBaseline()[1];
47  } else if (mon_ == sistrip::CALIBRATION_TURNON_TUNED) {
48  value[0] = anal->tunedTurnOn()[0];
49  value[1] = anal->tunedTurnOn()[1];
50  } else if (mon_ == sistrip::CALIBRATION_RISETIME_TUNED) {
51  value[0] = anal->tunedRiseTime()[0];
52  value[1] = anal->tunedRiseTime()[1];
53  } else if (mon_ == sistrip::CALIBRATION_DECAYTIME_TUNED) {
54  value[0] = anal->tunedDecayTime()[0];
55  value[1] = anal->tunedDecayTime()[1];
56  } else if (mon_ == sistrip::CALIBRATION_PEAKTIME_TUNED) {
57  value[0] = anal->tunedPeakTime()[0];
58  value[1] = anal->tunedPeakTime()[1];
59  } else if (mon_ == sistrip::CALIBRATION_UNDERSHOOT_TUNED) {
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];
65  } else if (mon_ == sistrip::CALIBRATION_SMEARING_TUNED) {
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 }
99 
100 //------------------------------------------------------------------------------
101 //
103  // Histogram formatting
105  generator_->axisLabel("Amplitude (ADC)");
106 
107  else if (mon_ == sistrip::CALIBRATION_BASELINE_TUNED)
108  generator_->axisLabel("Baseline (ADC)");
109 
110  else if (mon_ == sistrip::CALIBRATION_TURNON_TUNED)
111  generator_->axisLabel("Turn-On (ns)");
112 
113  else if (mon_ == sistrip::CALIBRATION_TAIL_TUNED)
114  generator_->axisLabel("Tail (%)");
115 
116  else if (mon_ == sistrip::CALIBRATION_RISETIME_TUNED)
117  generator_->axisLabel("Rise Time (ns)");
118 
119  else if (mon_ == sistrip::CALIBRATION_PEAKTIME_TUNED)
120  generator_->axisLabel("Peak Time (ns)");
121 
122  else if (mon_ == sistrip::CALIBRATION_DECAYTIME_TUNED)
123  generator_->axisLabel("Decay Time (ns)");
124 
125  else if (mon_ == sistrip::CALIBRATION_SMEARING_TUNED)
126  generator_->axisLabel("Smearing (ns)");
127 
128  else if (mon_ == sistrip::CALIBRATION_CHI2_TUNED)
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 }
sistrip::CALIBRATION_PEAKTIME_TUNED
Definition: ConstantsForMonitorable.h:355
SummaryGenerator::fillMap
void fillMap(const std::string &top_level_dir, const sistrip::Granularity &, const uint32_t &key, const float &value, const float &error=0.)
Definition: SummaryGenerator.cc:222
MessageLogger.h
sistrip::CALIBRATION_UNDERSHOOT_TUNED
Definition: ConstantsForMonitorable.h:356
SummaryPlotFactoryBase::mon_
sistrip::Monitorable mon_
Definition: SummaryPlotFactoryBase.h:25
SiStripKey::key
const uint32_t & key() const
Definition: SiStripKey.h:120
SiStripFecKey::lldChan
const uint16_t & lldChan() const
Definition: SiStripFecKey.h:203
CalibrationScanAnalysis
Analysis for calibration scans.
Definition: CalibrationScanAnalysis.h:19
sistrip::CALIBRATION_SMEARING_TUNED
Definition: ConstantsForMonitorable.h:358
sistrip::CALIBRATION_TAIL_TUNED
Definition: ConstantsForMonitorable.h:357
SiStripFecKey::fecCrate
const uint16_t & fecCrate() const
Definition: SiStripFecKey.h:198
Iterator
Definition: DQMStoreStats.h:94
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
SummaryPlotFactoryBase::level_
std::string level_
Definition: SummaryPlotFactoryBase.h:28
CalibrationScanAnalysis.h
CalibrationScanSummaryFactory.h
sistrip::CALIBRATION_DECAYTIME_TUNED
Definition: ConstantsForMonitorable.h:354
sistrip::CALIBRATION_RISETIME_TUNED
Definition: ConstantsForMonitorable.h:353
sistrip::CALIBRATION_CHI2_TUNED
Definition: ConstantsForMonitorable.h:359
SiStripFecKey::fecRing
const uint16_t & fecRing() const
Definition: SiStripFecKey.h:200
sistrip::CALIBRATION_TURNON_TUNED
Definition: ConstantsForMonitorable.h:352
dqm-mbProfile.format
format
Definition: dqm-mbProfile.py:16
SiStripFecKey
Utility class that identifies a position within the strip tracker control structure,...
Definition: SiStripFecKey.h:45
SiStripFecKey::ccuChan
const uint16_t & ccuChan() const
Definition: SiStripFecKey.h:202
SummaryPlotFactoryBase::generator_
SummaryGenerator * generator_
Definition: SummaryPlotFactoryBase.h:32
sistrip::CALIBRATION_VFS_BEST
Definition: ConstantsForMonitorable.h:363
value
Definition: value.py:1
CalibrationScanSummaryFactory::format
void format() override
Definition: CalibrationScanSummaryFactory.cc:102
sistrip::invalid_
static const uint16_t invalid_
Definition: Constants.h:16
SiStripEnumsAndStrings::monitorable
static std::string monitorable(const sistrip::Monitorable &)
Definition: SiStripEnumsAndStrings.cc:547
SummaryPlotFactoryBase::gran_
sistrip::Granularity gran_
Definition: SummaryPlotFactoryBase.h:29
SiStripFecKey::i2cAddr
const uint16_t & i2cAddr() const
Definition: SiStripFecKey.h:204
CalibrationScanSummaryFactory::extract
void extract(Iterator) override
Definition: CalibrationScanSummaryFactory.cc:12
sistrip::mlSummaryPlots_
static const char mlSummaryPlots_[]
Definition: ConstantsForLogger.h:26
relativeConstraints.value
value
Definition: relativeConstraints.py:53
SiStripEnumsAndStrings.h
SiStripFecKey::ccuAddr
const uint16_t & ccuAddr() const
Definition: SiStripFecKey.h:201
sistrip::CALIBRATION_BASELINE_TUNED
Definition: ConstantsForMonitorable.h:351
or
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::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
sistrip::CALIBRATION_VFS_TUNED
Definition: ConstantsForMonitorable.h:361
sistrip::CALIBRATION_ISHA_BEST
Definition: ConstantsForMonitorable.h:362
sistrip::CALIBRATION_ISHA_TUNED
Definition: ConstantsForMonitorable.h:360
sistrip
sistrip classes
Definition: SiStripQualityHelpers.h:14
conversion_template_cfg.anal
anal
Definition: conversion_template_cfg.py:16
SiStripFecKey::fecSlot
const uint16_t & fecSlot() const
Definition: SiStripFecKey.h:199
sistrip::CALIBRATION_AMPLITUDE_TUNED
Definition: ConstantsForMonitorable.h:350