CMS 3D CMS Logo

SamplingAnalysis.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 //
15  : CommissioningAnalysis(key, "SamplingAnalysis"), sOnCut_(3), max_(sistrip::invalid_), error_(sistrip::invalid_) {
16  ;
17 }
18 
19 // ----------------------------------------------------------------------------
20 //
22  : CommissioningAnalysis("SamplingAnalysis"), sOnCut_(3), max_(sistrip::invalid_), error_(sistrip::invalid_) {
23  ;
24 }
25 
26 // ----------------------------------------------------------------------------
27 //
31 }
32 
33 // ----------------------------------------------------------------------------
34 //
35 void SamplingAnalysis::print(std::stringstream& ss, uint32_t not_used) {
36  header(ss);
37  ss << " Granularity: " << SiStripEnumsAndStrings::granularity(granularity_) << std::endl;
38  ss << " Delay corresponding to the maximum of the pulse : " << max_ << std::endl
39  << " Error on the position (from the fit) : " << error_ << std::endl;
40 }
41 
42 // ----------------------------------------------------------------------------
43 //
44 float SamplingAnalysis::limit(float SoNcut) const {
45  return 3.814567e+00 + 8.336601e+00 * SoNcut - 1.511334e-01 * pow(SoNcut, 2);
46 }
47 
48 // ----------------------------------------------------------------------------
49 //
50 float SamplingAnalysis::correctMeasurement(float mean, float SoNcut) const {
51  if (mean > limit(SoNcut))
52  return -8.124872e+00 + 9.860108e-01 * mean - 3.618158e-03 * pow(mean, 2) + 2.037263e-05 * pow(mean, 3);
53  else
54  return 0.;
55 }
static std::string granularity(const sistrip::Granularity &)
void reset() override
void print(std::stringstream &, uint32_t not_used=0) override
constexpr int pow(int x)
Definition: conifer.h:24
sistrip classes
float limit(float SoNcut) const
static const uint16_t invalid_
Definition: Constants.h:16
float correctMeasurement(float mean, float SoNcut=3.) const
virtual void header(std::stringstream &) const
Abstract base for derived classes that provide analysis of commissioning histograms.
sistrip::Granularity granularity_