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

Detailed Description

Definition at line 6 of file GPeak.h.

Public Member Functions

 GPeak ()
 
 GPeak (const GPeak &)
 
 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 (GPeak &&) noexcept=default
 
 ~GPeak ()=default
 
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)
 
GPeakoperator= (const GPeak &)=default
 
GPeakoperator= (GPeak &&) noexcept=default
 
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.}
 
bool fInitFlag {false}
 
double fNdf {0.}
 
double fSum {0.}
 

Static Private Attributes

static GPeakfLastFit = nullptr
 
+ Inheritance diagram for GPeak:
+ Collaboration diagram for GPeak:

Constructor & Destructor Documentation

◆ GPeak() [1/5]

GPeak::GPeak ( )

Definition at line 88 of file GPeak.cxx.

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

Referenced by Fit().

◆ GPeak() [2/5]

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

Definition at line 15 of file GPeak.cxx.

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

◆ GPeak() [3/5]

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

Definition at line 50 of file GPeak.cxx.

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

◆ GPeak() [4/5]

GPeak::GPeak ( const GPeak & peak)

Definition at line 105 of file GPeak.cxx.

References Copy(), and fBGFit.

◆ GPeak() [5/5]

GPeak::GPeak ( GPeak && )
defaultnoexcept

◆ ~GPeak()

GPeak::~GPeak ( )
default

Member Function Documentation

◆ Area()

Double_t GPeak::Area ( ) const
inline

Definition at line 39 of file GPeak.h.

References GetArea().

◆ AreaErr()

Double_t GPeak::AreaErr ( ) const
inline

Definition at line 40 of file GPeak.h.

References GetAreaErr().

◆ Background()

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

Definition at line 26 of file GPeak.h.

References fBGFit.

Referenced by ProjectionXBGP(), and ProjectionYBGP().

◆ Centroid()

Double_t GPeak::Centroid ( ) const
inline

Definition at line 37 of file GPeak.h.

References GetCentroid().

◆ CentroidErr()

Double_t GPeak::CentroidErr ( ) const
inline

Definition at line 38 of file GPeak.h.

References GetCentroidErr().

◆ Clear()

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

Definition at line 347 of file GPeak.cxx.

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

Referenced by GPeak(), GPeak(), and GPeak().

◆ CompareArea()

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

Definition at line 61 of file GPeak.h.

References GetArea().

◆ CompareEnergy()

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

Definition at line 60 of file GPeak.h.

References GetCentroid().

◆ Copy()

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

Definition at line 125 of file GPeak.cxx.

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

Referenced by GPeak(), and Fit().

◆ DrawResiduals()

void GPeak::DrawResiduals ( TH1 * hist) const

Definition at line 380 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 43 of file GPeak.h.

References GetFWHM().

◆ FWHMErr()

Double_t GPeak::FWHMErr ( ) const
inline

Definition at line 44 of file GPeak.h.

References GetFWHMErr().

◆ GetArea()

Double_t GPeak::GetArea ( ) const
inline

Definition at line 30 of file GPeak.h.

References fArea.

Referenced by Area(), and CompareArea().

◆ GetAreaErr()

Double_t GPeak::GetAreaErr ( ) const
inline

Definition at line 31 of file GPeak.h.

References fDArea.

Referenced by AreaErr().

◆ GetCentroid()

Double_t GPeak::GetCentroid ( ) const
inline

Definition at line 28 of file GPeak.h.

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

◆ GetCentroidErr()

Double_t GPeak::GetCentroidErr ( ) const
inline

Definition at line 29 of file GPeak.h.

Referenced by CentroidErr().

◆ GetFWHM()

Double_t GPeak::GetFWHM ( ) const
inline

Definition at line 34 of file GPeak.h.

Referenced by FWHM(), and Print().

◆ GetFWHMErr()

Double_t GPeak::GetFWHMErr ( ) const
inline

Definition at line 35 of file GPeak.h.

Referenced by FWHMErr(), and Print().

◆ GetLastFit()

static GPeak * GPeak::GetLastFit ( )
inlinestatic

Definition at line 63 of file GPeak.h.

References fLastFit.

Referenced by ProjectionXBGP(), and ProjectionYBGP().

◆ GetSum()

Double_t GPeak::GetSum ( ) const
inline

Definition at line 32 of file GPeak.h.

References fSum.

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

◆ GetSumErr()

Double_t GPeak::GetSumErr ( ) const
inline

Definition at line 33 of file GPeak.h.

References fDSum.

Referenced by SumErr().

◆ InitNames()

void GPeak::InitNames ( )

Definition at line 114 of file GPeak.cxx.

Referenced by GPeak(), GPeak(), and GPeak().

◆ InitParams()

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

Definition at line 139 of file GPeak.cxx.

References SetInitialized().

Referenced by Fit().

◆ IsInitialized()

Bool_t GPeak::IsInitialized ( ) const
inlineprivate

Definition at line 73 of file GPeak.h.

References fInitFlag.

Referenced by Fit().

◆ operator=() [1/2]

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

◆ operator=() [2/2]

GPeak & GPeak::operator= ( GPeak && )
defaultnoexcept

◆ Print()

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

Definition at line 363 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 47 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 51 of file GPeak.h.

References SetArea(), and SetAreaErr().

◆ SetAreaErr()

void GPeak::SetAreaErr ( Double_t d_a)
inlineprotected

Definition at line 48 of file GPeak.h.

References fDArea.

Referenced by SetArea().

◆ SetChi2()

void GPeak::SetChi2 ( Double_t chi2)
inlineprotected

Definition at line 56 of file GPeak.h.

References fChi2.

◆ SetInitialized()

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

Definition at line 74 of file GPeak.h.

References fInitFlag.

Referenced by InitParams().

◆ SetNdf()

void GPeak::SetNdf ( Double_t Ndf)
inlineprotected

Definition at line 57 of file GPeak.h.

References fNdf.

◆ SetSum()

void GPeak::SetSum ( Double_t a)
inlineprotected

Definition at line 49 of file GPeak.h.

References fSum.

◆ SetSumErr()

void GPeak::SetSumErr ( Double_t d_a)
inlineprotected

Definition at line 50 of file GPeak.h.

References fDSum.

◆ Sum()

Double_t GPeak::Sum ( ) const
inline

Definition at line 41 of file GPeak.h.

References GetSum().

◆ SumErr()

Double_t GPeak::SumErr ( ) const
inline

Definition at line 42 of file GPeak.h.

References GetSumErr().

Member Data Documentation

◆ fArea

double GPeak::fArea {0.}
private

Definition at line 66 of file GPeak.h.

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

◆ fBGFit

TF1 GPeak::fBGFit
private

Definition at line 79 of file GPeak.h.

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

◆ fChi2

double GPeak::fChi2 {0.}
private

Definition at line 70 of file GPeak.h.

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

◆ fDArea

double GPeak::fDArea {0.}
private

Definition at line 67 of file GPeak.h.

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

◆ fDSum

double GPeak::fDSum {0.}
private

Definition at line 69 of file GPeak.h.

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

◆ fInitFlag

bool GPeak::fInitFlag {false}
private

Definition at line 75 of file GPeak.h.

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

◆ fLastFit

GPeak * GPeak::fLastFit = nullptr
staticprivate

Definition at line 77 of file GPeak.h.

Referenced by Fit(), and GetLastFit().

◆ fNdf

double GPeak::fNdf {0.}
private

Definition at line 71 of file GPeak.h.

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

◆ fSum

double GPeak::fSum {0.}
private

Definition at line 68 of file GPeak.h.

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