CMS 3D CMS Logo

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(), cmsPerfStripChart::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.

12  {
13 
14  CalibrationScanAnalysis* anal = dynamic_cast<CalibrationScanAnalysis*>( iter->second );
15  if ( !anal ) { return; }
16 
17  SiStripFecKey lldKey = SiStripFecKey(iter->first);
18 
19  uint32_t key1 = SiStripFecKey(lldKey.fecCrate(),
20  lldKey.fecSlot(),
21  lldKey.fecRing(),
22  lldKey.ccuAddr(),
23  lldKey.ccuChan(),
24  lldKey.lldChan(),
25  lldKey.i2cAddr(lldKey.lldChan(),true)).key();
26 
27  uint32_t key2 = SiStripFecKey(lldKey.fecCrate(),
28  lldKey.fecSlot(),
29  lldKey.fecRing(),
30  lldKey.ccuAddr(),
31  lldKey.ccuChan(),
32  lldKey.lldChan(),
33  lldKey.i2cAddr(lldKey.lldChan(),false)).key();
34 
35  std::vector<float> value (2,1*sistrip::invalid_);
36 
37  // search for the best isha and VFS values cose to the optimal ones
39  value[0] = anal->tunedAmplitude()[0];
40  value[1] = anal->tunedAmplitude()[1];
41  }
43  value[0] = anal->tunedBaseline()[0];
44  value[1] = anal->tunedBaseline()[1];
45  }
47  value[0] = anal->tunedTurnOn()[0];
48  value[1] = anal->tunedTurnOn()[1];
49  }
51  value[0] = anal->tunedRiseTime()[0];
52  value[1] = anal->tunedRiseTime()[1];
53  }
55  value[0] = anal->tunedDecayTime()[0];
56  value[1] = anal->tunedDecayTime()[1];
57  }
59  value[0] = anal->tunedPeakTime()[0];
60  value[1] = anal->tunedPeakTime()[1];
61  }
63  value[0] = anal->tunedUndershoot()[0];
64  value[1] = anal->tunedUndershoot()[1];
65  }
67  value[0] = anal->tunedTail()[0];
68  value[1] = anal->tunedTail()[1];
69  }
71  value[0] = anal->tunedSmearing()[0];
72  value[1] = anal->tunedSmearing()[1];
73  }
75  value[0] = anal->tunedChi2()[0];
76  value[1] = anal->tunedChi2()[1];
77  }
79  value[0] = anal->tunedISHA()[0];
80  value[1] = anal->tunedISHA()[1];
81  }
82  else if ( mon_ == sistrip::CALIBRATION_VFS_TUNED) {
83  value[0] = anal->tunedVFS()[0];
84  value[1] = anal->tunedVFS()[1];
85  }
86  else if ( mon_ == sistrip::CALIBRATION_ISHA_BEST) {
87  value[0] = anal->bestISHA()[0];
88  value[1] = anal->bestISHA()[1];
89  }
90  else if ( mon_ == sistrip::CALIBRATION_VFS_BEST) {
91  value[0] = anal->bestVFS()[0];
92  value[1] = anal->bestVFS()[1];
93  }
94  else {
96  << "[SummaryPlotFactory::" << __func__ << "]"
97  << " Unexpected monitorable: "
99  return;
100  }
101 
104  key1,
105  value[0] );
106 
109  key2,
110  value[1] );
111 
112  // set the x-axis
113  format();
114 
115 }
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:125
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.
Definition: value.py:1
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
void CalibrationScanSummaryFactory::format ( )
overrideprotectedvirtual

Reimplemented from SummaryPlotFactory< CommissioningAnalysis * >.

Definition at line 119 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.

119  {
120 
121  // Histogram formatting
123  generator_->axisLabel( "Amplitude (ADC)" );
124 
126  generator_->axisLabel( "Baseline (ADC)" );
127 
129  generator_->axisLabel( "Turn-On (ns)" );
130 
132  generator_->axisLabel( "Tail (%)" );
133 
135  generator_->axisLabel( "Rise Time (ns)" );
136 
138  generator_->axisLabel( "Peak Time (ns)" );
139 
141  generator_->axisLabel( "Decay Time (ns)" );
142 
144  generator_->axisLabel( "Smearing (ns)" );
145 
147  generator_->axisLabel( "Chi2/ndf" );
148 
151  generator_->axisLabel( "VFS" );
152 
155  generator_->axisLabel( "ISHA" );
156  else {
158  << "[SummaryPlotFactory::" << __func__ << "]"
159  << " Unexpected SummaryHisto value:"
161  }
162 }
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::EventID const &, edm::Timestamp const & > 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_
void axisLabel(const std::string &)