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

Definition at line 11 of file GPeak.h.

Public Member Functions

 GPeak (Double_t cent, Double_t xlow, Double_t xhigh, Option_t *opt="gsc")
 
 GPeak (Double_t cent, Double_t xlow, Double_t xhigh, TF1 *bg, Option_t *opt="gsc")
 
 GPeak (const GPeak &)
 
 GPeak ()
 
 ~GPeak () override
 
Double_t Area () const
 
Double_t AreaErr () const
 
TF1 * Background (Option_t *="TF1")
 
Double_t Centroid () const
 
Double_t CentroidErr () const
 
void Clear (Option_t *opt="") override
 
void Copy (TObject &) const override
 
void DrawResiduals (TH1 *) const
 
bool Fit (TH1 *, Option_t *opt="")
 
Double_t FWHM () const
 
Double_t FWHMErr () const
 
Double_t GetArea () const
 
Double_t GetAreaErr () const
 
Double_t GetCentroid () const
 
Double_t GetCentroidErr () const
 
Double_t GetFWHM () const
 
Double_t GetFWHMErr () const
 
Double_t GetSum () const
 
Double_t GetSumErr () const
 
void InitNames ()
 
bool InitParams (TH1 *fithist=nullptr)
 
void Print (Option_t *opt="") const override
 
Double_t Sum () const
 
Double_t SumErr () const
 

Static Public Member Functions

static Bool_t CompareArea (const GPeak &lhs, const GPeak &rhs)
 
static Bool_t CompareEnergy (const GPeak &lhs, const GPeak &rhs)
 
static GPeakGetLastFit ()
 

Protected Member Functions

void SetArea (Double_t a)
 
void SetArea (Double_t a, Double_t dA)
 
void SetAreaErr (Double_t d_a)
 
void SetChi2 (Double_t chi2)
 
void SetNdf (Double_t Ndf)
 
void SetSum (Double_t a)
 
void SetSumErr (Double_t d_a)
 

Private Member Functions

Bool_t IsInitialized () const
 
void SetInitialized (Bool_t flag=true)
 

Private Attributes

double fArea {0.}
 
TF1 fBGFit
 
double fChi2 {0.}
 
double fDArea {0.}
 
double fDSum {0.}
 
double fNdf {0.}
 
double fSum {0.}
 
bool init_flag {false}
 

Static Private Attributes

static GPeakfLastFit = nullptr
 

#include <GPeak.h>

+ Inheritance diagram for GPeak:
+ Collaboration diagram for GPeak:

Constructor & Destructor Documentation

◆ GPeak() [1/4]

GPeak::GPeak ( Double_t  cent,
Double_t  xlow,
Double_t  xhigh,
Option_t *  opt = "gsc" 
)

Definition at line 19 of file GPeak.cxx.

References Clear(), fBGFit, and InitNames().

◆ GPeak() [2/4]

GPeak::GPeak ( Double_t  cent,
Double_t  xlow,
Double_t  xhigh,
TF1 *  bg,
Option_t *  opt = "gsc" 
)

Definition at line 54 of file GPeak.cxx.

References Clear(), fBGFit, InitNames(), and GRootFunctions::StepBG().

◆ GPeak() [3/4]

GPeak::GPeak ( const GPeak peak)

Definition at line 109 of file GPeak.cxx.

References Copy(), and fBGFit.

◆ GPeak() [4/4]

GPeak::GPeak ( )

Definition at line 92 of file GPeak.cxx.

References Clear(), fBGFit, and InitNames().

Referenced by Fit().

◆ ~GPeak()

GPeak::~GPeak ( )
override

Definition at line 118 of file GPeak.cxx.

Member Function Documentation

◆ Area()

Double_t GPeak::Area ( ) const
inline

Definition at line 41 of file GPeak.h.

References GetArea().

Referenced by TChannelTab::FindPeaks(), and TChannelTab::ProjectionStatus().

◆ AreaErr()

Double_t GPeak::AreaErr ( ) const
inline

Definition at line 42 of file GPeak.h.

References GetAreaErr().

◆ Background()

TF1* GPeak::Background ( Option_t *  = "TF1")
inline

Definition at line 28 of file GPeak.h.

References fBGFit.

Referenced by ProjectionXBGP(), and ProjectionYBGP().

◆ Centroid()

Double_t GPeak::Centroid ( ) const
inline

Definition at line 39 of file GPeak.h.

References GetCentroid().

Referenced by TChannelTab::FindPeaks(), and TChannelTab::ProjectionStatus().

◆ CentroidErr()

Double_t GPeak::CentroidErr ( ) const
inline

Definition at line 40 of file GPeak.h.

References GetCentroidErr().

◆ Clear()

void GPeak::Clear ( Option_t *  opt = "")
override

Definition at line 356 of file GPeak.cxx.

References fArea, fChi2, fDArea, fDSum, fNdf, fSum, and init_flag.

Referenced by GPeak().

◆ CompareArea()

static Bool_t GPeak::CompareArea ( const GPeak lhs,
const GPeak rhs 
)
inlinestatic

Definition at line 63 of file GPeak.h.

References GetArea().

◆ CompareEnergy()

static Bool_t GPeak::CompareEnergy ( const GPeak lhs,
const GPeak rhs 
)
inlinestatic

Definition at line 62 of file GPeak.h.

References GetCentroid().

◆ Copy()

void GPeak::Copy ( TObject &  obj) const
override

Definition at line 137 of file GPeak.cxx.

References fArea, fBGFit, fChi2, fDArea, fDSum, fNdf, fSum, and init_flag.

Referenced by Fit(), and GPeak().

◆ DrawResiduals()

void GPeak::DrawResiduals ( TH1 *  hist) const

Definition at line 389 of file GPeak.cxx.

References fChi2, and hist.

◆ Fit()

Bool_t GPeak::Fit ( TH1 *  fithist,
Option_t *  opt = "" 
)

◆ FWHM()

Double_t GPeak::FWHM ( ) const
inline

Definition at line 45 of file GPeak.h.

References GetFWHM().

◆ FWHMErr()

Double_t GPeak::FWHMErr ( ) const
inline

Definition at line 46 of file GPeak.h.

References GetFWHMErr().

◆ GetArea()

Double_t GPeak::GetArea ( ) const
inline

Definition at line 32 of file GPeak.h.

References fArea.

Referenced by Area(), and CompareArea().

◆ GetAreaErr()

Double_t GPeak::GetAreaErr ( ) const
inline

Definition at line 33 of file GPeak.h.

References fDArea.

Referenced by AreaErr().

◆ GetCentroid()

Double_t GPeak::GetCentroid ( ) const
inline

Definition at line 30 of file GPeak.h.

Referenced by TCalibrator::AddData(), Centroid(), and CompareEnergy().

◆ GetCentroidErr()

Double_t GPeak::GetCentroidErr ( ) const
inline

Definition at line 31 of file GPeak.h.

Referenced by CentroidErr().

◆ GetFWHM()

Double_t GPeak::GetFWHM ( ) const
inline

Definition at line 36 of file GPeak.h.

Referenced by FWHM(), and Print().

◆ GetFWHMErr()

Double_t GPeak::GetFWHMErr ( ) const
inline

Definition at line 37 of file GPeak.h.

Referenced by FWHMErr(), and Print().

◆ GetLastFit()

static GPeak* GPeak::GetLastFit ( )
inlinestatic

Definition at line 65 of file GPeak.h.

References fLastFit.

Referenced by ProjectionXBGP(), and ProjectionYBGP().

◆ GetSum()

Double_t GPeak::GetSum ( ) const
inline

Definition at line 34 of file GPeak.h.

References fSum.

Referenced by TCalibrator::AddData(), and Sum().

◆ GetSumErr()

Double_t GPeak::GetSumErr ( ) const
inline

Definition at line 35 of file GPeak.h.

References fDSum.

Referenced by SumErr().

◆ InitNames()

void GPeak::InitNames ( )

Definition at line 126 of file GPeak.cxx.

Referenced by GPeak().

◆ InitParams()

bool GPeak::InitParams ( TH1 *  fithist = nullptr)

Definition at line 151 of file GPeak.cxx.

References SetInitialized().

Referenced by Fit().

◆ IsInitialized()

Bool_t GPeak::IsInitialized ( ) const
inlineprivate

Definition at line 75 of file GPeak.h.

References init_flag.

Referenced by Fit().

◆ Print()

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

Definition at line 372 of file GPeak.cxx.

References fArea, fChi2, fDArea, fDSum, fNdf, fSum, GetFWHM(), GetFWHMErr(), GREEN, and RESET_COLOR.

Referenced by Fit().

◆ SetArea() [1/2]

void GPeak::SetArea ( Double_t  a)
inlineprotected

Definition at line 49 of file GPeak.h.

References fArea.

Referenced by SetArea().

◆ SetArea() [2/2]

void GPeak::SetArea ( Double_t  a,
Double_t  dA 
)
inlineprotected

Definition at line 53 of file GPeak.h.

References SetArea(), and SetAreaErr().

◆ SetAreaErr()

void GPeak::SetAreaErr ( Double_t  d_a)
inlineprotected

Definition at line 50 of file GPeak.h.

References fDArea.

Referenced by SetArea().

◆ SetChi2()

void GPeak::SetChi2 ( Double_t  chi2)
inlineprotected

Definition at line 58 of file GPeak.h.

References fChi2.

◆ SetInitialized()

void GPeak::SetInitialized ( Bool_t  flag = true)
inlineprivate

Definition at line 76 of file GPeak.h.

References init_flag.

Referenced by InitParams().

◆ SetNdf()

void GPeak::SetNdf ( Double_t  Ndf)
inlineprotected

Definition at line 59 of file GPeak.h.

References fNdf.

◆ SetSum()

void GPeak::SetSum ( Double_t  a)
inlineprotected

Definition at line 51 of file GPeak.h.

References fSum.

◆ SetSumErr()

void GPeak::SetSumErr ( Double_t  d_a)
inlineprotected

Definition at line 52 of file GPeak.h.

References fDSum.

◆ Sum()

Double_t GPeak::Sum ( ) const
inline

Definition at line 43 of file GPeak.h.

References GetSum().

◆ SumErr()

Double_t GPeak::SumErr ( ) const
inline

Definition at line 44 of file GPeak.h.

References GetSumErr().

Member Data Documentation

◆ fArea

double GPeak::fArea {0.}
private

Definition at line 68 of file GPeak.h.

Referenced by Clear(), Copy(), Fit(), GetArea(), Print(), and SetArea().

◆ fBGFit

TF1 GPeak::fBGFit
private

Definition at line 81 of file GPeak.h.

Referenced by Background(), Copy(), Fit(), and GPeak().

◆ fChi2

double GPeak::fChi2 {0.}
private

Definition at line 72 of file GPeak.h.

Referenced by Clear(), Copy(), DrawResiduals(), Fit(), Print(), and SetChi2().

◆ fDArea

double GPeak::fDArea {0.}
private

Definition at line 69 of file GPeak.h.

Referenced by Clear(), Copy(), Fit(), GetAreaErr(), Print(), and SetAreaErr().

◆ fDSum

double GPeak::fDSum {0.}
private

Definition at line 71 of file GPeak.h.

Referenced by Clear(), Copy(), Fit(), GetSumErr(), Print(), and SetSumErr().

◆ fLastFit

GPeak * GPeak::fLastFit = nullptr
staticprivate

Definition at line 79 of file GPeak.h.

Referenced by Fit(), and GetLastFit().

◆ fNdf

double GPeak::fNdf {0.}
private

Definition at line 73 of file GPeak.h.

Referenced by Clear(), Copy(), Fit(), Print(), and SetNdf().

◆ fSum

double GPeak::fSum {0.}
private

Definition at line 70 of file GPeak.h.

Referenced by Clear(), Copy(), Fit(), GetSum(), Print(), and SetSum().

◆ init_flag

bool GPeak::init_flag {false}
private

Definition at line 77 of file GPeak.h.

Referenced by Clear(), Copy(), IsInitialized(), and SetInitialized().