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

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 331 of file TDecay.h.

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
 
TDecayChainGetChain (UInt_t idx)
 
TDecayFitGetFitFunc ()
 
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
 
TDecayFitfFitFunc
 

#include <TDecay.h>

+ Inheritance diagram for TDecay:
+ Collaboration diagram for TDecay:

Constructor & Destructor Documentation

◆ TDecay() [1/2]

TDecay::TDecay ( )
inline

Definition at line 333 of file TDecay.h.

◆ TDecay() [2/2]

TDecay::TDecay ( std::vector< TDecayChain *>  chainlist)

◆ ~TDecay()

TDecay::~TDecay ( )
override

Definition at line 662 of file TDecay.cxx.

Member Function Documentation

◆ AddChain()

void TDecay::AddChain ( TDecayChain chain)
inline

Definition at line 337 of file TDecay.h.

References fChainList.

◆ 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 796 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 678 of file TDecay.cxx.

References fChainList, and fFitFunc.

Referenced by SetParameters(), and TDecay().

◆ Draw()

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

Definition at line 745 of file TDecay.cxx.

References fFitFunc, and SetParameters().

◆ DrawBackground()

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

Definition at line 831 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 810 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 ( const Double_t &  background)
inline

Definition at line 361 of file TDecay.h.

References fFitFunc.

◆ FixBackground() [2/2]

void TDecay::FixBackground ( )
inline

Definition at line 362 of file TDecay.h.

References fFitFunc, and GetBackground().

◆ FixHalfLife()

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

Definition at line 344 of file TDecay.h.

References SetHalfLife(), and SetHalfLifeLimits().

◆ GetBackground()

Double_t TDecay::GetBackground ( ) const
inline

Definition at line 355 of file TDecay.h.

References fFitFunc.

Referenced by DrawBackground(), FixBackground(), and Print().

◆ GetBackgroundError()

Double_t TDecay::GetBackgroundError ( ) const
inline

Definition at line 356 of file TDecay.h.

References fFitFunc.

Referenced by Print().

◆ GetChain()

TDecayChain * TDecay::GetChain ( UInt_t  idx)

Definition at line 667 of file TDecay.cxx.

References fChainList, and SetParameters().

◆ GetFitFunc()

TDecayFit* TDecay::GetFitFunc ( )
inline

Definition at line 353 of file TDecay.h.

References fFitFunc.

◆ GetFitFunction()

TDecayFit const* TDecay::GetFitFunction ( )
inlineoverrideprivatevirtual

Implements TVirtualDecay.

Definition at line 372 of file TDecay.h.

References fFitFunc.

◆ GetResiduals()

TGraph* TDecay::GetResiduals ( )
inline

Definition at line 366 of file TDecay.h.

References fFitFunc, and TDecayFit::GetResiduals().

◆ Print()

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

Implements TVirtualDecay.

Definition at line 881 of file TDecay.cxx.

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

◆ PrintMap()

void TDecay::PrintMap ( ) const

Definition at line 891 of file TDecay.cxx.

References fDecayMap.

◆ ReleaseBackground()

void TDecay::ReleaseBackground ( )
inline

Definition at line 364 of file TDecay.h.

References fFitFunc.

◆ RemakeMap()

void TDecay::RemakeMap ( )
private

Definition at line 910 of file TDecay.cxx.

References fChainList, and fDecayMap.

Referenced by SetParameters(), and TDecay().

◆ SetBackground()

void TDecay::SetBackground ( Double_t  background)
inline

Definition at line 354 of file TDecay.h.

References fFitFunc.

◆ SetBackgroundLimits()

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

Definition at line 363 of file TDecay.h.

References fFitFunc.

◆ SetDecayRateLimits()

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

Definition at line 868 of file TDecay.cxx.

References fDecayMap.

◆ SetHalfLife()

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

Definition at line 842 of file TDecay.cxx.

References fDecayMap.

Referenced by FixHalfLife().

◆ SetHalfLifeLimits()

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

Definition at line 855 of file TDecay.cxx.

References fDecayMap.

Referenced by FixHalfLife().

◆ SetParameters()

void TDecay::SetParameters ( )
private

◆ SetRange()

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

Definition at line 902 of file TDecay.cxx.

References fChainList, and fFitFunc.

Member Data Documentation

◆ fChainList

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

Definition at line 375 of file TDecay.h.

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

◆ fDecayMap

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

◆ fFitFunc