CMS 3D CMS Logo

CalibrationScanAnalysis.cc
Go to the documentation of this file.
5 #include <iostream>
6 #include <sstream>
7 #include <iomanip>
8 #include <cmath>
9 
10 using namespace sistrip;
11 
26 const float CalibrationScanAnalysis::VFSrange_ = 20;
27 
28 CalibrationScanAnalysis::CalibrationScanAnalysis(const uint32_t& key, const bool& deconv)
29  : CommissioningAnalysis(key, "CalibrationScanAnalysis"), deconv_(deconv) {
44 }
45 
46 // ----------------------------------------------------------------------------
47 //
49  : CommissioningAnalysis("CalibrationScanAnalysis"), deconv_(deconv) {
52 
65 }
66 // ----------------------------------------------------------------------------
67 //
68 void CalibrationScanAnalysis::addOneCalibrationPoint(const std::string& key) // key of form isha_%d_vfs_%d
69 {
81 }
82 
83 // ----------------------------------------------------------------------------
84 //
100 
101  for (const auto& key : amplitude_) {
102  amplitude_[key.first] = VFloat(2, sistrip::invalid_);
103  tail_[key.first] = VFloat(2, sistrip::invalid_);
104  riseTime_[key.first] = VFloat(2, sistrip::invalid_);
105  turnOn_[key.first] = VFloat(2, sistrip::invalid_);
106  peakTime_[key.first] = VFloat(2, sistrip::invalid_);
108  baseline_[key.first] = VFloat(2, sistrip::invalid_);
109  smearing_[key.first] = VFloat(2, sistrip::invalid_);
110  chi2_[key.first] = VFloat(2, sistrip::invalid_);
111  decayTime_[key.first] = VFloat(2, sistrip::invalid_);
112  }
113 }
114 
115 // ----------------------------------------------------------------------------
116 //
117 void CalibrationScanAnalysis::print(std::stringstream& ss, uint32_t iapv) {
118  header(ss);
119  ss << " Monitorables for APV number : " << iapv;
120  if (iapv == 0) {
121  ss << " (first of pair)";
122  } else if (iapv == 1) {
123  ss << " (second of pair)";
124  }
125  ss << std::endl;
126  ss << " Looking at key " << amplitude_.begin()->first << std::endl;
127  ss << " Amplitude of the pulse : " << amplitude_[amplitude_.begin()->first][iapv] << std::endl
128  << " Baseline : " << baseline_[amplitude_.begin()->first][iapv] << std::endl
129  << " Rise time : " << riseTime_[amplitude_.begin()->first][iapv] << std::endl
130  << " Turn-on time : " << turnOn_[amplitude_.begin()->first][iapv] << std::endl
131  << " Peak time : " << peakTime_[amplitude_.begin()->first][iapv] << std::endl
132  << " Undershoot : " << undershoot_[amplitude_.begin()->first][iapv] << std::endl
133  << " Time constant : " << decayTime_[amplitude_.begin()->first][iapv] << std::endl
134  << " Smearing : " << smearing_[amplitude_.begin()->first][iapv] << std::endl
135  << " Chi2 : " << chi2_[amplitude_.begin()->first][iapv] << std::endl;
136  if (deconvMode()) {
137  ss << "Data obtained in deconvolution mode." << std::endl;
138  } else {
139  ss << "Data obtained in peak mode." << std::endl;
140  }
141 }
142 
143 bool CalibrationScanAnalysis::isValid() const { return true; }
CalibrationScanAnalysis::tunedSmearing_
VFloat tunedSmearing_
Definition: CalibrationScanAnalysis.h:120
CalibrationScanAnalysis::tunedISHA_
VInt tunedISHA_
Definition: CalibrationScanAnalysis.h:121
CalibrationScanAnalysis::tunedPeakTime_
VFloat tunedPeakTime_
Definition: CalibrationScanAnalysis.h:118
CalibrationScanAnalysis::chi2_
std::map< std::string, VFloat > chi2_
Definition: CalibrationScanAnalysis.h:101
MessageLogger.h
CalibrationScanAnalysis::minRiseTimeThreshold_
static const float minRiseTimeThreshold_
Definition: CalibrationScanAnalysis.h:82
CalibrationScanAnalysis::tunedTurnOn_
VFloat tunedTurnOn_
Definition: CalibrationScanAnalysis.h:118
CalibrationScanAnalysis::tunedAmplitude_
VFloat tunedAmplitude_
Definition: CalibrationScanAnalysis.h:116
CalibrationScanAnalysis::tunedTail_
VFloat tunedTail_
Definition: CalibrationScanAnalysis.h:116
CalibrationScanAnalysis::maxChi2Threshold_
static const float maxChi2Threshold_
Definition: CalibrationScanAnalysis.h:77
CalibrationScanAnalysis::maxISHAforVFSTune_
static const float maxISHAforVFSTune_
Definition: CalibrationScanAnalysis.h:87
CommissioningAnalysis::VFloat
std::vector< float > VFloat
Definition: CommissioningAnalysis.h:30
CalibrationScanAnalysis.h
CalibrationScanAnalysis::minAmplitudeThreshold_
static const float minAmplitudeThreshold_
Definition: CalibrationScanAnalysis.h:74
CalibrationScanAnalysis::riseTime_
std::map< std::string, VFloat > riseTime_
Definition: CalibrationScanAnalysis.h:94
CalibrationScanAnalysis::turnOn_
std::map< std::string, VFloat > turnOn_
Definition: CalibrationScanAnalysis.h:96
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
CalibrationScanAnalysis::isValid
bool isValid() const override
Definition: CalibrationScanAnalysis.cc:143
CommissioningAnalysis::header
virtual void header(std::stringstream &) const
Definition: CommissioningAnalysis.cc:33
CalibrationScanAnalysis::reset
void reset() override
Definition: CalibrationScanAnalysis.cc:85
CalibrationScanAnalysis::tunedDecayTime_
VFloat tunedDecayTime_
Definition: CalibrationScanAnalysis.h:117
CalibrationScanAnalysis::tunedVFS_
VInt tunedVFS_
Definition: CalibrationScanAnalysis.h:121
CalibrationScanAnalysis::tail_
std::map< std::string, VFloat > tail_
Definition: CalibrationScanAnalysis.h:93
CalibrationScanAnalysis::minISHAforVFSTune_
static const float minISHAforVFSTune_
Definition: CalibrationScanAnalysis.h:86
CalibrationScanAnalysis::smearing_
std::map< std::string, VFloat > smearing_
Definition: CalibrationScanAnalysis.h:100
CalibrationScanAnalysis::isvalid_
std::map< std::string, VBool > isvalid_
Definition: CalibrationScanAnalysis.h:102
CalibrationScanAnalysis::minDecayTimeThreshold_
static const float minDecayTimeThreshold_
Definition: CalibrationScanAnalysis.h:78
CalibrationScanAnalysis::minPeakTimeThreshold_
static const float minPeakTimeThreshold_
Definition: CalibrationScanAnalysis.h:80
CalibrationScanAnalysis::isha_
VInt isha_
Definition: CalibrationScanAnalysis.h:112
CalibrationScanAnalysis::amplitude_
std::map< std::string, VFloat > amplitude_
Definition: CalibrationScanAnalysis.h:92
CalibrationScanAnalysis::tunedUndershoot_
VFloat tunedUndershoot_
Definition: CalibrationScanAnalysis.h:119
CalibrationScanAnalysis::maxTurnOnThreshold_
static const float maxTurnOnThreshold_
Definition: CalibrationScanAnalysis.h:85
CalibrationScanAnalysis::maxPeakTimeThreshold_
static const float maxPeakTimeThreshold_
Definition: CalibrationScanAnalysis.h:81
CalibrationScanAnalysis::undershoot_
std::map< std::string, VFloat > undershoot_
Definition: CalibrationScanAnalysis.h:98
CalibrationScanAnalysis::print
void print(std::stringstream &, uint32_t not_used=0) override
Definition: CalibrationScanAnalysis.cc:117
CalibrationScanAnalysis::tunedChi2_
VFloat tunedChi2_
Definition: CalibrationScanAnalysis.h:120
CalibrationScanAnalysis::CalibrationScanAnalysis
CalibrationScanAnalysis(const uint32_t &key, const bool &deconv)
Definition: CalibrationScanAnalysis.cc:28
sistrip::invalid_
static const uint16_t invalid_
Definition: Constants.h:16
CalibrationScanAnalysis::minTurnOnThreshold_
static const float minTurnOnThreshold_
Definition: CalibrationScanAnalysis.h:84
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CalibrationScanAnalysis::tunedBaseline_
VFloat tunedBaseline_
Definition: CalibrationScanAnalysis.h:119
CommissioningAnalysis::VInt
std::vector< uint16_t > VInt
Definition: CommissioningAnalysis.h:34
CommissioningAnalysis
Abstract base for derived classes that provide analysis of commissioning histograms.
Definition: CommissioningAnalysis.h:18
CalibrationScanAnalysis::peakTime_
std::map< std::string, VFloat > peakTime_
Definition: CalibrationScanAnalysis.h:97
CalibrationScanAnalysis::maxRiseTimeThreshold_
static const float maxRiseTimeThreshold_
Definition: CalibrationScanAnalysis.h:83
CalibrationScanAnalysis::maxBaselineThreshold_
static const float maxBaselineThreshold_
Definition: CalibrationScanAnalysis.h:76
CalibrationScanAnalysis::maxDecayTimeThreshold_
static const float maxDecayTimeThreshold_
Definition: CalibrationScanAnalysis.h:79
SiStripEnumsAndStrings.h
SiStripHistoTitle.h
CalibrationScanAnalysis::VFSrange_
static const float VFSrange_
Definition: CalibrationScanAnalysis.h:88
CalibrationScanAnalysis::tunedRiseTime_
VFloat tunedRiseTime_
Definition: CalibrationScanAnalysis.h:117
CalibrationScanAnalysis::deconvMode
bool deconvMode()
Definition: CalibrationScanAnalysis.h:68
CalibrationScanAnalysis::vfs_
VInt vfs_
Definition: CalibrationScanAnalysis.h:113
sistrip
sistrip classes
Definition: EnsembleCalibrationLA.cc:10
crabWrapper.key
key
Definition: crabWrapper.py:19
CommissioningAnalysis::VBool
std::vector< bool > VBool
Definition: CommissioningAnalysis.h:38
CalibrationScanAnalysis::minBaselineThreshold_
static const float minBaselineThreshold_
Definition: CalibrationScanAnalysis.h:75
CalibrationScanAnalysis::decayTime_
std::map< std::string, VFloat > decayTime_
Definition: CalibrationScanAnalysis.h:95
CalibrationScanAnalysis::baseline_
std::map< std::string, VFloat > baseline_
Definition: CalibrationScanAnalysis.h:99
CalibrationScanAnalysis::addOneCalibrationPoint
void addOneCalibrationPoint(const std::string &key)
Definition: CalibrationScanAnalysis.cc:68