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

Detailed Description

This is an abstract class that contains the basic info about a calibration. Calibrations here are TGraphErrors that are fit, with the resulting fit function being the calibrating function.

Definition at line 44 of file TCal.h.

Public Member Functions

 TCal ()
 
 TCal (const char *name, const char *title)
 
 TCal (const TCal &)
 
 TCal (TCal &&) noexcept=default
 
 ~TCal ()=default
 
void Clear (Option_t *opt="") override
 
void Copy (TObject &obj) const override
 
TChannelGetChannel () const
 
virtual TF1 * GetFitFunction () const
 
TH1 * GetHist () const
 
virtual TNucleusGetNucleus () const
 
virtual Double_t GetParameter (size_t parameter) const
 
virtual std::vector< Double_t > GetParameters () const
 
virtual Bool_t IsGroupable () const =0
 
TCaloperator= (const TCal &)=default
 
TCaloperator= (TCal &&) noexcept=default
 
void Print (Option_t *opt="") const override
 
Bool_t SetChannel (TChannel *chan)
 
Bool_t SetChannel (UInt_t chanNum)
 
virtual void SetFitFunction (TF1 *func)
 
virtual void SetHist (TH1 *hist)
 
virtual void SetNucleus (TNucleus *nuc, Option_t *opt="")
 
virtual void WriteToAllChannels (const std::string &mnemonic="")
 
virtual void WriteToChannel () const
 

Protected Member Functions

void InitTCal ()
 

Private Attributes

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

Constructor & Destructor Documentation

◆ TCal() [1/4]

TCal::TCal ( )

Default constructor

Definition at line 3 of file TCal.cxx.

References InitTCal().

◆ TCal() [2/4]

TCal::TCal ( const char * name,
const char * title )

Constructor for naming the calibration

Definition at line 9 of file TCal.cxx.

References InitTCal().

◆ TCal() [3/4]

TCal::TCal ( const TCal & copy)

Copy constructor

Definition at line 17 of file TCal.cxx.

References Copy(), and InitTCal().

◆ TCal() [4/4]

TCal::TCal ( TCal && )
defaultnoexcept

◆ ~TCal()

TCal::~TCal ( )
default

Member Function Documentation

◆ Clear()

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

Clears the calibration. Does not delete nuclei or channels.

Definition at line 137 of file TCal.cxx.

References fChan, and fNuc.

Referenced by TCFDCal::Clear(), TEfficiencyCal::Clear(), TEnergyCal::Clear(), TGainMatch::Clear(), TTimeCal::Clear(), and InitTCal().

◆ Copy()

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

Copies the TCal.

Definition at line 37 of file TCal.cxx.

References fChan, fFitFunc, and fNuc.

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

◆ GetChannel()

◆ GetFitFunction()

virtual TF1 * TCal::GetFitFunction ( ) const
inlinevirtual

Definition at line 59 of file TCal.h.

References fFitFunc.

Referenced by TGainMatch::FineMatch(), TGainMatch::FineMatchFast(), GetParameter(), and GetParameters().

◆ GetHist()

TH1 * TCal::GetHist ( ) const
inline

Definition at line 74 of file TCal.h.

References fHist.

◆ GetNucleus()

virtual TNucleus * TCal::GetNucleus ( ) const
inlinevirtual

Reimplemented in TGainMatch.

Definition at line 76 of file TCal.h.

References fNuc.

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

◆ GetParameter()

Double_t TCal::GetParameter ( size_t parameter) const
virtual

Returns the parameter at the index parameter

Reimplemented in TCFDCal, TEnergyCal, and TTimeCal.

Definition at line 99 of file TCal.cxx.

References GetFitFunction().

Referenced by TGainMatch::FineMatch(), TGainMatch::FineMatchFast(), GetParameters(), and TGainMatch::WriteToChannel().

◆ GetParameters()

std::vector< Double_t > TCal::GetParameters ( ) const
virtual

Returns all of the parameters in the current TCal.

Reimplemented in TCFDCal, TEnergyCal, and TTimeCal.

Definition at line 81 of file TCal.cxx.

References GetFitFunction(), and GetParameter().

◆ InitTCal()

void TCal::InitTCal ( )
protected

Initiallizes the TCal.

Definition at line 172 of file TCal.cxx.

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

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

◆ IsGroupable()

virtual Bool_t TCal::IsGroupable ( ) const
pure virtual

◆ operator=() [1/2]

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

◆ operator=() [2/2]

TCal & TCal::operator= ( TCal && )
defaultnoexcept

◆ Print()

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

Prints calibration information

Definition at line 145 of file TCal.cxx.

References fFitFunc, GetChannel(), GetNucleus(), and TChannel::GetNumber().

Referenced by TEfficiencyCal::Print(), TEnergyCal::Print(), and TGainMatch::Print().

◆ SetChannel() [1/2]

Bool_t TCal::SetChannel ( TChannel * chan)

Sets the channel being calibrated

Definition at line 51 of file TCal.cxx.

References fChan.

Referenced by TCalManager::AddToManager(), TGainMatch::CoarseMatch(), TGainMatch::FineMatch(), TGainMatch::FineMatchFast(), SetChannel(), and WriteToAllChannels().

◆ SetChannel() [2/2]

Bool_t TCal::SetChannel ( UInt_t chanNum)

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 SetChannel().

◆ SetFitFunction()

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

◆ SetHist()

void TCal::SetHist ( TH1 * hist)
virtual

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 fHist, and hist.

◆ SetNucleus()

void TCal::SetNucleus ( TNucleus * nuc,
Option_t * opt = "" )
virtual

Sets the nucleus to be calibrated against

Reimplemented in TEnergyCal, and TGainMatch.

Definition at line 24 of file TCal.cxx.

References fNuc.

Referenced by TEnergyCal::SetNucleus().

◆ WriteToAllChannels()

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

Writes this calibration to all channels in the current TChannel Map

Definition at line 63 of file TCal.cxx.

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

◆ WriteToChannel()

virtual void TCal::WriteToChannel ( ) const
inlinevirtual

Reimplemented in TCFDCal, TEnergyCal, TGainMatch, and TTimeCal.

Definition at line 58 of file TCal.h.

Referenced by WriteToAllChannels().

Member Data Documentation

◆ fChan

TRef TCal::fChan {nullptr}
private

This points at the TChannel.

Definition at line 82 of file TCal.h.

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

◆ fFitFunc

TF1* TCal::fFitFunc {nullptr}
private

Fit function representing calibration.

Definition at line 83 of file TCal.h.

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

◆ fHist

TH1* TCal::fHist {nullptr}
private

Histogram that was fit by the TPeak.

Definition at line 84 of file TCal.h.

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

◆ fNuc

TNucleus* TCal::fNuc {nullptr}
private

Nucleus that we are calibrating against.

Definition at line 85 of file TCal.h.

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