CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 &)
float limit(float SoNcut) const
void reset() override
void print(std::stringstream &, uint32_t not_used=0) override
tuple key
prepare the HTCondor submission files and eventually submit them
virtual void header(std::stringstream &) const
static const uint16_t invalid_
Definition: Constants.h:16
float correctMeasurement(float mean, float SoNcut=3.) const
Abstract base for derived classes that provide analysis of commissioning histograms.
sistrip::Granularity granularity_
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29