Diana Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
QTimingAnalyzer Class Reference

Analyzes a list of values for the occurance of elements separated by regular intervals. More...

Public Member Functions

 QTimingAnalyzer ()
 Constructor. More...
 
virtual ~QTimingAnalyzer ()
 Destructor. More...
 
void AddValue (const double value)
 Add a time value to the list of values. More...
 
void ComputeGoodnessThreshold (const double falseRate)
 Compute goodness threshold at given false positive rate. More...
 
void FindPeriod (const double uncertainty, const double stepSize=0.008)
 Find period by searching within 'uncertainty' of fPeriod. More...
 
unsigned int GetBestGoodness ()
 Get best goodness parameter for the values in fValues. More...
 
unsigned int GetGoodness (const double value)
 Get goodness for a given time, using adjustments. More...
 
unsigned int GetGoodnessParameter (const double value)
 Get goodness for a given time value, no adjustments. More...
 
unsigned int GetGoodnessThreshold () const
 Get goodness threshold at given false positive rate. More...
 
double GetPeriod () const
 Get period. More...
 
unsigned int GetTotalGoodness ()
 Get total goodness for the values in fValues. More...
 
void SetAdjustments (const std::vector< double > &adjustments)
 Set adjustments. More...
 
void SetExpectedPeriod (const double period)
 Set period for repetition of values. More...
 
void SetTolerance (const double tolerance)
 Set size of window in which to look for event. More...
 

Private Member Functions

double DistanceToClosestElement (const double value, double &closestValue)
 Computes distance from 'value' to closest element in fValues. More...
 

Private Attributes

std::vector< double > fAdjustments
 Adjustments. More...
 
unsigned int fGoodnessThreshold
 Goodness threshold at a certain false positive rate. More...
 
bool fNeedsSort
 Whether or not vector could be out of order. More...
 
double fPeriod
 Period for repetition of values. More...
 
double fTolerance
 Size of window in which to look for event. More...
 
std::vector< double > fValues
 Time values. More...
 

Detailed Description

Analyzes a list of values for the occurance of elements separated by regular intervals.

Definition at line 14 of file QTimingAnalyzer.hh.

Constructor & Destructor Documentation

◆ QTimingAnalyzer()

QTimingAnalyzer::QTimingAnalyzer ( )

Constructor.

Definition at line 21 of file QTimingAnalyzer.cc.

◆ ~QTimingAnalyzer()

QTimingAnalyzer::~QTimingAnalyzer ( )
virtual

Destructor.

Definition at line 26 of file QTimingAnalyzer.cc.

Member Function Documentation

◆ AddValue()

void QTimingAnalyzer::AddValue ( const double  value)
inline

Add a time value to the list of values.

Definition at line 23 of file QTimingAnalyzer.hh.

References fNeedsSort, and fValues.

◆ ComputeGoodnessThreshold()

void QTimingAnalyzer::ComputeGoodnessThreshold ( const double  falseRate)

Compute goodness threshold at given false positive rate.

Definition at line 30 of file QTimingAnalyzer.cc.

References exp(), fAdjustments, fGoodnessThreshold, fPeriod, fTolerance, fValues, and pow().

Referenced by MPulserFlagByRegularTiming::Done().

◆ DistanceToClosestElement()

double QTimingAnalyzer::DistanceToClosestElement ( const double  value,
double &  closestValue 
)
private

Computes distance from 'value' to closest element in fValues.

Definition at line 64 of file QTimingAnalyzer.cc.

References fNeedsSort, fValues, and min().

Referenced by GetGoodnessParameter().

◆ FindPeriod()

void QTimingAnalyzer::FindPeriod ( const double  uncertainty,
const double  stepSize = 0.008 
)

Find period by searching within 'uncertainty' of fPeriod.

Definition at line 104 of file QTimingAnalyzer.cc.

References fPeriod, and GetTotalGoodness().

Referenced by MPulserFlagByRegularTiming::Done().

◆ GetBestGoodness()

unsigned int QTimingAnalyzer::GetBestGoodness ( )

Get best goodness parameter for the values in fValues.

Definition at line 132 of file QTimingAnalyzer.cc.

References fValues, and GetGoodnessParameter().

◆ GetGoodness()

unsigned int QTimingAnalyzer::GetGoodness ( const double  value)

Get goodness for a given time, using adjustments.

Definition at line 151 of file QTimingAnalyzer.cc.

References fAdjustments, and GetGoodnessParameter().

◆ GetGoodnessParameter()

unsigned int QTimingAnalyzer::GetGoodnessParameter ( const double  value)

Get goodness for a given time value, no adjustments.

Definition at line 172 of file QTimingAnalyzer.cc.

References DistanceToClosestElement(), fPeriod, fTolerance, and fValues.

Referenced by GetBestGoodness(), GetGoodness(), and GetTotalGoodness().

◆ GetGoodnessThreshold()

unsigned int QTimingAnalyzer::GetGoodnessThreshold ( ) const
inline

Get goodness threshold at given false positive rate.

Definition at line 43 of file QTimingAnalyzer.hh.

References fGoodnessThreshold.

◆ GetPeriod()

double QTimingAnalyzer::GetPeriod ( ) const
inline

Get period.

Definition at line 46 of file QTimingAnalyzer.hh.

References fPeriod.

Referenced by MPulserFlagByRegularTiming::Done().

◆ GetTotalGoodness()

unsigned int QTimingAnalyzer::GetTotalGoodness ( )

Get total goodness for the values in fValues.

Definition at line 208 of file QTimingAnalyzer.cc.

References fValues, and GetGoodnessParameter().

Referenced by FindPeriod().

◆ SetAdjustments()

void QTimingAnalyzer::SetAdjustments ( const std::vector< double > &  adjustments)
inline

Set adjustments.

Definition at line 52 of file QTimingAnalyzer.hh.

References fAdjustments.

Referenced by MPulserFlagByRegularTiming::Done().

◆ SetExpectedPeriod()

void QTimingAnalyzer::SetExpectedPeriod ( const double  period)
inline

Set period for repetition of values.

Definition at line 56 of file QTimingAnalyzer.hh.

References fPeriod.

Referenced by MPulserFlagByRegularTiming::Done().

◆ SetTolerance()

void QTimingAnalyzer::SetTolerance ( const double  tolerance)
inline

Set size of window in which to look for event.

Definition at line 59 of file QTimingAnalyzer.hh.

References fTolerance.

Referenced by MPulserFlagByRegularTiming::Done().

Member Data Documentation

◆ fAdjustments

std::vector<double> QTimingAnalyzer::fAdjustments
private

Adjustments.

Definition at line 68 of file QTimingAnalyzer.hh.

Referenced by ComputeGoodnessThreshold(), GetGoodness(), and SetAdjustments().

◆ fGoodnessThreshold

unsigned int QTimingAnalyzer::fGoodnessThreshold
private

Goodness threshold at a certain false positive rate.

Definition at line 71 of file QTimingAnalyzer.hh.

Referenced by ComputeGoodnessThreshold(), and GetGoodnessThreshold().

◆ fNeedsSort

bool QTimingAnalyzer::fNeedsSort
private

Whether or not vector could be out of order.

Definition at line 74 of file QTimingAnalyzer.hh.

Referenced by AddValue(), and DistanceToClosestElement().

◆ fPeriod

double QTimingAnalyzer::fPeriod
private

Period for repetition of values.

Definition at line 77 of file QTimingAnalyzer.hh.

Referenced by ComputeGoodnessThreshold(), FindPeriod(), GetGoodnessParameter(), GetPeriod(), and SetExpectedPeriod().

◆ fTolerance

double QTimingAnalyzer::fTolerance
private

Size of window in which to look for event.

Definition at line 80 of file QTimingAnalyzer.hh.

Referenced by ComputeGoodnessThreshold(), GetGoodnessParameter(), and SetTolerance().

◆ fValues

std::vector<double> QTimingAnalyzer::fValues
private

The documentation for this class was generated from the following files: