GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TDecay Class Reference

Detailed Description

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.

Definition at line 338 of file TDecay.h.

Public Member Functions

 TDecay ()=default
 
 TDecay (const TDecay &)=default
 
 TDecay (std::vector< TDecayChain * > chainList)
 
 TDecay (TDecay &&) noexcept=default
 
 ~TDecay ()=default
 
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 ()
 
void FixBackground (const Double_t &background)
 
void FixHalfLife (Int_t Id, Double_t halflife)
 
Double_t GetBackground () const
 
Double_t GetBackgroundError () const
 
TDecayChainGetChain (UInt_t idx)
 
TDecayFitGetFitFunc ()
 
TGraph * GetResiduals ()
 
TDecayoperator= (const TDecay &)=default
 
TDecayoperator= (TDecay &&) noexcept=default
 
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)
 
const TDecayFitGetFitFunction () override
 
void RemakeMap ()
 
void SetParameters ()
 

Private Attributes

std::vector< TDecayChain * > fChainList
 
std::map< Int_t, std::vector< TSingleDecay * > > fDecayMap
 
TDecayFitfFitFunc {nullptr}
 
+ Inheritance diagram for TDecay:
+ Collaboration diagram for TDecay:

Constructor & Destructor Documentation

◆ TDecay() [1/4]

TDecay::TDecay ( )
default

◆ TDecay() [2/4]

TDecay::TDecay ( std::vector< TDecayChain * > chainList)
explicit

Definition at line 624 of file TDecay.cxx.

References DecayFit(), fFitFunc, RemakeMap(), TDecayFit::SetDecay(), and SetParameters().

◆ TDecay() [3/4]

TDecay::TDecay ( const TDecay & )
default

◆ TDecay() [4/4]

TDecay::TDecay ( TDecay && )
defaultnoexcept

◆ ~TDecay()

TDecay::~TDecay ( )
default

Member Function Documentation

◆ AddChain()

void TDecay::AddChain ( TDecayChain * chain)
inline

Definition at line 348 of file TDecay.h.

◆ ComponentFunc()

Double_t TDecay::ComponentFunc ( Double_t * dim,
Double_t * par )
private

Function for drawing summed components.

This function takes 1 parameter, the decay Id.

Definition at line 759 of file TDecay.cxx.

References fDecayMap.

Referenced by DrawComponents().

◆ DecayFit()

Double_t TDecay::DecayFit ( Double_t * dim,
Double_t * par )

This fits the total activity caused by the entire chain.

Definition at line 644 of file TDecay.cxx.

References fChainList, and fFitFunc.

Referenced by TDecay(), and SetParameters().

◆ Draw()

void TDecay::Draw ( Option_t * opt = "")
override

Definition at line 711 of file TDecay.cxx.

References fFitFunc, and SetParameters().

◆ DrawBackground()

void TDecay::DrawBackground ( Option_t * opt = "")

Definition at line 795 of file TDecay.cxx.

References fFitFunc, and GetBackground().

Referenced by DrawComponents().

◆ DrawComponents()

void TDecay::DrawComponents ( Option_t * opt = "",
Bool_t color_flag = true )
overridevirtual

Loop over all of the ids and draw them seperately on the pad

Reimplemented from TVirtualDecay.

Definition at line 773 of file TDecay.cxx.

References ComponentFunc(), DrawBackground(), fDecayMap, and fFitFunc.

◆ Fit()

TFitResultPtr TDecay::Fit ( TH1 * fithist,
Option_t * opt = "" )

◆ FixBackground() [1/2]

void TDecay::FixBackground ( )
inline

Definition at line 373 of file TDecay.h.

◆ FixBackground() [2/2]

void TDecay::FixBackground ( const Double_t & background)
inline

Definition at line 372 of file TDecay.h.

◆ FixHalfLife()

void TDecay::FixHalfLife ( Int_t Id,
Double_t halflife )
inline

Definition at line 355 of file TDecay.h.

◆ GetBackground()

Double_t TDecay::GetBackground ( ) const
inline

Definition at line 366 of file TDecay.h.

Referenced by DrawBackground(), and Print().

◆ GetBackgroundError()

Double_t TDecay::GetBackgroundError ( ) const
inline

Definition at line 367 of file TDecay.h.

Referenced by Print().

◆ GetChain()

TDecayChain * TDecay::GetChain ( UInt_t idx)

Definition at line 633 of file TDecay.cxx.

References fChainList, and SetParameters().

◆ GetFitFunc()

TDecayFit * TDecay::GetFitFunc ( )
inline

Definition at line 364 of file TDecay.h.

◆ GetFitFunction()

const TDecayFit * TDecay::GetFitFunction ( )
inlineoverrideprivatevirtual

Implements TVirtualDecay.

Definition at line 383 of file TDecay.h.

◆ GetResiduals()

TGraph * TDecay::GetResiduals ( )
inline

Definition at line 377 of file TDecay.h.

◆ operator=() [1/2]

TDecay & TDecay::operator= ( const TDecay & )
default

◆ operator=() [2/2]

TDecay & TDecay::operator= ( TDecay && )
defaultnoexcept

◆ Print()

void TDecay::Print ( Option_t * opt = "") const
overridevirtual

Implements TVirtualDecay.

Definition at line 846 of file TDecay.cxx.

References fDecayMap, GetBackground(), and GetBackgroundError().

◆ PrintMap()

void TDecay::PrintMap ( ) const

Definition at line 857 of file TDecay.cxx.

References fDecayMap.

◆ ReleaseBackground()

void TDecay::ReleaseBackground ( )
inline

Definition at line 375 of file TDecay.h.

◆ RemakeMap()

void TDecay::RemakeMap ( )
private

Definition at line 876 of file TDecay.cxx.

References fChainList, and fDecayMap.

Referenced by TDecay(), and SetParameters().

◆ SetBackground()

void TDecay::SetBackground ( Double_t background)
inline

Definition at line 365 of file TDecay.h.

◆ SetBackgroundLimits()

void TDecay::SetBackgroundLimits ( const Double_t & low,
const Double_t & high )
inline

Definition at line 374 of file TDecay.h.

◆ SetDecayRateLimits()

void TDecay::SetDecayRateLimits ( Int_t Id,
Double_t low,
Double_t high )

Definition at line 833 of file TDecay.cxx.

References fDecayMap.

◆ SetHalfLife()

void TDecay::SetHalfLife ( Int_t Id,
Double_t halflife )

Definition at line 807 of file TDecay.cxx.

References fDecayMap.

◆ SetHalfLifeLimits()

void TDecay::SetHalfLifeLimits ( Int_t Id,
Double_t low,
Double_t high )

Definition at line 820 of file TDecay.cxx.

References fDecayMap.

◆ SetParameters()

void TDecay::SetParameters ( )
private

◆ SetRange()

void TDecay::SetRange ( Double_t xlow,
Double_t xhigh )

Definition at line 868 of file TDecay.cxx.

References fChainList, and fFitFunc.

Member Data Documentation

◆ fChainList

std::vector<TDecayChain*> TDecay::fChainList
private

Definition at line 385 of file TDecay.h.

Referenced by DecayFit(), Fit(), GetChain(), RemakeMap(), SetParameters(), and SetRange().

◆ fDecayMap

std::map<Int_t, std::vector<TSingleDecay*> > TDecay::fDecayMap
private

◆ fFitFunc

TDecayFit* TDecay::fFitFunc {nullptr}
private

Definition at line 386 of file TDecay.h.

Referenced by TDecay(), DecayFit(), Draw(), DrawBackground(), DrawComponents(), Fit(), SetParameters(), and SetRange().