test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  smearing_(2,VFloat(128,sistrip::invalid_)),
21  chi2_(2,VFloat(128,sistrip::invalid_)),
22  mean_amplitude_(2,sistrip::invalid_),
23  mean_tail_(2,sistrip::invalid_),
24  mean_riseTime_(2,sistrip::invalid_),
25  mean_timeConstant_(2,sistrip::invalid_),
26  mean_smearing_(2,sistrip::invalid_),
27  mean_chi2_(2,sistrip::invalid_),
28  min_amplitude_(2,sistrip::invalid_),
29  min_tail_(2,sistrip::invalid_),
30  min_riseTime_(2,sistrip::invalid_),
31  min_timeConstant_(2,sistrip::invalid_),
32  min_smearing_(2,sistrip::invalid_),
33  min_chi2_(2,sistrip::invalid_),
34  max_amplitude_(2,sistrip::invalid_),
35  max_tail_(2,sistrip::invalid_),
36  max_riseTime_(2,sistrip::invalid_),
37  max_timeConstant_(2,sistrip::invalid_),
38  max_smearing_(2,sistrip::invalid_),
39  max_chi2_(2,sistrip::invalid_),
40  spread_amplitude_(2,sistrip::invalid_),
41  spread_tail_(2,sistrip::invalid_),
42  spread_riseTime_(2,sistrip::invalid_),
43  spread_timeConstant_(2,sistrip::invalid_),
44  spread_smearing_(2,sistrip::invalid_),
45  spread_chi2_(2,sistrip::invalid_),
46  deconv_(deconv),
47  calchan_(calchan),
48  isScan_(false)
49 {;}
50 
51 // ----------------------------------------------------------------------------
52 //
53 CalibrationAnalysis::CalibrationAnalysis(const bool& deconv, int calchan)
54  : CommissioningAnalysis("CalibrationAnalysis"),
55  amplitude_(2,VFloat(128,sistrip::invalid_)),
56  tail_(2,VFloat(128,sistrip::invalid_)),
57  riseTime_(2,VFloat(128,sistrip::invalid_)),
58  timeConstant_(2,VFloat(128,sistrip::invalid_)),
59  smearing_(2,VFloat(128,sistrip::invalid_)),
60  chi2_(2,VFloat(128,sistrip::invalid_)),
61  mean_amplitude_(2,sistrip::invalid_),
62  mean_tail_(2,sistrip::invalid_),
63  mean_riseTime_(2,sistrip::invalid_),
64  mean_timeConstant_(2,sistrip::invalid_),
65  mean_smearing_(2,sistrip::invalid_),
66  mean_chi2_(2,sistrip::invalid_),
67  min_amplitude_(2,sistrip::invalid_),
68  min_tail_(2,sistrip::invalid_),
69  min_riseTime_(2,sistrip::invalid_),
70  min_timeConstant_(2,sistrip::invalid_),
71  min_smearing_(2,sistrip::invalid_),
72  min_chi2_(2,sistrip::invalid_),
73  max_amplitude_(2,sistrip::invalid_),
74  max_tail_(2,sistrip::invalid_),
75  max_riseTime_(2,sistrip::invalid_),
76  max_timeConstant_(2,sistrip::invalid_),
77  max_smearing_(2,sistrip::invalid_),
78  max_chi2_(2,sistrip::invalid_),
79  spread_amplitude_(2,sistrip::invalid_),
80  spread_tail_(2,sistrip::invalid_),
81  spread_riseTime_(2,sistrip::invalid_),
82  spread_timeConstant_(2,sistrip::invalid_),
83  spread_smearing_(2,sistrip::invalid_),
84  spread_chi2_(2,sistrip::invalid_),
85  deconv_(deconv),
86  calchan_(calchan),
87  isScan_(false)
88 {;}
89 
90 // ----------------------------------------------------------------------------
91 //
123 }
124 
125 // ----------------------------------------------------------------------------
126 //
127 void CalibrationAnalysis::print( std::stringstream& ss, uint32_t iapv ) {
128  header( ss );
129  ss << " Monitorables for APV number : " << iapv;
130  if ( iapv == 0 ) { ss << " (first of pair)"; }
131  else if ( iapv == 1 ) { ss << " (second of pair)"; }
132  ss << std::endl;
133  ss << " Mean Amplitude of the pulse : " << mean_amplitude_[iapv] << std::endl
134  << " Mean Tail amplitude after 150ns : " << mean_tail_[iapv] << std::endl
135  << " Mean Rise time : " << mean_riseTime_[iapv] << std::endl
136  << " Mean Time constant : " << mean_timeConstant_[iapv] << std::endl
137  << " Mean Smearing parameter : " << mean_smearing_[iapv] << std::endl
138  << " Mean Chi2 of the fit : " << mean_chi2_[iapv] << std::endl;
139  if(deconvMode()) {
140  ss << "Data obtained in deconvolution mode." << std::endl;
141  } else {
142  ss << "Data obtained in peak mode." << std::endl;
143  }
144 }
145 
void print(std::stringstream &, uint32_t not_used=0)
std::vector< float > VFloat
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
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.
volatile std::atomic< bool > shutdown_flag false