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"),
30  deconv_(deconv){
31 
46 }
47 
48 // ----------------------------------------------------------------------------
49 //
51  : CommissioningAnalysis("CalibrationScanAnalysis"),
52  deconv_(deconv){
53 
56 
69 }
70 // ----------------------------------------------------------------------------
71 //
72 void CalibrationScanAnalysis::addOneCalibrationPoint(const std::string & key) // key of form isha_%d_vfs_%d
73 {
74 
86 }
87 
88 
89 // ----------------------------------------------------------------------------
90 //
92 
107 
108  for(auto key: amplitude_){
109  amplitude_[key.first] = VFloat(2,sistrip::invalid_);
110  tail_[key.first] = VFloat(2,sistrip::invalid_);
112  turnOn_[key.first] = VFloat(2,sistrip::invalid_);
117  chi2_[key.first] = VFloat(2,sistrip::invalid_);
119  }
120 }
121 
122 // ----------------------------------------------------------------------------
123 //
124 void CalibrationScanAnalysis::print( std::stringstream& ss, uint32_t iapv ) {
125  header( ss );
126  ss << " Monitorables for APV number : " << iapv ;
127  if ( iapv == 0 ) { ss << " (first of pair)"; }
128  else if ( iapv == 1 ) { ss << " (second of pair)"; }
129  ss << std::endl;
130  ss << " Looking at key "<<amplitude_.begin()->first<< std::endl;
131  ss << " Amplitude of the pulse : " << amplitude_[amplitude_.begin()->first][iapv] << std::endl
132  << " Baseline : " << baseline_[amplitude_.begin()->first][iapv] << std::endl
133  << " Rise time : " << riseTime_[amplitude_.begin()->first][iapv] << std::endl
134  << " Turn-on time : " << turnOn_[amplitude_.begin()->first][iapv] << std::endl
135  << " Peak time : " << peakTime_[amplitude_.begin()->first][iapv] << std::endl
136  << " Undershoot : " << undershoot_[amplitude_.begin()->first][iapv] << std::endl
137  << " Time constant : " << decayTime_[amplitude_.begin()->first][iapv] << std::endl
138  << " Smearing : " << smearing_[amplitude_.begin()->first][iapv] << std::endl
139  << " Chi2 : " << chi2_[amplitude_.begin()->first][iapv] << std::endl;
140  if(deconvMode()) {
141  ss << "Data obtained in deconvolution mode." << std::endl;
142  } else {
143  ss << "Data obtained in peak mode." << std::endl;
144  }
145 
146 }
147 
148 bool CalibrationScanAnalysis::isValid() const { return true;}
static const float maxDecayTimeThreshold_
std::map< std::string, VFloat > smearing_
std::map< std::string, VFloat > undershoot_
std::map< std::string, VFloat > decayTime_
static const float minAmplitudeThreshold_
std::map< std::string, VFloat > tail_
std::map< std::string, VFloat > peakTime_
static const float minBaselineThreshold_
static const float minDecayTimeThreshold_
std::map< std::string, VFloat > chi2_
static const float maxTurnOnThreshold_
sistrip classes
static const float maxISHAforVFSTune_
static const float maxPeakTimeThreshold_
std::vector< float > VFloat
static const float maxChi2Threshold_
std::vector< bool > VBool
static const float maxRiseTimeThreshold_
static const float minISHAforVFSTune_
std::vector< uint16_t > VInt
virtual void header(std::stringstream &) const
std::map< std::string, VFloat > amplitude_
std::map< std::string, VFloat > riseTime_
static const uint16_t invalid_
Definition: Constants.h:16
void addOneCalibrationPoint(const std::string &key)
std::map< std::string, VFloat > turnOn_
void print(std::stringstream &, uint32_t not_used=0) override
CalibrationScanAnalysis(const uint32_t &key, const bool &deconv)
static const float minPeakTimeThreshold_
std::map< std::string, VBool > isvalid_
static const float minRiseTimeThreshold_
Abstract base for derived classes that provide analysis of commissioning histograms.
static const float maxBaselineThreshold_
std::map< std::string, VFloat > baseline_
static const float minTurnOnThreshold_