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 }
static std::string monitorable(const sistrip::Monitorable &)
sistrip::Monitorable mon_
const uint16_t & ccuAddr() const
const uint16_t & ccuChan() const
const uint16_t & lldChan() const
sistrip classes
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.)
const uint16_t & i2cAddr() const
Analysis for calibration scans.
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
const uint32_t & key() const
Definition: SiStripKey.h:120
Definition: value.py:1
sistrip::Granularity gran_
static const char mlSummaryPlots_[]
SummaryGenerator * generator_
static const uint16_t invalid_
Definition: Constants.h:16
const uint16_t & fecSlot() const
Log< level::Warning, false > LogWarning
const uint16_t & fecRing() const
const uint16_t & fecCrate() const