CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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)
 
void reset ()
 
 SamplingAnalysis (const uint32_t &key)
 
 SamplingAnalysis ()
 
void setSoNcut (const float sOnCut)
 
virtual ~SamplingAnalysis ()
 
- 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< float > VFloat
 
typedef std::vector< uint16_t > VInt
 
typedef std::vector< std::string > VString
 
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::SamplingAnalysis ( const uint32_t &  key)

Definition at line 14 of file SamplingAnalysis.cc.

15  : CommissioningAnalysis(key,"SamplingAnalysis"),
16  sOnCut_(3),
19 {;}
static const uint16_t invalid_
Definition: Constants.h:16
SamplingAnalysis::SamplingAnalysis ( )

Definition at line 23 of file SamplingAnalysis.cc.

24  : CommissioningAnalysis("SamplingAnalysis"),
25  sOnCut_(3),
28 {;}
static const uint16_t invalid_
Definition: Constants.h:16
virtual SamplingAnalysis::~SamplingAnalysis ( )
inlinevirtual

Definition at line 25 of file SamplingAnalysis.h.

25 {;}

Member Function Documentation

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

Definition at line 55 of file SamplingAnalysis.cc.

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

Referenced by SamplingAlgorithm::correctProfile().

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 }
float limit(float SoNcut) const
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
const float& SamplingAnalysis::error ( ) const
inline
float SamplingAnalysis::getSoNcut ( ) const
inline

Definition at line 35 of file SamplingAnalysis.h.

References sOnCut_.

35 { return sOnCut_; }
sistrip::Granularity SamplingAnalysis::granularity ( ) const
inline

Definition at line 45 of file SamplingAnalysis.h.

References granularity_.

45 { return granularity_; }
sistrip::Granularity granularity_
float SamplingAnalysis::limit ( float  SoNcut) const

Definition at line 48 of file SamplingAnalysis.cc.

References funct::pow().

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

49 {
50  return 3.814567e+00+8.336601e+00*SoNcut-1.511334e-01*pow(SoNcut,2);
51 }
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
const float& SamplingAnalysis::maximum ( ) const
inline
void SamplingAnalysis::print ( std::stringstream &  ,
uint32_t  not_used = 0 
)
virtual

Prints analysis results.

Implements CommissioningAnalysis.

Definition at line 39 of file SamplingAnalysis.cc.

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

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

Resets analysis member data.

Implements CommissioningAnalysis.

Definition at line 32 of file SamplingAnalysis.cc.

References error_, sistrip::invalid_, and max_.

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

32  {
35 }
static const uint16_t invalid_
Definition: Constants.h:16
void SamplingAnalysis::setSoNcut ( const float  sOnCut)
inline

Definition at line 33 of file SamplingAnalysis.h.

References sOnCut_.

Referenced by SamplingHistograms::histoAnalysis().

33 { sOnCut_ = sOnCut; }

Friends And Related Function Documentation

friend class SamplingAlgorithm
friend

Definition at line 27 of file SamplingAnalysis.h.

Member Data Documentation

float SamplingAnalysis::error_
private

Error on the position ( from the fit)

Definition at line 56 of file SamplingAnalysis.h.

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

sistrip::Granularity SamplingAnalysis::granularity_
private

granularity

Definition at line 62 of file SamplingAnalysis.h.

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

float SamplingAnalysis::max_
private

Delay corresponding to the maximum of the pulse shape

Definition at line 53 of file SamplingAnalysis.h.

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

sistrip::RunType SamplingAnalysis::runType_
private

reconstruction mode

Definition at line 59 of file SamplingAnalysis.h.

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

float SamplingAnalysis::sOnCut_
private

s/n cut to be used

Definition at line 50 of file SamplingAnalysis.h.

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