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 }
SamplingAnalysis::SamplingAnalysis
SamplingAnalysis()
Definition: SamplingAnalysis.cc:21
MessageLogger.h
SiStripPI::mean
Definition: SiStripPayloadInspectorHelper.h:169
SamplingAnalysis::correctMeasurement
float correctMeasurement(float mean, float SoNcut=3.) const
Definition: SamplingAnalysis.cc:50
SamplingAnalysis::limit
float limit(float SoNcut) const
Definition: SamplingAnalysis.cc:44
SamplingAnalysis::max_
float max_
Definition: SamplingAnalysis.h:50
SamplingAnalysis::error_
float error_
Definition: SamplingAnalysis.h:53
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
SamplingAnalysis.h
CommissioningAnalysis::header
virtual void header(std::stringstream &) const
Definition: CommissioningAnalysis.cc:33
SiStripEnumsAndStrings::granularity
static std::string granularity(const sistrip::Granularity &)
Definition: SiStripEnumsAndStrings.cc:265
SamplingAnalysis::granularity_
sistrip::Granularity granularity_
Definition: SamplingAnalysis.h:59
sistrip::invalid_
static const uint16_t invalid_
Definition: Constants.h:16
SamplingAnalysis::print
void print(std::stringstream &, uint32_t not_used=0) override
Definition: SamplingAnalysis.cc:35
SamplingAnalysis::reset
void reset() override
Definition: SamplingAnalysis.cc:28
CommissioningAnalysis
Abstract base for derived classes that provide analysis of commissioning histograms.
Definition: CommissioningAnalysis.h:18
SiStripEnumsAndStrings.h
SiStripHistoTitle.h
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
sistrip
sistrip classes
Definition: SiStripQualityHelpers.h:14
crabWrapper.key
key
Definition: crabWrapper.py:19