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 
12 // ----------------------------------------------------------------------------
13 //
14 CalibrationAnalysis::CalibrationAnalysis( const uint32_t& key, const bool& deconv, int calchan )
15  : CommissioningAnalysis(key,"CalibrationAnalysis"),
16  amplitude_(2,VFloat(128,sistrip::invalid_)),
17  tail_(2,VFloat(128,sistrip::invalid_)),
18  riseTime_(2,VFloat(128,sistrip::invalid_)),
19  timeConstant_(2,VFloat(128,sistrip::invalid_)),
20  turnOn_(2,VFloat(128,sistrip::invalid_)),
22  undershoot_(2,VFloat(128,sistrip::invalid_)),
23  baseline_(2,VFloat(128,sistrip::invalid_)),
24  smearing_(2,VFloat(128,sistrip::invalid_)),
25  chi2_(2,VFloat(128,sistrip::invalid_)),
26  mean_amplitude_(2,sistrip::invalid_),
27  mean_tail_(2,sistrip::invalid_),
28  mean_riseTime_(2,sistrip::invalid_),
29  mean_timeConstant_(2,sistrip::invalid_),
30  mean_turnOn_(2,sistrip::invalid_),
31  mean_maximum_(2,sistrip::invalid_),
32  mean_undershoot_(2,sistrip::invalid_),
33  mean_baseline_(2,sistrip::invalid_),
34  mean_smearing_(2,sistrip::invalid_),
35  mean_chi2_(2,sistrip::invalid_),
36  min_amplitude_(2,sistrip::invalid_),
37  min_tail_(2,sistrip::invalid_),
38  min_riseTime_(2,sistrip::invalid_),
39  min_timeConstant_(2,sistrip::invalid_),
40  min_turnOn_(2,sistrip::invalid_),
41  min_maximum_(2,sistrip::invalid_),
42  min_undershoot_(2,sistrip::invalid_),
43  min_baseline_(2,sistrip::invalid_),
44  min_smearing_(2,sistrip::invalid_),
45  min_chi2_(2,sistrip::invalid_),
46  max_amplitude_(2,sistrip::invalid_),
47  max_tail_(2,sistrip::invalid_),
48  max_riseTime_(2,sistrip::invalid_),
49  max_timeConstant_(2,sistrip::invalid_),
50  max_turnOn_(2,sistrip::invalid_),
51  max_maximum_(2,sistrip::invalid_),
52  max_undershoot_(2,sistrip::invalid_),
53  max_baseline_(2,sistrip::invalid_),
54  max_smearing_(2,sistrip::invalid_),
55  max_chi2_(2,sistrip::invalid_),
56  spread_amplitude_(2,sistrip::invalid_),
57  spread_tail_(2,sistrip::invalid_),
58  spread_riseTime_(2,sistrip::invalid_),
59  spread_timeConstant_(2,sistrip::invalid_),
60  spread_turnOn_(2,sistrip::invalid_),
61  spread_maximum_(2,sistrip::invalid_),
62  spread_undershoot_(2,sistrip::invalid_),
63  spread_baseline_(2,sistrip::invalid_),
64  spread_smearing_(2,sistrip::invalid_),
65  spread_chi2_(2,sistrip::invalid_),
66  deconv_(deconv),
67  calchan_(calchan),
68  isScan_(false)
69 {;}
70 
71 // ----------------------------------------------------------------------------
72 //
74  : CommissioningAnalysis("CalibrationAnalysis"),
76  tail_(2,VFloat(128,sistrip::invalid_)),
79  turnOn_(2,VFloat(128,sistrip::invalid_)),
84  chi2_(2,VFloat(128,sistrip::invalid_)),
125  deconv_(deconv),
126  calchan_(calchan),
127  isScan_(false)
128 {;}
129 
130 // ----------------------------------------------------------------------------
131 //
183 }
184 
185 // ----------------------------------------------------------------------------
186 //
187 void CalibrationAnalysis::print( std::stringstream& ss, uint32_t iapv ) {
188  header( ss );
189  ss << " Monitorables for APV number : " << iapv;
190  if ( iapv == 0 ) { ss << " (first of pair)"; }
191  else if ( iapv == 1 ) { ss << " (second of pair)"; }
192  ss << std::endl;
193  ss << " Mean Amplitude of the pulse : " << mean_amplitude_[iapv] << std::endl
194  << " Mean Tail amplitude after 150ns : " << mean_tail_[iapv] << std::endl
195  << " Mean Rise time : " << mean_riseTime_[iapv] << std::endl
196  << " Mean Time constant : " << mean_timeConstant_[iapv] << std::endl
197  << " Mean Turn on time : " << mean_turnOn_[iapv] << std::endl
198  << " Mean peak time : " << mean_maximum_[iapv] << std::endl
199  << " Mean undershoot amplitude : " << mean_undershoot_[iapv] << std::endl
200  << " Mean baseline amplitude : " << mean_baseline_[iapv] << std::endl
201  << " Mean Smearing parameter : " << mean_smearing_[iapv] << std::endl
202  << " Mean Chi2 of the fit : " << mean_chi2_[iapv] << std::endl;
203  if(deconvMode()) {
204  ss << "Data obtained in deconvolution mode." << std::endl;
205  } else {
206  ss << "Data obtained in peak mode." << std::endl;
207  }
208 }
209 
void print(std::stringstream &, uint32_t not_used=0) override
sistrip classes
std::vector< float > VFloat
static const uint16_t maximum_
Definition: Constants.h:20
virtual void header(std::stringstream &) const
CalibrationAnalysis(const uint32_t &key, const bool &deconv, int calchan)
static const uint16_t invalid_
Definition: Constants.h:16
std::vector< VFloat > VVFloat
Abstract base for derived classes that provide analysis of commissioning histograms.