CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes | Friends
SamplingAnalysis Class Reference

Analysis for latency run. More...

#include <SamplingAnalysis.h>

Inheritance diagram for SamplingAnalysis:
CommissioningAnalysis

Public Member Functions

float correctMeasurement (float mean, float SoNcut=3.) const
 
const float & error () const
 
float getSoNcut () const
 
sistrip::Granularity granularity () const
 
float limit (float SoNcut) const
 
const float & maximum () const
 
void print (std::stringstream &, uint32_t not_used=0) override
 
void reset () override
 
 SamplingAnalysis (const uint32_t &key)
 
 SamplingAnalysis ()
 
void setSoNcut (const float sOnCut)
 
 ~SamplingAnalysis () override
 
- Public Member Functions inherited from CommissioningAnalysis
virtual void addErrorCode (const std::string &error)
 
 CommissioningAnalysis (const uint32_t &key, const std::string &my_name)
 
 CommissioningAnalysis (const std::string &my_name)
 
const uint32_t & dcuId () const
 
void dcuId (const uint32_t &)
 
const uint32_t & detId () const
 
void detId (const uint32_t &)
 
const uint32_t & fecKey () const
 
void fecKey (const uint32_t &)
 
const uint32_t & fedKey () const
 
void fedKey (const uint32_t &)
 
const VStringgetErrorCodes () const
 
virtual void header (std::stringstream &) const
 
virtual bool isValid () const
 
const std::string & myName () const
 
void setErrorCodes (const VString &errors)
 
virtual void summary (std::stringstream &) const
 
virtual ~CommissioningAnalysis ()
 

Private Attributes

float error_
 
sistrip::Granularity granularity_
 
float max_
 
sistrip::RunType runType_
 
float sOnCut_
 

Friends

class SamplingAlgorithm
 

Additional Inherited Members

- Public Types inherited from CommissioningAnalysis
typedef std::vector< bool > VBool
 
typedef std::vector< float > VFloat
 
typedef std::vector< uint16_t > VInt
 
typedef std::vector< std::string > VString
 
typedef std::vector< VBoolVVBool
 
typedef std::vector< VFloatVVFloat
 
typedef std::vector< VIntVVInt
 

Detailed Description

Analysis for latency run.

Author
C. Delaere

Definition at line 17 of file SamplingAnalysis.h.

Constructor & Destructor Documentation

◆ SamplingAnalysis() [1/2]

SamplingAnalysis::SamplingAnalysis ( const uint32_t &  key)

Definition at line 14 of file SamplingAnalysis.cc.

◆ SamplingAnalysis() [2/2]

SamplingAnalysis::SamplingAnalysis ( )

Definition at line 21 of file SamplingAnalysis.cc.

23  ;
24 }
static const uint16_t invalid_
Definition: Constants.h:16

◆ ~SamplingAnalysis()

SamplingAnalysis::~SamplingAnalysis ( )
inlineoverride

Definition at line 23 of file SamplingAnalysis.h.

23 { ; }

Member Function Documentation

◆ correctMeasurement()

float SamplingAnalysis::correctMeasurement ( float  mean,
float  SoNcut = 3. 
) const

Definition at line 50 of file SamplingAnalysis.cc.

References limit(), SiStripPI::mean, and funct::pow().

Referenced by SamplingAlgorithm::correctProfile().

50  {
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 }
float limit(float SoNcut) const
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29

◆ error()

const float& SamplingAnalysis::error ( ) const
inline

Definition at line 29 of file SamplingAnalysis.h.

References error_.

Referenced by Page1Parser.Page1Parser::check_for_whole_start_tag().

29 { return error_; }

◆ getSoNcut()

float SamplingAnalysis::getSoNcut ( ) const
inline

Definition at line 33 of file SamplingAnalysis.h.

References sOnCut_.

33 { return sOnCut_; }

◆ granularity()

sistrip::Granularity SamplingAnalysis::granularity ( ) const
inline

Definition at line 43 of file SamplingAnalysis.h.

References granularity_.

43 { return granularity_; }
sistrip::Granularity granularity_

◆ limit()

float SamplingAnalysis::limit ( float  SoNcut) const

Definition at line 44 of file SamplingAnalysis.cc.

References funct::pow().

Referenced by correctMeasurement(), and SamplingAlgorithm::correctProfile().

44  {
45  return 3.814567e+00 + 8.336601e+00 * SoNcut - 1.511334e-01 * pow(SoNcut, 2);
46 }
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29

◆ maximum()

const float& SamplingAnalysis::maximum ( ) const
inline

Definition at line 27 of file SamplingAnalysis.h.

References max_.

27 { return max_; }

◆ print()

void SamplingAnalysis::print ( std::stringstream &  ,
uint32_t  not_used = 0 
)
overridevirtual

Prints analysis results.

Implements CommissioningAnalysis.

Definition at line 35 of file SamplingAnalysis.cc.

References error_, SiStripEnumsAndStrings::granularity(), granularity_, CommissioningAnalysis::header(), max_, and contentValuesCheck::ss.

35  {
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 }
static std::string granularity(const sistrip::Granularity &)
virtual void header(std::stringstream &) const
sistrip::Granularity granularity_

◆ reset()

void SamplingAnalysis::reset ( )
overridevirtual

Resets analysis member data.

Implements CommissioningAnalysis.

Definition at line 28 of file SamplingAnalysis.cc.

References error_, sistrip::invalid_, and max_.

Referenced by MatrixReader.MatrixReader::__init__(), and MatrixReader.MatrixReader::showRaw().

28  {
31 }
static const uint16_t invalid_
Definition: Constants.h:16

◆ setSoNcut()

void SamplingAnalysis::setSoNcut ( const float  sOnCut)
inline

Definition at line 31 of file SamplingAnalysis.h.

References sOnCut_.

31 { sOnCut_ = sOnCut; }

Friends And Related Function Documentation

◆ SamplingAlgorithm

friend class SamplingAlgorithm
friend

Definition at line 25 of file SamplingAnalysis.h.

Member Data Documentation

◆ error_

float SamplingAnalysis::error_
private

Error on the position ( from the fit)

Definition at line 53 of file SamplingAnalysis.h.

Referenced by SamplingAlgorithm::analyse(), error(), print(), and reset().

◆ granularity_

sistrip::Granularity SamplingAnalysis::granularity_
private

granularity

Definition at line 59 of file SamplingAnalysis.h.

Referenced by SamplingAlgorithm::extract(), granularity(), and print().

◆ max_

float SamplingAnalysis::max_
private

Delay corresponding to the maximum of the pulse shape

Definition at line 50 of file SamplingAnalysis.h.

Referenced by SamplingAlgorithm::analyse(), maximum(), print(), and reset().

◆ runType_

sistrip::RunType SamplingAnalysis::runType_
private

reconstruction mode

Definition at line 56 of file SamplingAnalysis.h.

Referenced by SamplingAlgorithm::analyse(), and SamplingAlgorithm::extract().

◆ sOnCut_

float SamplingAnalysis::sOnCut_
private

s/n cut to be used

Definition at line 47 of file SamplingAnalysis.h.

Referenced by SamplingAlgorithm::analyse(), getSoNcut(), and setSoNcut().