CMS 3D CMS Logo

CalibrationAnalysis.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 
24 
33 
34 CalibrationAnalysis::CalibrationAnalysis(const uint32_t& key, const bool& deconv)
35  : CommissioningAnalysis(key, "CalibrationAnalysis"),
36  amplitude_(2, VFloat(128, sistrip::invalid_)),
37  tail_(2, VFloat(128, sistrip::invalid_)),
38  riseTime_(2, VFloat(128, sistrip::invalid_)),
39  decayTime_(2, VFloat(128, sistrip::invalid_)),
40  turnOn_(2, VFloat(128, sistrip::invalid_)),
41  peakTime_(2, VFloat(128, sistrip::invalid_)),
42  undershoot_(2, VFloat(128, sistrip::invalid_)),
43  baseline_(2, VFloat(128, sistrip::invalid_)),
44  smearing_(2, VFloat(128, sistrip::invalid_)),
45  chi2_(2, VFloat(128, sistrip::invalid_)),
46  isvalid_(2, VBool(128, sistrip::invalid_)),
47  mean_amplitude_(2, sistrip::invalid_),
48  mean_tail_(2, sistrip::invalid_),
49  mean_riseTime_(2, sistrip::invalid_),
50  mean_decayTime_(2, sistrip::invalid_),
51  mean_turnOn_(2, sistrip::invalid_),
52  mean_peakTime_(2, sistrip::invalid_),
53  mean_undershoot_(2, sistrip::invalid_),
54  mean_baseline_(2, sistrip::invalid_),
55  mean_smearing_(2, sistrip::invalid_),
56  mean_chi2_(2, sistrip::invalid_),
57  min_amplitude_(2, sistrip::invalid_),
58  min_tail_(2, sistrip::invalid_),
59  min_riseTime_(2, sistrip::invalid_),
60  min_decayTime_(2, sistrip::invalid_),
61  min_turnOn_(2, sistrip::invalid_),
62  min_peakTime_(2, sistrip::invalid_),
63  min_undershoot_(2, sistrip::invalid_),
64  min_baseline_(2, sistrip::invalid_),
65  min_smearing_(2, sistrip::invalid_),
66  min_chi2_(2, sistrip::invalid_),
67  max_amplitude_(2, sistrip::invalid_),
68  max_tail_(2, sistrip::invalid_),
69  max_riseTime_(2, sistrip::invalid_),
70  max_decayTime_(2, sistrip::invalid_),
71  max_turnOn_(2, sistrip::invalid_),
72  max_peakTime_(2, sistrip::invalid_),
73  max_undershoot_(2, sistrip::invalid_),
74  max_baseline_(2, sistrip::invalid_),
75  max_smearing_(2, sistrip::invalid_),
76  max_chi2_(2, sistrip::invalid_),
77  spread_amplitude_(2, sistrip::invalid_),
78  spread_tail_(2, sistrip::invalid_),
79  spread_riseTime_(2, sistrip::invalid_),
80  spread_decayTime_(2, sistrip::invalid_),
81  spread_turnOn_(2, sistrip::invalid_),
82  spread_peakTime_(2, sistrip::invalid_),
83  spread_undershoot_(2, sistrip::invalid_),
84  spread_baseline_(2, sistrip::invalid_),
85  spread_smearing_(2, sistrip::invalid_),
86  spread_chi2_(2, sistrip::invalid_),
87  deconv_(deconv),
88  calChan_(0) {
89  ;
90 }
91 
92 // ----------------------------------------------------------------------------
93 //
95  : CommissioningAnalysis("CalibrationAnalysis"),
96  amplitude_(2, VFloat(128, sistrip::invalid_)),
97  tail_(2, VFloat(128, sistrip::invalid_)),
98  riseTime_(2, VFloat(128, sistrip::invalid_)),
99  decayTime_(2, VFloat(128, sistrip::invalid_)),
100  turnOn_(2, VFloat(128, sistrip::invalid_)),
101  peakTime_(2, VFloat(128, sistrip::invalid_)),
102  undershoot_(2, VFloat(128, sistrip::invalid_)),
103  baseline_(2, VFloat(128, sistrip::invalid_)),
104  smearing_(2, VFloat(128, sistrip::invalid_)),
105  chi2_(2, VFloat(128, sistrip::invalid_)),
106  isvalid_(2, VBool(128, sistrip::invalid_)),
107  mean_amplitude_(2, sistrip::invalid_),
108  mean_tail_(2, sistrip::invalid_),
109  mean_riseTime_(2, sistrip::invalid_),
110  mean_decayTime_(2, sistrip::invalid_),
111  mean_turnOn_(2, sistrip::invalid_),
112  mean_peakTime_(2, sistrip::invalid_),
113  mean_undershoot_(2, sistrip::invalid_),
114  mean_baseline_(2, sistrip::invalid_),
115  mean_smearing_(2, sistrip::invalid_),
116  mean_chi2_(2, sistrip::invalid_),
117  min_amplitude_(2, sistrip::invalid_),
118  min_tail_(2, sistrip::invalid_),
119  min_riseTime_(2, sistrip::invalid_),
120  min_decayTime_(2, sistrip::invalid_),
121  min_turnOn_(2, sistrip::invalid_),
122  min_peakTime_(2, sistrip::invalid_),
123  min_undershoot_(2, sistrip::invalid_),
124  min_baseline_(2, sistrip::invalid_),
125  min_smearing_(2, sistrip::invalid_),
126  min_chi2_(2, sistrip::invalid_),
127  max_amplitude_(2, sistrip::invalid_),
128  max_tail_(2, sistrip::invalid_),
129  max_riseTime_(2, sistrip::invalid_),
130  max_decayTime_(2, sistrip::invalid_),
131  max_turnOn_(2, sistrip::invalid_),
132  max_peakTime_(2, sistrip::invalid_),
133  max_undershoot_(2, sistrip::invalid_),
134  max_baseline_(2, sistrip::invalid_),
135  max_smearing_(2, sistrip::invalid_),
136  max_chi2_(2, sistrip::invalid_),
137  spread_amplitude_(2, sistrip::invalid_),
138  spread_tail_(2, sistrip::invalid_),
139  spread_riseTime_(2, sistrip::invalid_),
140  spread_decayTime_(2, sistrip::invalid_),
141  spread_turnOn_(2, sistrip::invalid_),
142  spread_peakTime_(2, sistrip::invalid_),
143  spread_undershoot_(2, sistrip::invalid_),
144  spread_baseline_(2, sistrip::invalid_),
145  spread_smearing_(2, sistrip::invalid_),
146  spread_chi2_(2, sistrip::invalid_),
147  deconv_(deconv),
148  calChan_(0) {
149  ;
150 }
151 
152 // ----------------------------------------------------------------------------
153 //
155  calChan_ = 0;
156 
168 
179 
190 
201 
212 }
213 
214 // ----------------------------------------------------------------------------
215 //
216 void CalibrationAnalysis::print(std::stringstream& ss, uint32_t iapv) {
217  header(ss);
218  ss << " Monitorables for APV number : " << iapv;
219  if (iapv == 0) {
220  ss << " (first of pair)";
221  } else if (iapv == 1) {
222  ss << " (second of pair)";
223  }
224  ss << std::endl;
225  ss << " Mean Amplitude of the pulse : " << mean_amplitude_[iapv] << std::endl
226  << " Mean Tail amplitude after 150ns : " << mean_tail_[iapv] << std::endl
227  << " Mean Rise time : " << mean_riseTime_[iapv] << std::endl
228  << " Mean Time constant : " << mean_decayTime_[iapv] << std::endl
229  << " Mean Turn on time : " << mean_turnOn_[iapv] << std::endl
230  << " Mean peak time : " << mean_peakTime_[iapv] << std::endl
231  << " Mean undershoot amplitude : " << mean_undershoot_[iapv] << std::endl
232  << " Mean baseline amplitude : " << mean_baseline_[iapv] << std::endl
233  << " Mean Smearing parameter : " << mean_smearing_[iapv] << std::endl
234  << " Mean Chi2 of the fit : " << mean_chi2_[iapv] << std::endl;
235  if (deconvMode()) {
236  ss << "Data obtained in deconvolution mode." << std::endl;
237  } else {
238  ss << "Data obtained in peak mode." << std::endl;
239  }
240 }
241 
242 bool CalibrationAnalysis::isValid() const { return true; }
CalibrationAnalysis::maxDecayTimeThresholdDeco_
static const float maxDecayTimeThresholdDeco_
Definition: CalibrationAnalysis.h:116
CommissioningAnalysis::VVBool
std::vector< VBool > VVBool
Definition: CommissioningAnalysis.h:40
MessageLogger.h
CalibrationAnalysis::isvalid_
VVBool isvalid_
Definition: CalibrationAnalysis.h:127
CalibrationAnalysis::maxPeakTimeThresholdDeco_
static const float maxPeakTimeThresholdDeco_
Definition: CalibrationAnalysis.h:118
CalibrationAnalysis::minBaselineThreshold_
static const float minBaselineThreshold_
Definition: CalibrationAnalysis.h:102
CalibrationAnalysis::minRiseTimeThresholdDeco_
static const float minRiseTimeThresholdDeco_
Definition: CalibrationAnalysis.h:119
CalibrationAnalysis::maxTurnOnThreshold_
static const float maxTurnOnThreshold_
Definition: CalibrationAnalysis.h:113
CalibrationAnalysis::chi2_
VVFloat chi2_
Definition: CalibrationAnalysis.h:126
CalibrationAnalysis::spread_turnOn_
VFloat spread_turnOn_
Definition: CalibrationAnalysis.h:134
CalibrationAnalysis::min_turnOn_
VFloat min_turnOn_
Definition: CalibrationAnalysis.h:130
CalibrationAnalysis::maxPeakTimeThreshold_
static const float maxPeakTimeThreshold_
Definition: CalibrationAnalysis.h:109
CalibrationAnalysis::amplitude_
VVFloat amplitude_
Definition: CalibrationAnalysis.h:126
CalibrationAnalysis::mean_baseline_
VFloat mean_baseline_
Definition: CalibrationAnalysis.h:128
CalibrationAnalysis::maxRiseTimeThresholdDeco_
static const float maxRiseTimeThresholdDeco_
Definition: CalibrationAnalysis.h:120
CalibrationAnalysis::deconvMode
bool deconvMode()
Definition: CalibrationAnalysis.h:94
CalibrationAnalysis::mean_decayTime_
VFloat mean_decayTime_
Definition: CalibrationAnalysis.h:128
CalibrationAnalysis::decayTime_
VVFloat decayTime_
Definition: CalibrationAnalysis.h:126
CalibrationAnalysis::min_riseTime_
VFloat min_riseTime_
Definition: CalibrationAnalysis.h:130
CalibrationAnalysis::peakTime_
VVFloat peakTime_
Definition: CalibrationAnalysis.h:126
CalibrationAnalysis::print
void print(std::stringstream &, uint32_t not_used=0) override
Definition: CalibrationAnalysis.cc:216
CalibrationAnalysis.h
CalibrationAnalysis::spread_riseTime_
VFloat spread_riseTime_
Definition: CalibrationAnalysis.h:134
CalibrationAnalysis::mean_undershoot_
VFloat mean_undershoot_
Definition: CalibrationAnalysis.h:128
CommissioningAnalysis::VFloat
std::vector< float > VFloat
Definition: CommissioningAnalysis.h:30
CalibrationAnalysis::minPeakTimeThresholdDeco_
static const float minPeakTimeThresholdDeco_
Definition: CalibrationAnalysis.h:117
CalibrationAnalysis::min_decayTime_
VFloat min_decayTime_
Definition: CalibrationAnalysis.h:130
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
CalibrationAnalysis::min_peakTime_
VFloat min_peakTime_
Definition: CalibrationAnalysis.h:130
CalibrationAnalysis::minRiseTimeThreshold_
static const float minRiseTimeThreshold_
Definition: CalibrationAnalysis.h:110
CalibrationAnalysis::reset
void reset() override
Definition: CalibrationAnalysis.cc:154
CalibrationAnalysis::spread_baseline_
VFloat spread_baseline_
Definition: CalibrationAnalysis.h:134
CalibrationAnalysis::max_riseTime_
VFloat max_riseTime_
Definition: CalibrationAnalysis.h:132
CalibrationAnalysis::min_amplitude_
VFloat min_amplitude_
Definition: CalibrationAnalysis.h:130
CalibrationAnalysis::mean_amplitude_
VFloat mean_amplitude_
Definition: CalibrationAnalysis.h:128
CommissioningAnalysis::header
virtual void header(std::stringstream &) const
Definition: CommissioningAnalysis.cc:33
CalibrationAnalysis::mean_smearing_
VFloat mean_smearing_
Definition: CalibrationAnalysis.h:128
CalibrationAnalysis::CalibrationAnalysis
CalibrationAnalysis(const uint32_t &key, const bool &deconv)
Definition: CalibrationAnalysis.cc:34
CalibrationAnalysis::minDecayTimeThresholdDeco_
static const float minDecayTimeThresholdDeco_
Definition: CalibrationAnalysis.h:115
CalibrationAnalysis::mean_riseTime_
VFloat mean_riseTime_
Definition: CalibrationAnalysis.h:128
CalibrationAnalysis::mean_chi2_
VFloat mean_chi2_
Definition: CalibrationAnalysis.h:128
CalibrationAnalysis::spread_smearing_
VFloat spread_smearing_
Definition: CalibrationAnalysis.h:134
CalibrationAnalysis::mean_turnOn_
VFloat mean_turnOn_
Definition: CalibrationAnalysis.h:128
CalibrationAnalysis::spread_decayTime_
VFloat spread_decayTime_
Definition: CalibrationAnalysis.h:134
CalibrationAnalysis::spread_peakTime_
VFloat spread_peakTime_
Definition: CalibrationAnalysis.h:134
CalibrationAnalysis::minPeakTimeThreshold_
static const float minPeakTimeThreshold_
Definition: CalibrationAnalysis.h:108
CalibrationAnalysis::minTurnOnThresholdDeco_
static const float minTurnOnThresholdDeco_
Definition: CalibrationAnalysis.h:121
CalibrationAnalysis::baseline_
VVFloat baseline_
Definition: CalibrationAnalysis.h:126
CalibrationAnalysis::max_smearing_
VFloat max_smearing_
Definition: CalibrationAnalysis.h:132
CalibrationAnalysis::max_peakTime_
VFloat max_peakTime_
Definition: CalibrationAnalysis.h:132
CalibrationAnalysis::spread_tail_
VFloat spread_tail_
Definition: CalibrationAnalysis.h:134
CalibrationAnalysis::spread_undershoot_
VFloat spread_undershoot_
Definition: CalibrationAnalysis.h:134
CalibrationAnalysis::max_chi2_
VFloat max_chi2_
Definition: CalibrationAnalysis.h:132
CalibrationAnalysis::minTurnOnThreshold_
static const float minTurnOnThreshold_
Definition: CalibrationAnalysis.h:112
CalibrationAnalysis::spread_chi2_
VFloat spread_chi2_
Definition: CalibrationAnalysis.h:134
CalibrationAnalysis::riseTime_
VVFloat riseTime_
Definition: CalibrationAnalysis.h:126
CalibrationAnalysis::max_decayTime_
VFloat max_decayTime_
Definition: CalibrationAnalysis.h:132
sistrip::invalid_
static const uint16_t invalid_
Definition: Constants.h:16
CalibrationAnalysis::max_baseline_
VFloat max_baseline_
Definition: CalibrationAnalysis.h:132
CalibrationAnalysis::minAmplitudeThreshold_
static const float minAmplitudeThreshold_
Definition: CalibrationAnalysis.h:101
CalibrationAnalysis::maxDecayTimeThreshold_
static const float maxDecayTimeThreshold_
Definition: CalibrationAnalysis.h:107
CommissioningAnalysis
Abstract base for derived classes that provide analysis of commissioning histograms.
Definition: CommissioningAnalysis.h:18
CalibrationAnalysis::min_baseline_
VFloat min_baseline_
Definition: CalibrationAnalysis.h:130
CalibrationAnalysis::calChan_
int calChan_
Definition: CalibrationAnalysis.h:141
CalibrationAnalysis::mean_peakTime_
VFloat mean_peakTime_
Definition: CalibrationAnalysis.h:128
CalibrationAnalysis::max_undershoot_
VFloat max_undershoot_
Definition: CalibrationAnalysis.h:132
SiStripEnumsAndStrings.h
SiStripHistoTitle.h
CalibrationAnalysis::maxBaselineThreshold_
static const float maxBaselineThreshold_
Definition: CalibrationAnalysis.h:103
CalibrationAnalysis::turnOn_
VVFloat turnOn_
Definition: CalibrationAnalysis.h:126
CalibrationAnalysis::min_tail_
VFloat min_tail_
Definition: CalibrationAnalysis.h:130
CalibrationAnalysis::spread_amplitude_
VFloat spread_amplitude_
Definition: CalibrationAnalysis.h:134
CalibrationAnalysis::mean_tail_
VFloat mean_tail_
Definition: CalibrationAnalysis.h:128
CalibrationAnalysis::max_amplitude_
VFloat max_amplitude_
Definition: CalibrationAnalysis.h:132
CommissioningAnalysis::VVFloat
std::vector< VFloat > VVFloat
Definition: CommissioningAnalysis.h:32
CalibrationAnalysis::maxChi2Threshold_
static const float maxChi2Threshold_
Definition: CalibrationAnalysis.h:104
CalibrationAnalysis::max_turnOn_
VFloat max_turnOn_
Definition: CalibrationAnalysis.h:132
sistrip
sistrip classes
Definition: EnsembleCalibrationLA.cc:10
CalibrationAnalysis::maxTurnOnThresholdDeco_
static const float maxTurnOnThresholdDeco_
Definition: CalibrationAnalysis.h:122
CalibrationAnalysis::min_undershoot_
VFloat min_undershoot_
Definition: CalibrationAnalysis.h:130
CalibrationAnalysis::tail_
VVFloat tail_
Definition: CalibrationAnalysis.h:126
CalibrationAnalysis::min_chi2_
VFloat min_chi2_
Definition: CalibrationAnalysis.h:130
crabWrapper.key
key
Definition: crabWrapper.py:19
CalibrationAnalysis::minDecayTimeThreshold_
static const float minDecayTimeThreshold_
Definition: CalibrationAnalysis.h:106
CalibrationAnalysis::isValid
bool isValid() const override
Definition: CalibrationAnalysis.cc:242
CalibrationAnalysis::undershoot_
VVFloat undershoot_
Definition: CalibrationAnalysis.h:126
CommissioningAnalysis::VBool
std::vector< bool > VBool
Definition: CommissioningAnalysis.h:38
CalibrationAnalysis::smearing_
VVFloat smearing_
Definition: CalibrationAnalysis.h:126
CalibrationAnalysis::min_smearing_
VFloat min_smearing_
Definition: CalibrationAnalysis.h:130
CalibrationAnalysis::max_tail_
VFloat max_tail_
Definition: CalibrationAnalysis.h:132
CalibrationAnalysis::maxRiseTimeThreshold_
static const float maxRiseTimeThreshold_
Definition: CalibrationAnalysis.h:111