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.
Public Member Functions | |
TCal () | |
TCal (const char *name, const char *title) | |
TCal (const TCal ©) | |
~TCal () override | |
void | Clear (Option_t *opt="") override |
void | Copy (TObject &obj) const override |
TChannel * | GetChannel () const |
virtual TF1 * | GetFitFunction () const |
TH1 * | GetHist () const |
virtual TNucleus * | GetNucleus () 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 |
TNucleus * | fNuc |
#include <TCal.h>
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 | ( | const TCal & | copy | ) |
|
override |
Clears the calibration. Does not delete nuclei or channels.
Definition at line 146 of file TCal.cxx.
Referenced by TEfficiencyCal::Clear(), TTimeCal::Clear(), TCFDCal::Clear(), TEnergyCal::Clear(), TGainMatch::Clear(), and InitTCal().
|
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().
TChannel * TCal::GetChannel | ( | ) | const |
Gets the channel being pointed to by the TCal. Returns 0 if no channel is set.
Definition at line 130 of file TCal.cxx.
References fChan.
Referenced by TCalManager::AddToManager(), TTimeCal::Print(), TCFDCal::Print(), Print(), TTimeCal::ReadFromChannel(), TCFDCal::ReadFromChannel(), WriteToAllChannels(), TCFDCal::WriteToChannel(), TTimeCal::WriteToChannel(), TEnergyCal::WriteToChannel(), and TGainMatch::WriteToChannel().
|
inlinevirtual |
Definition at line 58 of file TCal.h.
References fFitFunc.
Referenced by TGainMatch::FineMatch(), TGainMatch::FineMatchFast(), GetParameter(), GetParameters(), and main().
|
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().
|
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().
|
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().
|
protected |
|
pure virtual |
Implemented in TGainMatch, TEnergyCal, TEfficiencyCal, TCFDCal, and TTimeCal.
|
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().
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().
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().
|
inlinevirtual |
Definition at line 59 of file TCal.h.
References fFitFunc.
Referenced by TGainMatch::CalculateGain(), TGainMatch::CoarseMatch(), TGainMatch::FineMatch(), TGainMatch::FineMatchFast(), and main().
|
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.
|
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().
|
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().
|
inlinevirtual |
Reimplemented in TGainMatch, TEnergyCal, TCFDCal, and TTimeCal.
Definition at line 57 of file TCal.h.
Referenced by WriteToAllChannels().
|
private |
This points at the TChannel.
Definition at line 81 of file TCal.h.
Referenced by Clear(), Copy(), GetChannel(), InitTCal(), and SetChannel().
|
private |
Fit function representing calibration.
Definition at line 82 of file TCal.h.
Referenced by Copy(), GetFitFunction(), InitTCal(), Print(), and SetFitFunction().
|
private |
|
private |
Nucleus that we are calibrating against.
Definition at line 84 of file TCal.h.
Referenced by Clear(), Copy(), GetNucleus(), InitTCal(), and SetNucleus().