TDecay is a class for fitting halflives during nuclear decay A TDecay consists of multiple TDecayChains, where a TDecayChain is starts at a specific nucleus which has a population before the decay fit takes place. This could be a nucleus with a daughter. One TDecayChain would consist of just the daughter while the the other decay chain would be the parent and daughter. TDecayChains are made up of multiple TSingleDecays which holds the nucleus specific information such as name, id, halflife and intensity. When any of the above classes are fit to a histogram, they use a TDecayFit. The TDecayFit is a a TF1 with extra information such as the class that was used to create the TDecayFit. Furthermore, the function DrawComponents() can be used to draw the activites of the individual nuclei involved in the TDecayFit.
Public Member Functions | |
TDecay () | |
TDecay (std::vector< TDecayChain *> chainlist) | |
~TDecay () override | |
void | AddChain (TDecayChain *chain) |
Double_t | DecayFit (Double_t *dim, Double_t *par) |
void | Draw (Option_t *opt="") override |
void | DrawBackground (Option_t *opt="") |
void | DrawComponents (Option_t *opt="", Bool_t color_flag=true) override |
TFitResultPtr | Fit (TH1 *fithist, Option_t *opt="") |
void | FixBackground (const Double_t &background) |
void | FixBackground () |
void | FixHalfLife (Int_t Id, Double_t halflife) |
Double_t | GetBackground () const |
Double_t | GetBackgroundError () const |
TDecayChain * | GetChain (UInt_t idx) |
TDecayFit * | GetFitFunc () |
TGraph * | GetResiduals () |
void | Print (Option_t *opt="") const override |
void | PrintMap () const |
void | ReleaseBackground () |
void | SetBackground (Double_t background) |
void | SetBackgroundLimits (const Double_t &low, const Double_t &high) |
void | SetDecayRateLimits (Int_t Id, Double_t low, Double_t high) |
void | SetHalfLife (Int_t Id, Double_t halflife) |
void | SetHalfLifeLimits (Int_t Id, Double_t low, Double_t high) |
void | SetRange (Double_t xlow, Double_t xhigh) |
Private Member Functions | |
Double_t | ComponentFunc (Double_t *dim, Double_t *par) |
TDecayFit const * | GetFitFunction () override |
void | RemakeMap () |
void | SetParameters () |
Private Attributes | |
std::vector< TDecayChain * > | fChainList |
std::map< Int_t, std::vector< TSingleDecay * > > | fDecayMap |
TDecayFit * | fFitFunc |
#include <TDecay.h>
TDecay::TDecay | ( | std::vector< TDecayChain *> | chainlist | ) |
Definition at line 652 of file TDecay.cxx.
References DecayFit(), fChainList, fFitFunc, RemakeMap(), TDecayFit::SetDecay(), and SetParameters().
|
override |
Definition at line 662 of file TDecay.cxx.
|
inline |
Definition at line 337 of file TDecay.h.
References fChainList.
|
private |
Function for drawing summed components.
This function takes 1 parameter, the decay Id.
Definition at line 796 of file TDecay.cxx.
References fDecayMap.
Referenced by DrawComponents().
Double_t TDecay::DecayFit | ( | Double_t * | dim, |
Double_t * | par | ||
) |
This fits the total activity caused by the entire chain.
Definition at line 678 of file TDecay.cxx.
References fChainList, and fFitFunc.
Referenced by SetParameters(), and TDecay().
|
override |
Definition at line 745 of file TDecay.cxx.
References fFitFunc, and SetParameters().
void TDecay::DrawBackground | ( | Option_t * | opt = "" | ) |
Definition at line 831 of file TDecay.cxx.
References fFitFunc, and GetBackground().
Referenced by DrawComponents().
|
overridevirtual |
Loop over all of the ids and draw them seperately on the pad
Reimplemented from TVirtualDecay.
Definition at line 810 of file TDecay.cxx.
References ComponentFunc(), DrawBackground(), fDecayMap, and fFitFunc.
TFitResultPtr TDecay::Fit | ( | TH1 * | fithist, |
Option_t * | opt = "" |
||
) |
Definition at line 700 of file TDecay.cxx.
References fChainList, fFitFunc, TDecayFit::Fit(), TLMFitter::Fit(), TDecayFit::GetDecay(), and SetParameters().
|
inline |
|
inline |
Definition at line 362 of file TDecay.h.
References fFitFunc, and GetBackground().
|
inline |
Definition at line 344 of file TDecay.h.
References SetHalfLife(), and SetHalfLifeLimits().
|
inline |
Definition at line 355 of file TDecay.h.
References fFitFunc.
Referenced by DrawBackground(), FixBackground(), and Print().
|
inline |
TDecayChain * TDecay::GetChain | ( | UInt_t | idx | ) |
Definition at line 667 of file TDecay.cxx.
References fChainList, and SetParameters().
|
inline |
|
inlineoverrideprivatevirtual |
|
inline |
Definition at line 366 of file TDecay.h.
References fFitFunc, and TDecayFit::GetResiduals().
|
overridevirtual |
Implements TVirtualDecay.
Definition at line 881 of file TDecay.cxx.
References fDecayMap, GetBackground(), and GetBackgroundError().
void TDecay::PrintMap | ( | ) | const |
Definition at line 891 of file TDecay.cxx.
References fDecayMap.
|
inline |
|
private |
Definition at line 910 of file TDecay.cxx.
References fChainList, and fDecayMap.
Referenced by SetParameters(), and TDecay().
|
inline |
|
inline |
void TDecay::SetDecayRateLimits | ( | Int_t | Id, |
Double_t | low, | ||
Double_t | high | ||
) |
Definition at line 868 of file TDecay.cxx.
References fDecayMap.
void TDecay::SetHalfLife | ( | Int_t | Id, |
Double_t | halflife | ||
) |
void TDecay::SetHalfLifeLimits | ( | Int_t | Id, |
Double_t | low, | ||
Double_t | high | ||
) |
|
private |
Definition at line 751 of file TDecay.cxx.
References DecayFit(), fChainList, fDecayMap, fFitFunc, TDecayFit::GetDecay(), RemakeMap(), and TDecayFit::SetDecay().
Referenced by Draw(), Fit(), GetChain(), and TDecay().
void TDecay::SetRange | ( | Double_t | xlow, |
Double_t | xhigh | ||
) |
Definition at line 902 of file TDecay.cxx.
References fChainList, and fFitFunc.
|
private |
Definition at line 375 of file TDecay.h.
Referenced by AddChain(), DecayFit(), Fit(), GetChain(), RemakeMap(), SetParameters(), SetRange(), and TDecay().
|
private |
Definition at line 377 of file TDecay.h.
Referenced by ComponentFunc(), DrawComponents(), Print(), PrintMap(), RemakeMap(), SetDecayRateLimits(), SetHalfLife(), SetHalfLifeLimits(), and SetParameters().
|
private |
Definition at line 376 of file TDecay.h.
Referenced by DecayFit(), Draw(), DrawBackground(), DrawComponents(), Fit(), FixBackground(), GetBackground(), GetBackgroundError(), GetFitFunc(), GetFitFunction(), GetResiduals(), ReleaseBackground(), SetBackground(), SetBackgroundLimits(), SetParameters(), SetRange(), and TDecay().