CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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"),
16  sOnCut_(3),
17  max_(sistrip::invalid_),
18  error_(sistrip::invalid_)
19 {;}
20 
21 // ----------------------------------------------------------------------------
22 //
24  : CommissioningAnalysis("SamplingAnalysis"),
25  sOnCut_(3),
26  max_(sistrip::invalid_),
27  error_(sistrip::invalid_)
28 {;}
29 
30 // ----------------------------------------------------------------------------
31 //
35 }
36 
37 // ----------------------------------------------------------------------------
38 //
39 void SamplingAnalysis::print( std::stringstream& ss, uint32_t not_used ) {
40  header( ss );
41  ss << " Granularity: " << SiStripEnumsAndStrings::granularity(granularity_) << std::endl;
42  ss << " Delay corresponding to the maximum of the pulse : " << max_ << std::endl
43  << " Error on the position (from the fit) : " << error_ << std::endl;
44 }
45 
46 // ----------------------------------------------------------------------------
47 //
48 float SamplingAnalysis::limit(float SoNcut) const
49 {
50  return 3.814567e+00+8.336601e+00*SoNcut-1.511334e-01*pow(SoNcut,2);
51 }
52 
53 // ----------------------------------------------------------------------------
54 //
55 float SamplingAnalysis::correctMeasurement(float mean, float SoNcut) const
56 {
57  if(mean>limit(SoNcut))
58  return -8.124872e+00+9.860108e-01*mean-3.618158e-03*pow(mean,2)+2.037263e-05*pow(mean,3);
59  else return 0.;
60 }
static std::string granularity(const sistrip::Granularity &)
float limit(float SoNcut) const
void print(std::stringstream &, uint32_t not_used=0)
virtual void header(std::stringstream &) const
static const uint16_t invalid_
Definition: Constants.h:17
list key
Definition: combine.py:13
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:40