GRSISort
Created by P.C. Bender
Developement Team: P.C. Bender, R. Dunlop, V. Bildstein
An extension of the ROOT analysis Framework
TDecayFit Class Reference

Definition at line 25 of file TDecay.h.

Public Member Functions

 TDecayFit ()
 
 TDecayFit (const char *name, const char *formula, Double_t xmin=0, Double_t xmax=1)
 
 TDecayFit (const char *name, Double_t xmin, Double_t xmax, Int_t npar)
 
 TDecayFit (const char *name, ROOT::Math::ParamFunctor f, Double_t xmin=0, Double_t xmax=1, Int_t npar=0)
 
 TDecayFit (const char *name, Double_t(*fcn)(Double_t *, Double_t *), Double_t xmin=0, Double_t xmax=1, Int_t npar=0)
 
 TDecayFit (const char *name, Double_t(*fcn)(const Double_t *, const Double_t *), Double_t xmin=0, Double_t xmax=1, Int_t npar=0)
 
template<class PtrObj , typename MemFn >
 TDecayFit (const char *name, const PtrObj &p, MemFn memFn, Double_t xmin, Double_t xmax, Int_t npar, const char *className=nullptr, const char *methodName=nullptr)
 
template<typename Func >
 TDecayFit (const char *name, Func f, Double_t xmin, Double_t xmax, Int_t npar, const char *className=nullptr)
 
 ~TDecayFit () override
 
void DrawComponents () const
 
void DrawResiduals ()
 
TFitResultPtr Fit (TH1 *hist, Option_t *opt="")
 
TVirtualDecayGetDecay () const
 
TGraph * GetResiduals ()
 
void Print (Option_t *opt="") const override
 
void SetDecay (TVirtualDecay *decay)
 
void UpdateResiduals (TH1 *hist)
 

Private Member Functions

void DefaultGraphs ()
 

Private Attributes

TVirtualDecayfDecay
 
TGraph fResiduals
 

#include <TDecay.h>

+ Inheritance diagram for TDecayFit:
+ Collaboration diagram for TDecayFit:

Constructor & Destructor Documentation

◆ TDecayFit() [1/8]

TDecayFit::TDecayFit ( )
inline

Definition at line 27 of file TDecay.h.

◆ TDecayFit() [2/8]

TDecayFit::TDecayFit ( const char *  name,
const char *  formula,
Double_t  xmin = 0,
Double_t  xmax = 1 
)
inline

Definition at line 28 of file TDecay.h.

References DefaultGraphs().

◆ TDecayFit() [3/8]

TDecayFit::TDecayFit ( const char *  name,
Double_t  xmin,
Double_t  xmax,
Int_t  npar 
)
inline

Definition at line 33 of file TDecay.h.

References DefaultGraphs().

◆ TDecayFit() [4/8]

TDecayFit::TDecayFit ( const char *  name,
ROOT::Math::ParamFunctor  f,
Double_t  xmin = 0,
Double_t  xmax = 1,
Int_t  npar = 0 
)
inline

Definition at line 37 of file TDecay.h.

References DefaultGraphs().

◆ TDecayFit() [5/8]

TDecayFit::TDecayFit ( const char *  name,
Double_t(*)(Double_t *, Double_t *)  fcn,
Double_t  xmin = 0,
Double_t  xmax = 1,
Int_t  npar = 0 
)
inline

Definition at line 43 of file TDecay.h.

References DefaultGraphs().

◆ TDecayFit() [6/8]

TDecayFit::TDecayFit ( const char *  name,
Double_t(*)(const Double_t *, const Double_t *)  fcn,
Double_t  xmin = 0,
Double_t  xmax = 1,
Int_t  npar = 0 
)
inline

Definition at line 49 of file TDecay.h.

References DefaultGraphs().

◆ TDecayFit() [7/8]

template<class PtrObj , typename MemFn >
TDecayFit::TDecayFit ( const char *  name,
const PtrObj &  p,
MemFn  memFn,
Double_t  xmin,
Double_t  xmax,
Int_t  npar,
const char *  className = nullptr,
const char *  methodName = nullptr 
)
inline

Definition at line 58 of file TDecay.h.

References DefaultGraphs().

◆ TDecayFit() [8/8]

template<typename Func >
TDecayFit::TDecayFit ( const char *  name,
Func  f,
Double_t  xmin,
Double_t  xmax,
Int_t  npar,
const char *  className = nullptr 
)
inline

Definition at line 66 of file TDecay.h.

References DefaultGraphs().

◆ ~TDecayFit()

TDecayFit::~TDecayFit ( )
overridedefault

Member Function Documentation

◆ DefaultGraphs()

void TDecayFit::DefaultGraphs ( )
private

Definition at line 70 of file TDecay.cxx.

References fResiduals.

Referenced by TDecayFit().

◆ DrawComponents()

void TDecayFit::DrawComponents ( ) const

This draws the individual components on the current canvas

Definition at line 21 of file TDecay.cxx.

References TVirtualDecay::DrawComponents(), and fDecay.

◆ DrawResiduals()

void TDecayFit::DrawResiduals ( )

Definition at line 110 of file TDecay.cxx.

References fResiduals.

◆ Fit()

TFitResultPtr TDecayFit::Fit ( TH1 *  hist,
Option_t *  opt = "" 
)

Definition at line 45 of file TDecay.cxx.

References hist, and UpdateResiduals().

Referenced by TSingleDecay::Fit(), TDecayChain::Fit(), and TDecay::Fit().

◆ GetDecay()

TVirtualDecay * TDecayFit::GetDecay ( ) const

Definition at line 40 of file TDecay.cxx.

References fDecay.

Referenced by TDecay::Fit(), and TDecay::SetParameters().

◆ GetResiduals()

TGraph* TDecayFit::GetResiduals ( )
inline

Definition at line 80 of file TDecay.h.

References fResiduals.

Referenced by TDecay::GetResiduals().

◆ Print()

void TDecayFit::Print ( Option_t *  opt = "") const
override

This prints the parameters of the fit (decay rate, intensities, etc...)

Definition at line 33 of file TDecay.cxx.

References fDecay.

◆ SetDecay()

void TDecayFit::SetDecay ( TVirtualDecay decay)

This tells the TDecayFit which TVirtualDecay it belongs to

Definition at line 27 of file TDecay.cxx.

References fDecay.

Referenced by TDecay::SetParameters(), TDecay::TDecay(), TDecayChain::TDecayChain(), and TSingleDecay::TSingleDecay().

◆ UpdateResiduals()

void TDecayFit::UpdateResiduals ( TH1 *  hist)

GetHist()->GetBinError(i));// + GetParameter("Height") + 10.;

Definition at line 77 of file TDecay.cxx.

References fResiduals, and hist.

Referenced by Fit().

Member Data Documentation

◆ fDecay

TVirtualDecay* TDecayFit::fDecay
private

Definition at line 87 of file TDecay.h.

Referenced by DrawComponents(), GetDecay(), Print(), and SetDecay().

◆ fResiduals

TGraph TDecayFit::fResiduals
private

Definition at line 88 of file TDecay.h.

Referenced by DefaultGraphs(), DrawResiduals(), GetResiduals(), and UpdateResiduals().