PAASS
Software suite to Acquire and Analyze Data from Pixie16
TimingDriver Class Reference

An abstract class that will be used to handle timing. More...

#include <TimingDriver.hpp>

Inheritance diagram for TimingDriver:
Collaboration diagram for TimingDriver:

Public Member Functions

 TimingDriver ()
 Default Constructor. More...
 
virtual ~TimingDriver ()
 Default destructor. More...
 
virtual std::vector< double > GetResults (void)
 
virtual double CalculatePhase (const std::vector< unsigned int > &data, const std::pair< double, double > &pars, const std::pair< unsigned int, double > &max, const std::pair< double, double > baseline)
 
virtual double CalculatePhase (const std::vector< double > &data, const std::pair< double, double > &pars, const std::pair< unsigned int, double > &max, const std::pair< double, double > baseline)
 
void SetQdc (const double &a)
 

Protected Attributes

std::vector< double > results_
 Vector containing results. More...
 
double qdc_
 qdc of the waveform being fitted More...
 

Detailed Description

An abstract class that will be used to handle timing.

Definition at line 13 of file TimingDriver.hpp.

Constructor & Destructor Documentation

§ TimingDriver()

TimingDriver::TimingDriver ( )
inline

Default Constructor.

Definition at line 16 of file TimingDriver.hpp.

§ ~TimingDriver()

virtual TimingDriver::~TimingDriver ( )
inlinevirtual

Default destructor.

Definition at line 19 of file TimingDriver.hpp.

Member Function Documentation

§ CalculatePhase() [1/2]

virtual double TimingDriver::CalculatePhase ( const std::vector< unsigned int > &  data,
const std::pair< double, double > &  pars,
const std::pair< unsigned int, double > &  max,
const std::pair< double, double >  baseline 
)
inlinevirtual

This is a virtual function that actually deifnes how we are going to determine the phase. We have several different implementations of how we can do this but we'll overload this method in the children to provide specific implementation.

Parameters
[in]data: The vector of data that we are going to work with. This usually means a trace or waveform.
[in]pars: The pair of parameters that we want to use for the algorithm. For Fitters this will be beta and gamma, for CFDs this will be the fraction and the delay.
[in]maxInfo: The information about the maximum in a pair of <position, value> NOTE : The value of the maximum for CFD based calculations should be the extrapolated maximum.
[in]a: The baseline information in a pair<baseline, stddev>
Returns
The phase calculated by the algorithm.

Definition at line 44 of file TimingDriver.hpp.

Here is the caller graph for this function:

§ CalculatePhase() [2/2]

virtual double TimingDriver::CalculatePhase ( const std::vector< double > &  data,
const std::pair< double, double > &  pars,
const std::pair< unsigned int, double > &  max,
const std::pair< double, double >  baseline 
)
inlinevirtual

Overload of the Calculate phase method to allow for data vectors of type double. We do this since we cannot template a virtual method.

Reimplemented in GslFitter, TraditionalCfd, PolynomialCfd, and RootFitter.

Definition at line 54 of file TimingDriver.hpp.

§ GetResults()

virtual std::vector<double> TimingDriver::GetResults ( void  )
inlinevirtual

This virtual function provides results other than the phase to the user. Please look at the documentation of the children to see exactly what is returned with this vector. Not sure this is the best way to do things, but it cut the number of methods necessary by a factor of 5 or 6.

Returns
A vector containing useful information calculated in addition to the phase.

Definition at line 28 of file TimingDriver.hpp.

§ SetQdc()

void TimingDriver::SetQdc ( const double &  a)
inline

Sets the QDC that we want to set

Parameters
[in]athe qdc of the waveform for the fit

Definition at line 63 of file TimingDriver.hpp.

Field Documentation

§ qdc_

double TimingDriver::qdc_
protected

qdc of the waveform being fitted

Definition at line 66 of file TimingDriver.hpp.

§ results_

std::vector<double> TimingDriver::results_
protected

Vector containing results.

Definition at line 65 of file TimingDriver.hpp.


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