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

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 &copy)
 
 ~TCal () override
 
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
 
void Print (Option_t *opt="") const override
 
Bool_t SetChannel (const TChannel *chan)
 
Bool_t SetChannel (UInt_t chanNum)
 
virtual void SetFitFunction (const 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
 
TF1 * fFitFunc
 
TH1 * fHist
 
TNucleusfNuc
 

#include <TCal.h>

+ Inheritance diagram for TCal:
+ Collaboration diagram for TCal:

Constructor & Destructor Documentation

◆ TCal() [1/3]

TCal::TCal ( )

Default constructor

Definition at line 7 of file TCal.cxx.

◆ TCal() [2/3]

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

Constructor for naming the calibration

Definition at line 13 of file TCal.cxx.

References InitTCal().

◆ ~TCal()

TCal::~TCal ( )
override

Default dtor

Definition at line 21 of file TCal.cxx.

◆ TCal() [3/3]

TCal::TCal ( const TCal copy)

Copy constructor

Definition at line 26 of file TCal.cxx.

References Copy(), and InitTCal().

Member Function Documentation

◆ Clear()

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

Clears the calibration. Does not delete nuclei or channels.

Definition at line 146 of file TCal.cxx.

References fChan, and fNuc.

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

◆ Copy()

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

Copies the TCal.

Definition at line 46 of file TCal.cxx.

References fChan, fFitFunc, and fNuc.

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

◆ GetChannel()

TChannel * TCal::GetChannel ( ) const

◆ GetFitFunction()

virtual TF1* TCal::GetFitFunction ( ) const
inlinevirtual

Definition at line 58 of file TCal.h.

References fFitFunc.

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

◆ GetHist()

TH1* TCal::GetHist ( ) const
inline

Definition at line 73 of file TCal.h.

References fHist.

◆ GetNucleus()

virtual TNucleus* TCal::GetNucleus ( ) const
inlinevirtual

Reimplemented in TGainMatch.

Definition at line 75 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 TEnergyCal, TCFDCal, and TTimeCal.

Definition at line 108 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 TEnergyCal, TCFDCal, and TTimeCal.

Definition at line 90 of file TCal.cxx.

References GetFitFunction(), and GetParameter().

◆ InitTCal()

void TCal::InitTCal ( )
protected

Initiallizes the TCal.

Definition at line 179 of file TCal.cxx.

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

Referenced by TCal().

◆ IsGroupable()

virtual Bool_t TCal::IsGroupable ( ) const
pure virtual

◆ Print()

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

Prints calibration information

Definition at line 154 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 ( const TChannel chan)

Sets the channel being calibrated

Definition at line 60 of file TCal.cxx.

References fChan.

Referenced by TCalManager::AddToManager(), TGainMatch::CoarseMatch(), TGainMatch::FineMatch(), TGainMatch::FineMatchFast(), main(), 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 118 of file TCal.cxx.

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

◆ SetFitFunction()

virtual void TCal::SetFitFunction ( const 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 138 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 TGainMatch, and TEnergyCal.

Definition at line 33 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 72 of file TCal.cxx.

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

◆ WriteToChannel()

virtual void TCal::WriteToChannel ( ) const
inlinevirtual

Reimplemented in TGainMatch, TEnergyCal, TCFDCal, and TTimeCal.

Definition at line 57 of file TCal.h.

Referenced by WriteToAllChannels().

Member Data Documentation

◆ fChan

TRef TCal::fChan
private

This points at the TChannel.

Definition at line 81 of file TCal.h.

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

◆ fFitFunc

TF1* TCal::fFitFunc
private

Fit function representing calibration.

Definition at line 82 of file TCal.h.

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

◆ fHist

TH1* TCal::fHist
private

Histogram that was fit by the TPeak.

Definition at line 83 of file TCal.h.

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

◆ fNuc

TNucleus* TCal::fNuc
private

Nucleus that we are calibrating against.

Definition at line 84 of file TCal.h.

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