|
DDASToys for NSCLDAQ
6.2-000
|
Provides an interface for calculating trace fits using HitExtension fit parameters. More...
#include <FitManager.h>
Public Member Functions | |
| FitManager () | |
| Constructor. More... | |
| ~FitManager () | |
| Destructor. More... | |
| void | configure (std::string method) |
| Configure the fit method settings. More... | |
| void | readConfigFile () |
| Read the configuration file using the Configuration class. More... | |
| void | readTemplateFile () |
| Read the template file using the Configuration class. More... | |
| std::vector< double > | getSinglePulseFit (const ddastoys::HitExtension &ext, unsigned low, unsigned high) |
| Create and return a vector of fit values for each trace sample in the fit range. More... | |
| std::vector< double > | getDoublePulseFit (const ddastoys::HitExtension &ext, unsigned low, unsigned high) |
| Create and return a vector of fit values for each trace sample in the fit range. More... | |
| unsigned | getLowFitLimit (const ddastoys::DDASFitHit &hit) |
| Get the lower limit of the fit range. More... | |
| unsigned | getHighFitLimit (const ddastoys::DDASFitHit &hit) |
| Get the upper limit of the fit range. More... | |
| void | setMethod (fitMethod m) |
| Set the fitting method. More... | |
| enum fitMethod | getMethod () |
| Get the fitting method. More... | |
Provides an interface for calculating trace fits using HitExtension fit parameters.
Wrapper class to call fitting functions from either the analytic fit or the template fit using the same signature. This is achieved by encapsulating the template-specfic data (the template itself and its align point) in this class by accessing the Configuration settings and switching based on the enum type.
| FitManager::FitManager | ( | ) |
Constructor.
The FitManager owns a Configuration object used to read settings from configuration files.
| FitManager::~FitManager | ( | ) |
Destructor.
Delete the Configuration object owned by this class.
| void FitManager::configure | ( | std::string | method | ) |
Configure the fit method settings.
| method | String describing the fit method. |
Configuration is performed based on a text string which comes directly from the text of the fit method selection box. We do need to know what those possible strings are. Terminate the program and issue an error message if the fit method is not known.
| std::vector< double > FitManager::getDoublePulseFit | ( | const ddastoys::HitExtension & | ext, |
| unsigned | low, | ||
| unsigned | high | ||
| ) |
Create and return a vector of fit values for each trace sample in the fit range.
| ext | References the HitExtension containing the fit parameters for this hit. |
| low | Low limit of the fit in samples. |
| high | High limit of the fit in samples. |
| unsigned FitManager::getHighFitLimit | ( | const ddastoys::DDASFitHit & | hit | ) |
Get the upper limit of the fit range.
| hit | References the hit we are currently processing. |
The fitting range is mapped in the Configuration class for hits keyed by a unique identifier derived from their crate/slot/channel. Note that the high fitting limit is inclusive.
| unsigned FitManager::getLowFitLimit | ( | const ddastoys::DDASFitHit & | hit | ) |
Get the lower limit of the fit range.
| hit | References the hit we are currently processing. |
The fitting range is mapped in the Configuration class for hits keyed by a unique identifier derived from their crate/slot/channel. Note that the low fitting limit is inclusive.
|
inline |
Get the fitting method.
| std::vector< double > FitManager::getSinglePulseFit | ( | const ddastoys::HitExtension & | ext, |
| unsigned | low, | ||
| unsigned | high | ||
| ) |
Create and return a vector of fit values for each trace sample in the fit range.
| ext | References the HitExtension containing the fit parameters for this hit. |
| low | Low limit of the fit in samples. |
| high | High limit of the fit in samples. |
| void FitManager::readConfigFile | ( | ) |
Read the configuration file using the Configuration class.
Will terminate the program and issue an error message if the configuration file cannot be read.
| void FitManager::readTemplateFile | ( | ) |
Read the template file using the Configuration class.
Will terminate the program and issue an error message if the configuration file cannot be read.
|
inline |
Set the fitting method.
| m | fitMethod enum type. |