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

Detailed Description

Class for performing energy calibrations using a single nucleus.

Definition at line 21 of file TEnergyCal.h.

Public Member Functions

 TEnergyCal ()
 
 TEnergyCal (const char *name, const char *title)
 
 TEnergyCal (const TEnergyCal &)=default
 
 TEnergyCal (TEnergyCal &&) noexcept=default
 
 ~TEnergyCal ()=default
 
void AddPoint (Double_t measured, Double_t accepted, Double_t measuredUncertainty=0.0, Double_t acceptedUncertainty=0.0)
 
void Clear (Option_t *opt="") override
 
void Copy (TObject &obj) const override
 
TChannelGetChannel () const
 
virtual TF1 * GetFitFunction () const
 
TH1 * GetHist () const
 
virtual TNucleusGetNucleus () const
 
Double_t GetParameter (size_t parameter) const override
 
std::vector< Double_t > GetParameters () const override
 
Bool_t IsGroupable () const override
 
TEnergyCaloperator= (const TEnergyCal &)=default
 
TEnergyCaloperator= (TEnergyCal &&) noexcept=default
 
void Print (Option_t *opt="") const override
 
Bool_t SetChannel (TChannel *chan)
 
Bool_t SetChannel (UInt_t chanNum)
 
void SetDefaultTitles ()
 
virtual void SetFitFunction (TF1 *func)
 
virtual void SetHist (TH1 *hist)
 
void SetNucleus (TNucleus *nuc, Option_t *opt="") override
 
Bool_t SetPoint (Int_t idx, Double_t measured)
 
Bool_t SetPoint (Int_t idx, TPeak *peak)
 
Bool_t SetPointError (Int_t idx, Double_t measuredUncertainty)
 
virtual void WriteToAllChannels (const std::string &mnemonic="")
 
void WriteToChannel () const override
 

Protected Member Functions

void InitTCal ()
 

Private Attributes

TRef fChan {nullptr}
 
TF1 * fFitFunc {nullptr}
 
TH1 * fHist {nullptr}
 
TNucleusfNuc {nullptr}
 
+ Inheritance diagram for TEnergyCal:
+ Collaboration diagram for TEnergyCal:

Constructor & Destructor Documentation

◆ TEnergyCal() [1/4]

TEnergyCal::TEnergyCal ( )

Definition at line 3 of file TEnergyCal.cxx.

References SetDefaultTitles().

◆ TEnergyCal() [2/4]

TEnergyCal::TEnergyCal ( const char * name,
const char * title )
inline

Definition at line 24 of file TEnergyCal.h.

◆ TEnergyCal() [3/4]

TEnergyCal::TEnergyCal ( const TEnergyCal & )
default

◆ TEnergyCal() [4/4]

TEnergyCal::TEnergyCal ( TEnergyCal && )
defaultnoexcept

◆ ~TEnergyCal()

TEnergyCal::~TEnergyCal ( )
default

Member Function Documentation

◆ AddPoint()

void TEnergyCal::AddPoint ( Double_t measured,
Double_t accepted,
Double_t measuredUncertainty = 0.0,
Double_t acceptedUncertainty = 0.0 )

Definition at line 59 of file TEnergyCal.cxx.

◆ Clear()

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

Definition at line 140 of file TEnergyCal.cxx.

References TCal::Clear(), and SetDefaultTitles().

◆ Copy()

void TCal::Copy ( TObject & obj) const
overrideinherited

Copies the TCal.

Definition at line 37 of file TCal.cxx.

References TCal::fChan, TCal::fFitFunc, and TCal::fNuc.

Referenced by TCal::TCal(), TEfficiencyCal::Copy(), and TGainMatch::Copy().

◆ GetChannel()

◆ GetFitFunction()

virtual TF1 * TCal::GetFitFunction ( ) const
inlinevirtualinherited

◆ GetHist()

TH1 * TCal::GetHist ( ) const
inlineinherited

Definition at line 74 of file TCal.h.

References TCal::fHist.

◆ GetNucleus()

virtual TNucleus * TCal::GetNucleus ( ) const
inlinevirtualinherited

Reimplemented in TGainMatch.

Definition at line 76 of file TCal.h.

References TCal::fNuc.

Referenced by TEfficiencyCal::AddPoint(), TCal::Print(), SetNucleus(), SetPoint(), and SetPointError().

◆ GetParameter()

Double_t TEnergyCal::GetParameter ( size_t parameter) const
overridevirtual

Reimplemented from TCal.

Definition at line 32 of file TEnergyCal.cxx.

Referenced by GetParameters(), and WriteToChannel().

◆ GetParameters()

std::vector< Double_t > TEnergyCal::GetParameters ( ) const
overridevirtual

Reimplemented from TCal.

Definition at line 19 of file TEnergyCal.cxx.

References GetParameter().

◆ InitTCal()

void TCal::InitTCal ( )
protectedinherited

Initiallizes the TCal.

Definition at line 172 of file TCal.cxx.

References TCal::Clear(), TCal::fChan, TCal::fFitFunc, TCal::fHist, and TCal::fNuc.

Referenced by TCal::TCal(), TCal::TCal(), and TCal::TCal().

◆ IsGroupable()

Bool_t TEnergyCal::IsGroupable ( ) const
inlineoverridevirtual

Implements TCal.

Definition at line 52 of file TEnergyCal.h.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

TEnergyCal & TEnergyCal::operator= ( TEnergyCal && )
defaultnoexcept

◆ Print()

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

Definition at line 133 of file TEnergyCal.cxx.

References TCal::Print().

◆ SetChannel() [1/2]

Bool_t TCal::SetChannel ( TChannel * chan)
inherited

◆ SetChannel() [2/2]

Bool_t TCal::SetChannel ( UInt_t chanNum)
inherited

Sets the channel for the calibration to the channel number channum. Returns 0 if the channel does not exist

Definition at line 109 of file TCal.cxx.

References TChannel::GetChannelByNumber(), and TCal::SetChannel().

◆ SetDefaultTitles()

void TEnergyCal::SetDefaultTitles ( )

Definition at line 9 of file TEnergyCal.cxx.

Referenced by TEnergyCal(), Clear(), and SetNucleus().

◆ SetFitFunction()

virtual void TCal::SetFitFunction ( TF1 * func)
inlinevirtualinherited

◆ SetHist()

void TCal::SetHist ( TH1 * hist)
virtualinherited

Sets this histogram pointed to. TCal does NOT take ownership so you cannot delete this histogram as long as you want to access the hist in the TCal/write it out. I will add this functionality if I get annoyed enough with the way it is.

Reimplemented in TGainMatch.

Definition at line 129 of file TCal.cxx.

References TCal::fHist, and hist.

◆ SetNucleus()

void TEnergyCal::SetNucleus ( TNucleus * nuc,
Option_t * opt = "" )
overridevirtual

Reimplemented from TCal.

Definition at line 38 of file TEnergyCal.cxx.

References TCal::GetNucleus(), TNucleus::NTransitions(), SetDefaultTitles(), and TCal::SetNucleus().

◆ SetPoint() [1/2]

Bool_t TEnergyCal::SetPoint ( Int_t idx,
Double_t measured )

Definition at line 69 of file TEnergyCal.cxx.

References TCal::GetNucleus().

Referenced by SetPoint().

◆ SetPoint() [2/2]

Bool_t TEnergyCal::SetPoint ( Int_t idx,
TPeak * peak )

◆ SetPointError()

Bool_t TEnergyCal::SetPointError ( Int_t idx,
Double_t measuredUncertainty )

Definition at line 104 of file TEnergyCal.cxx.

References TCal::GetNucleus().

Referenced by SetPoint().

◆ WriteToAllChannels()

void TCal::WriteToAllChannels ( const std::string & mnemonic = "")
virtualinherited

Writes this calibration to all channels in the current TChannel Map

Definition at line 63 of file TCal.cxx.

References TCal::GetChannel(), TChannel::GetChannelMap(), TCal::SetChannel(), and TCal::WriteToChannel().

◆ WriteToChannel()

void TEnergyCal::WriteToChannel ( ) const
overridevirtual

Member Data Documentation

◆ fChan

TRef TCal::fChan {nullptr}
privateinherited

This points at the TChannel.

Definition at line 82 of file TCal.h.

Referenced by TCal::Clear(), TCal::Copy(), TCal::GetChannel(), TCal::InitTCal(), and TCal::SetChannel().

◆ fFitFunc

TF1* TCal::fFitFunc {nullptr}
privateinherited

Fit function representing calibration.

Definition at line 83 of file TCal.h.

Referenced by TCal::Copy(), TCal::GetFitFunction(), TCal::InitTCal(), TCal::Print(), and TCal::SetFitFunction().

◆ fHist

TH1* TCal::fHist {nullptr}
privateinherited

Histogram that was fit by the TPeak.

Definition at line 84 of file TCal.h.

Referenced by TCal::GetHist(), TCal::InitTCal(), and TCal::SetHist().

◆ fNuc

TNucleus* TCal::fNuc {nullptr}
privateinherited

Nucleus that we are calibrating against.

Definition at line 85 of file TCal.h.

Referenced by TCal::Clear(), TCal::Copy(), TCal::GetNucleus(), TCal::InitTCal(), and TCal::SetNucleus().