Project
Loading...
Searching...
No Matches
o2::phos::CaloRawFitter Class Reference

#include <CaloRawFitter.h>

Inherited by o2::phos::CaloRawFitterGS.

Public Types

enum  FitStatus {
  kOK , kNotEvaluated , kEmptyBunch , kOverflow ,
  kSpike , kNoTime , kFitFailed , kBadPedestal ,
  kManyBunches
}
 

Public Member Functions

 CaloRawFitter ()
 Constructor.
 
virtual ~CaloRawFitter ()=default
 Destructor.
 
virtual FitStatus evaluate (gsl::span< short unsigned int > signal)
 Evaluation Amplitude and TOF return status -1: not evaluated/empty bunch; 0: OK; 1: overflow; 4: single spikes 3: too large RMS;.
 
void setLowGain (bool isLow=false)
 Set HighGain/LowGain channel to performe or not fit of saturated samples.
 
void setPedSubtract (bool toSubtruct=false)
 estimate and subtract pedestals from pre-samples
 
float getAmp () const
 amplitude in last fitted sample
 
float getChi2 () const
 Chi2/NDF of last performed fit.
 
float getTime () const
 time in last fitted sample
 
bool isOverflow () const
 is last fitted sample has overflow
 
void forseFitting (bool toRunFit=true)
 Forse perform fitting Make fit for any sample, not only saturated LowGain samples as by default.
 
void setPedestal ()
 Set analysis of pedestal run Analyze pedestal run, i.e. calculate mean and RMS of pedestals instead of Amp and Time.
 

Protected Member Functions

FitStatus evalKLevel (gsl::span< short unsigned int > signal)
 
 ClassDef (CaloRawFitter, 1)
 

Protected Attributes

bool makeFit = false
 run (slow) fit with Gamma2 or use fast evaluation with k-level
 
bool mLowGain = false
 is current bunch from LowGain channel
 
bool mPedSubtract = false
 should one evaluate and subtract pedestals
 
bool mPedestalRun = false
 analyze as pedestal run
 
bool mOverflow
 is last sample saturated
 
FitStatus mStatus = kNotEvaluated
 status of last evaluated sample: -1: not yet evaluated; 0: OK; 1: overflow; 2: too large RMS; 3: single spikes
 
short mMaxSample = 0
 maximal sample
 
float mAmp
 amplitude of last processed sample
 
float mTime = 0
 time of last processed sample
 
float mChi2 = 1e10
 chi2 calculated in last fit
 
short mSpikeThreshold
 
short mBaseLine
 
short mPreSamples
 

Detailed Description

Definition at line 33 of file CaloRawFitter.h.

Member Enumeration Documentation

◆ FitStatus

Enumerator
kOK 
kNotEvaluated 
kEmptyBunch 
kOverflow 
kSpike 
kNoTime 
kFitFailed 
kBadPedestal 
kManyBunches 

Definition at line 37 of file CaloRawFitter.h.

Constructor & Destructor Documentation

◆ CaloRawFitter()

CaloRawFitter::CaloRawFitter ( )

Constructor.

Definition at line 22 of file CaloRawFitter.cxx.

◆ ~CaloRawFitter()

virtual o2::phos::CaloRawFitter::~CaloRawFitter ( )
virtualdefault

Destructor.

Member Function Documentation

◆ ClassDef()

o2::phos::CaloRawFitter::ClassDef ( CaloRawFitter  ,
 
)
protected

◆ evalKLevel()

CaloRawFitter::FitStatus CaloRawFitter::evalKLevel ( gsl::span< short unsigned int signal)
protected

Definition at line 60 of file CaloRawFitter.cxx.

◆ evaluate()

CaloRawFitter::FitStatus CaloRawFitter::evaluate ( gsl::span< short unsigned int signal)
virtual

Evaluation Amplitude and TOF return status -1: not evaluated/empty bunch; 0: OK; 1: overflow; 4: single spikes 3: too large RMS;.

Reimplemented in o2::phos::CaloRawFitterGS.

Definition at line 30 of file CaloRawFitter.cxx.

◆ forseFitting()

void o2::phos::CaloRawFitter::forseFitting ( bool  toRunFit = true)
inline

Forse perform fitting Make fit for any sample, not only saturated LowGain samples as by default.

Definition at line 82 of file CaloRawFitter.h.

◆ getAmp()

float o2::phos::CaloRawFitter::getAmp ( ) const
inline

amplitude in last fitted sample

Definition at line 69 of file CaloRawFitter.h.

◆ getChi2()

float o2::phos::CaloRawFitter::getChi2 ( ) const
inline

Chi2/NDF of last performed fit.

Definition at line 72 of file CaloRawFitter.h.

◆ getTime()

float o2::phos::CaloRawFitter::getTime ( ) const
inline

time in last fitted sample

Definition at line 75 of file CaloRawFitter.h.

◆ isOverflow()

bool o2::phos::CaloRawFitter::isOverflow ( ) const
inline

is last fitted sample has overflow

Definition at line 78 of file CaloRawFitter.h.

◆ setLowGain()

void o2::phos::CaloRawFitter::setLowGain ( bool  isLow = false)
inline

Set HighGain/LowGain channel to performe or not fit of saturated samples.

Definition at line 63 of file CaloRawFitter.h.

◆ setPedestal()

void o2::phos::CaloRawFitter::setPedestal ( )
inline

Set analysis of pedestal run Analyze pedestal run, i.e. calculate mean and RMS of pedestals instead of Amp and Time.

Definition at line 86 of file CaloRawFitter.h.

◆ setPedSubtract()

void o2::phos::CaloRawFitter::setPedSubtract ( bool  toSubtruct = false)
inline

estimate and subtract pedestals from pre-samples

Definition at line 66 of file CaloRawFitter.h.

Member Data Documentation

◆ makeFit

bool o2::phos::CaloRawFitter::makeFit = false
protected

run (slow) fit with Gamma2 or use fast evaluation with k-level

Definition at line 92 of file CaloRawFitter.h.

◆ mAmp

float o2::phos::CaloRawFitter::mAmp
protected

amplitude of last processed sample

Definition at line 99 of file CaloRawFitter.h.

◆ mBaseLine

short o2::phos::CaloRawFitter::mBaseLine
protected

Definition at line 103 of file CaloRawFitter.h.

◆ mChi2

float o2::phos::CaloRawFitter::mChi2 = 1e10
protected

chi2 calculated in last fit

Definition at line 101 of file CaloRawFitter.h.

◆ mLowGain

bool o2::phos::CaloRawFitter::mLowGain = false
protected

is current bunch from LowGain channel

Definition at line 93 of file CaloRawFitter.h.

◆ mMaxSample

short o2::phos::CaloRawFitter::mMaxSample = 0
protected

maximal sample

Definition at line 98 of file CaloRawFitter.h.

◆ mOverflow

bool o2::phos::CaloRawFitter::mOverflow
protected

is last sample saturated

Definition at line 96 of file CaloRawFitter.h.

◆ mPedestalRun

bool o2::phos::CaloRawFitter::mPedestalRun = false
protected

analyze as pedestal run

Definition at line 95 of file CaloRawFitter.h.

◆ mPedSubtract

bool o2::phos::CaloRawFitter::mPedSubtract = false
protected

should one evaluate and subtract pedestals

Definition at line 94 of file CaloRawFitter.h.

◆ mPreSamples

short o2::phos::CaloRawFitter::mPreSamples
protected

Definition at line 104 of file CaloRawFitter.h.

◆ mSpikeThreshold

short o2::phos::CaloRawFitter::mSpikeThreshold
protected

Definition at line 102 of file CaloRawFitter.h.

◆ mStatus

FitStatus o2::phos::CaloRawFitter::mStatus = kNotEvaluated
protected

status of last evaluated sample: -1: not yet evaluated; 0: OK; 1: overflow; 2: too large RMS; 3: single spikes

Definition at line 97 of file CaloRawFitter.h.

◆ mTime

float o2::phos::CaloRawFitter::mTime = 0
protected

time of last processed sample

Definition at line 100 of file CaloRawFitter.h.


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