ant
A2 ant: class-based analysis framework
ant::calibration::gui::FitVetoBand Class Reference

#include <FitVetoBand.h>

+ Inheritance diagram for ant::calibration::gui::FitVetoBand:
+ Collaboration diagram for ant::calibration::gui::FitVetoBand:

Public Member Functions

 FitVetoBand ()
 
 ~FitVetoBand ()
 
void Draw () override
 
void Fit (TH1 *hist) override
 
void FitSignal (TH1 *hist) override
 
void FitBackground (TH1 *hist) override
 
void SetDefaults (TH1 *hist) override
 Set/Calculate default parameter values. The hist that will be fitted later is given to allow adaptions. More...
 
void SetRange (ant::interval< double > i) override
 
ant::interval< double > GetRange () const override
 
virtual void Sync () override
 
SavedState_t Save () const override
 Save the current fit parameters to a vector. Can then later be loaded again using Load() More...
 
void Load (const SavedState_t &data) override
 Load fit parameters from a vector. Useful to load previously used ones. More...
 
double Eval (const double energy) const
 
double EvalReference (const double energy) const
 
- Public Member Functions inherited from ant::calibration::gui::FitFunction
virtual ~FitFunction ()
 
knoblist_tGetKnobs ()
 
void SetAdditionalFitArgs (const std::string &args)
 
virtual double Chi2NDF () const
 Get the reduced chi^2 (=chi^2/ndf) of last fit. More...
 
virtual double Chi2 () const
 Get the Chi^2 of last fit. More...
 
virtual double NDF () const
 Get the Number of degrees of freedom of last fit. More...
 

Protected Attributes

TF1 * signal
 
TF1 * bg
 
TF1 * ref
 
- Protected Attributes inherited from ant::calibration::gui::FitFunction
TF1 * func = nullptr
 
knoblist_t knobs
 

Additional Inherited Members

- Public Types inherited from ant::calibration::gui::FitFunction
using knoblist_t = std::list< std::unique_ptr< IndicatorKnob > >
 
using SavedState_t = std::vector< double >
 
- Public Attributes inherited from ant::calibration::gui::FitFunction
std::string AdditionalFitArgs
 
- Protected Member Functions inherited from ant::calibration::gui::FitFunction
template<typename T , typename ... Args_t>
void AddKnob (Args_t &&... args)
 
void doFit (TH1 *hist)
 
- Static Protected Member Functions inherited from ant::calibration::gui::FitFunction
static ant::interval< double > getRange (const TF1 *func)
 
static void setRange (TF1 *func, const ant::interval< double > &i)
 
static void saveTF1 (const TF1 *func, SavedState_t &out)
 
static void loadTF1 (SavedState_t::const_iterator &data_pos, TF1 *func)
 

Constructor & Destructor Documentation

◆ FitVetoBand()

FitVetoBand::FitVetoBand ( )

◆ ~FitVetoBand()

FitVetoBand::~FitVetoBand ( )

Member Function Documentation

◆ Draw()

void FitVetoBand::Draw ( )
overridevirtual

◆ Eval()

double FitVetoBand::Eval ( const double  energy) const

◆ EvalReference()

double FitVetoBand::EvalReference ( const double  energy) const

◆ Fit()

void FitVetoBand::Fit ( TH1 *  hist)
overridevirtual

◆ FitBackground()

void gui::FitVetoBand::FitBackground ( TH1 *  hist)
overridevirtual

◆ FitSignal()

void gui::FitVetoBand::FitSignal ( TH1 *  hist)
overridevirtual

◆ GetRange()

ant::interval< double > FitVetoBand::GetRange ( ) const
overridevirtual

◆ Load()

void FitVetoBand::Load ( const SavedState_t data)
overridevirtual

Load fit parameters from a vector. Useful to load previously used ones.

Parameters
datavector containing the values. Internal format (meaning of each double and the size of the vector) is up to the implementation of each function.
See also
Save()

Implements ant::calibration::gui::FitFunction.

◆ Save()

FitFunction::SavedState_t FitVetoBand::Save ( ) const
overridevirtual

Save the current fit parameters to a vector. Can then later be loaded again using Load()

Returns
vector containing all parameters. Internal format (meaning of each double and the size of the vector) is up to the implementation of each function.

Implements ant::calibration::gui::FitFunction.

◆ SetDefaults()

void FitVetoBand::SetDefaults ( TH1 *  hist)
overridevirtual

Set/Calculate default parameter values. The hist that will be fitted later is given to allow adaptions.

Parameters
histThe hist to fit later

Implements ant::calibration::gui::FitFunction.

◆ SetRange()

void FitVetoBand::SetRange ( ant::interval< double >  i)
overridevirtual

◆ Sync()

void FitVetoBand::Sync ( )
overridevirtual

Member Data Documentation

◆ bg

TF1* ant::calibration::gui::FitVetoBand::bg
protected

◆ ref

TF1* ant::calibration::gui::FitVetoBand::ref
protected

◆ signal

TF1* ant::calibration::gui::FitVetoBand::signal
protected

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