![]() |
Project
|
Raw data fitting: Gamma-2 function. More...
#include <CaloRawFitterGamma2.h>
Inherits o2::emcal::CaloRawFitter.
Public Member Functions | |
CaloRawFitterGamma2 () | |
Constructor. | |
~CaloRawFitterGamma2 () final=default | |
Destructor. | |
void | setNiterationsMax (int n) |
int | getNiterations () |
int | getNiterationsMax () |
CaloFitResults | evaluate (const gsl::span< const Bunch > bunchvector) final |
Evaluation Amplitude and TOF. | |
![]() | |
CaloRawFitter (const char *name, const char *nameshort) | |
Constructor. | |
virtual | ~CaloRawFitter ()=default |
Destructor. | |
std::tuple< int, int, float, short, short, float, int, int > | preFitEvaluateSamples (const gsl::span< const Bunch > bunchvector, int adcThreshold) |
Method to do the selection of what should possibly be fitted. | |
void | setTimeConstraint (int min, int max) |
The require time range if the maximum ADC value is between min and max (timebin) | |
void | setIsZeroSuppressed (bool iszs=true) |
void | setAmpCut (float cut) |
void | setNsamplePed (int i) |
void | setL1Phase (double phase) |
bool | getIsZeroSuppressed () const |
float | getAmpCut () const |
int | getNsamplePed () const |
double | getReversed (const int i) const |
const std::string_view | getAlgoName () const |
const std::string_view | getAlgoAbbr () const |
FitAlgorithm | getAlgo () const |
Get Type of the fit algorithm. | |
std::tuple< short, int > | getMaxAmplitudeBunch (const Bunch &bunchx) const |
Get the maximum amplitude and its index of a bunch array. | |
unsigned short | getMaxAmplitudeBunch (const gsl::span< unsigned short > data) const |
Get maximum of array. | |
bool | isMaxADCBunchEdge (const Bunch &bunch) const |
Check if the max. ADC value is at the edge of a bunch. | |
bool | isInTimeRange (int indexMaxADC, int maxtime, int mintime) const |
Check if the index of the max ADC vaue is within accepted time range. | |
std::tuple< float, std::array< double, constants::EMCAL_MAXTIMEBINS > > | reverseAndSubtractPed (const Bunch &bunch) const |
Time sample comes in reversed order, revers them back Subtract the baseline based on content of altrocfg1 and altrocfg2. | |
std::tuple< short, short, short > | selectMaximumBunch (const gsl::span< const Bunch > &bunchvector) |
We select the bunch with the highest amplitude unless any time constraints is set. | |
std::tuple< int, int > | findPeakRegion (const gsl::span< double > adcValues, short indexMaxADC, int threshold) const |
Find region constrainded by its closest minima around the main peak. | |
double | evaluatePedestal (const gsl::span< const uint16_t > data, std::optional< int > length) const |
Calculate the pedestal from the ADC values in a bunch. | |
double | calculateChi2 (double amp, double time, int first, int last, double adcErr=1, double tau=2.35) const |
Calculates the chi2 of the fit. | |
int | getMinTimeIndex () const |
int | getMaxTimeIndex () const |
Additional Inherited Members | |
![]() | |
enum class | RawFitterError_t { SAMPLE_UNINITIALIZED , FIT_ERROR , CHI2_ERROR , BUNCH_NOT_OK , LOW_SIGNAL } |
Error codes for failures in raw fitter procedure. More... | |
![]() | |
static std::string | createErrorMessage (RawFitterError_t fiterror) |
Create error message for a given error type. | |
static int | getErrorNumber (RawFitterError_t fiterror) |
Convert error type to numeric representation. | |
static RawFitterError_t | intToErrorType (unsigned int fiterror) |
Convert numeric representation of error type to RawFitterError_t. | |
static constexpr int | getNumberOfErrorTypes () noexcept |
Get the number of raw fit error types supported. | |
static const char * | getErrorTypeName (RawFitterError_t fiterror) |
Get the name connected to the fit error type. | |
static const char * | getErrorTypeName (unsigned int fiterror) |
Get the name connected to the fit error type. | |
static const char * | getErrorTypeTitle (RawFitterError_t fiterror) |
Get the title connected to the fit error type. | |
static const char * | getErrorTypeTitle (unsigned int fiterror) |
Get the title connected to the fit error type. | |
static const char * | getErrorTypeDescription (RawFitterError_t fiterror) |
Get the description connected to the fit error type. | |
static const char * | getErrorTypeDescription (unsigned int fiterror) |
Get the description connected to the fit error type. | |
![]() | |
ClassDefNV (CaloRawFitter, 1) | |
![]() | |
std::array< double, constants::EMCAL_MAXTIMEBINS > | mReversed |
Reversed sequence of samples (pedestalsubtracted) | |
int | mMinTimeIndex |
The timebin of the max signal value must be between fMinTimeIndex and fMaxTimeIndex. | |
int | mMaxTimeIndex |
The timebin of the max signal value must be between fMinTimeIndex and fMaxTimeIndex. | |
float | mAmpCut |
Max ADC - pedestal must be higher than this befor attemting to extract the amplitude. | |
int | mNsamplePed |
Number of samples used for pedestal calculation (first in bunch) | |
bool | mIsZerosupressed |
Wether or not the data is zeros supressed, by default its assumed that the baseline is also subtracted if set to true. | |
std::string | mName |
Name of the algorithm. | |
std::string | mNameShort |
Abbrevation for the name. | |
FitAlgorithm | mAlgo |
Which algorithm to use. | |
double | mL1Phase |
Phase of the ADC sampling clock relative to the LHC clock. | |
double | mAmp |
The amplitude in entities of ADC counts. | |
Raw data fitting: Gamma-2 function.
Evaluation of amplitude and peak position using gamma-2 function. Derivatives calculated analytically. Newton's method used for solving the set of non-linear equations. Ported from class AliCaloRawAnalyzerGamma2 from AliRoot
Definition at line 41 of file CaloRawFitterGamma2.h.
CaloRawFitterGamma2::CaloRawFitterGamma2 | ( | ) |
Constructor.
Definition at line 30 of file CaloRawFitterGamma2.cxx.
|
finaldefault |
Destructor.
|
finalvirtual |
Evaluation Amplitude and TOF.
bunchvector | ALTRO bunches for the current channel |
altrocfg1 | ALTRO config register 1 from RCU trailer |
altrocfg2 | ALTRO config register 2 from RCU trailer |
RawFitterError_t::FIT_ERROR | in case the peak fit failed |
Implements o2::emcal::CaloRawFitter.
Definition at line 35 of file CaloRawFitterGamma2.cxx.
|
inline |
Definition at line 52 of file CaloRawFitterGamma2.h.
|
inline |
Definition at line 53 of file CaloRawFitterGamma2.h.
Definition at line 51 of file CaloRawFitterGamma2.h.