CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
SiStripMiscalibrate::Entry Class Reference

#include <SiStripMiscalibrateHelper.h>

Public Member Functions

void add (double val)
 
 Entry ()
 
double mean ()
 
double mean_rms ()
 
void reset ()
 
double std_dev ()
 

Private Attributes

long int entries
 
double sq_sum
 
double sum
 

Detailed Description

Definition at line 14 of file SiStripMiscalibrateHelper.h.

Constructor & Destructor Documentation

◆ Entry()

SiStripMiscalibrate::Entry::Entry ( )
inline

Definition at line 16 of file SiStripMiscalibrateHelper.h.

16 : entries(0), sum(0), sq_sum(0) {}

Member Function Documentation

◆ add()

void SiStripMiscalibrate::Entry::add ( double  val)
inline

◆ mean()

double SiStripMiscalibrate::Entry::mean ( )
inline

◆ mean_rms()

double SiStripMiscalibrate::Entry::mean_rms ( )
inline

Definition at line 23 of file SiStripMiscalibrateHelper.h.

23 { return std_dev() / sqrt(entries); }

References entries, mathSSE::sqrt(), and std_dev().

◆ reset()

void SiStripMiscalibrate::Entry::reset ( void  )
inline

◆ std_dev()

double SiStripMiscalibrate::Entry::std_dev ( )
inline

Definition at line 19 of file SiStripMiscalibrateHelper.h.

19  {
20  double tmean = mean();
21  return (sq_sum - entries * tmean * tmean) > 0 ? sqrt((sq_sum - entries * tmean * tmean) / (entries - 1)) : 0.;
22  }

References entries, mean(), sq_sum, and mathSSE::sqrt().

Referenced by mean_rms().

Member Data Documentation

◆ entries

long int SiStripMiscalibrate::Entry::entries
private

◆ sq_sum

double SiStripMiscalibrate::Entry::sq_sum
private

Definition at line 39 of file SiStripMiscalibrateHelper.h.

Referenced by add(), reset(), and std_dev().

◆ sum

double SiStripMiscalibrate::Entry::sum
private

Definition at line 39 of file SiStripMiscalibrateHelper.h.

Referenced by add(), mean(), and reset().

SiStripMiscalibrate::Entry::sq_sum
double sq_sum
Definition: SiStripMiscalibrateHelper.h:39
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
SiStripMiscalibrate::Entry::entries
long int entries
Definition: SiStripMiscalibrateHelper.h:38
SiStripMiscalibrate::Entry::sum
double sum
Definition: SiStripMiscalibrateHelper.h:39
SiStripMiscalibrate::Entry::std_dev
double std_dev()
Definition: SiStripMiscalibrateHelper.h:19
heppy_batch.val
val
Definition: heppy_batch.py:351
SiStripMiscalibrate::Entry::mean
double mean()
Definition: SiStripMiscalibrateHelper.h:18