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

Detailed Description

Definition at line 15 of file TGainMatch.h.

Public Member Functions

 TGainMatch ()
 
 TGainMatch (const char *name, const char *title)
 
 TGainMatch (const TGainMatch &)
 
 TGainMatch (TGainMatch &&) noexcept=default
 
 ~TGainMatch ()=default
 
Bool_t Align (TH1 *test, TH1 *hist, Int_t low_range=100, Int_t high_range=600)
 
void CalculateGain (Double_t cent1, Double_t cent2, Double_t eng1, Double_t eng2)
 
void Clear (Option_t *opt="") override
 
Bool_t CoarseMatch (TH1 *hist, Int_t chanNum=9999, Double_t energy1=1173.228, Double_t energy2=1332.492)
 
void Copy (TObject &obj) const override
 
Bool_t FineMatch (TH1 *energyHist, TH1 *testhist, TH1 *chargeHist, Double_t energy1, Double_t energy2, Int_t low_range=100, Int_t high_range=600, Int_t channelNum=9999)
 
Bool_t FineMatchFast (TH1 *hist, Double_t energy1, Double_t energy2, Int_t channelNum=9999)
 
Bool_t FineMatchFast (TH1 *hist, TPeak *peak1, TPeak *peak2, Int_t channelNum=9999)
 
Bool_t FineMatchFast (TH1 *hist1, Double_t energy1, TH1 *hist2, Double_t energy2, Int_t channelNum=9999)
 
Bool_t FineMatchFast (TH1 *hist1, TPeak *peak1, TH1 *hist2, TPeak *peak2, Int_t channelNum=9999)
 
TChannelGetChannel () const
 
Double_t GetCoarseRange () const
 
virtual TF1 * GetFitFunction () const
 
TH1 * GetHist () const
 
TNucleusGetNucleus () const override
 
virtual Double_t GetParameter (size_t parameter) const
 
virtual std::vector< Double_t > GetParameters () const
 
Bool_t IsGroupable () const override
 
TGainMatchoperator= (const TGainMatch &)=default
 
TGainMatchoperator= (TGainMatch &&) noexcept=default
 
void Print (Option_t *opt="") const override
 
Bool_t SetChannel (TChannel *chan)
 
Bool_t SetChannel (UInt_t chanNum)
 
void SetCoarseRange (Double_t coarseRange)
 
virtual void SetFitFunction (TF1 *func)
 
void SetHist (TH1 *) override
 
void SetNucleus (TNucleus *, Option_t *="") override
 
virtual void WriteToAllChannels (const std::string &mnemonic="")
 
void WriteToChannel () const override
 

Static Public Member Functions

static Bool_t AlignAll (TCalManager *cm, TH1 *hist, TH2 *mat, Int_t low_range=100, Int_t high_range=600)
 
static Bool_t CoarseMatchAll (TCalManager *cm, TH2 *mat, Double_t energy1=1173.228, Double_t energy2=1332.492)
 
static Bool_t FineMatchAll (TCalManager *cm, TH2 *charge_mat, TH2 *eng_mat, Int_t testchan, Double_t energy1, Double_t energy2, Int_t low_range=100, Int_t high_range=600)
 
static Bool_t FineMatchFastAll (TCalManager *cm, TH2 *mat, Double_t energy1, Double_t energy2)
 
static Bool_t FineMatchFastAll (TCalManager *cm, TH2 *mat, TPeak *peak1, TPeak *peak2)
 
static Bool_t FineMatchFastAll (TCalManager *cm, TH2 *mat1, Double_t energy1, TH2 *mat2, Double_t energy2)
 
static Bool_t FineMatchFastAll (TCalManager *cm, TH2 *mat1, TPeak *peak1, TH2 *mat2, TPeak *peak2)
 
static Double_t GetDefaultCoarseRange ()
 
static void SetDefaultCoarseRange (Double_t coarseRange)
 

Protected Member Functions

void InitTCal ()
 

Private Member Functions

Double_t HistCompare (Double_t *x, Double_t *par)
 

Private Attributes

std::array< Double_t, 2 > fAlignCoeffs {0.}
 
Bool_t fAligned {false}
 
TRef fChan {nullptr}
 
Bool_t fCoarseMatch {false}
 
Double_t fCoarseRange {0.}
 
TF1 * fFitFunc {nullptr}
 
std::array< Double_t, 2 > fGainCoeffs {0.}
 
TH1 * fHist {nullptr}
 
TNucleusfNuc {nullptr}
 

Static Private Attributes

static Double_t fDefaultCoarseRange = 40.
 
+ Inheritance diagram for TGainMatch:
+ Collaboration diagram for TGainMatch:

Constructor & Destructor Documentation

◆ TGainMatch() [1/4]

TGainMatch::TGainMatch ( )
inline

Definition at line 17 of file TGainMatch.h.

Referenced by AlignAll(), CoarseMatchAll(), FineMatchAll(), and FineMatchFastAll().

◆ TGainMatch() [2/4]

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

Definition at line 18 of file TGainMatch.h.

References Clear().

◆ TGainMatch() [3/4]

TGainMatch::TGainMatch ( const TGainMatch & copy)

Definition at line 14 of file TGainMatch.cxx.

References Copy(), and fCoarseRange.

◆ TGainMatch() [4/4]

TGainMatch::TGainMatch ( TGainMatch && )
defaultnoexcept

◆ ~TGainMatch()

TGainMatch::~TGainMatch ( )
default

Member Function Documentation

◆ Align()

Bool_t TGainMatch::Align ( TH1 * test,
TH1 * hist,
Int_t low_range = 100,
Int_t high_range = 600 )

Definition at line 507 of file TGainMatch.cxx.

References fAlignCoeffs, fAligned, fHist, hist, and HistCompare().

Referenced by FineMatch().

◆ AlignAll()

Bool_t TGainMatch::AlignAll ( TCalManager * cm,
TH1 * hist,
TH2 * mat,
Int_t low_range = 100,
Int_t high_range = 600 )
static

Definition at line 572 of file TGainMatch.cxx.

References TGainMatch(), TCalManager::AddToManager(), hist, and mat.

◆ CalculateGain()

void TGainMatch::CalculateGain ( Double_t cent1,
Double_t cent2,
Double_t eng1,
Double_t eng2 )

Definition at line 28 of file TGainMatch.cxx.

References fGainCoeffs, and TCal::SetFitFunction().

◆ Clear()

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

Definition at line 496 of file TGainMatch.cxx.

References TCal::Clear(), fAlignCoeffs, fAligned, fCoarseMatch, and fGainCoeffs.

Referenced by TGainMatch().

◆ CoarseMatch()

Bool_t TGainMatch::CoarseMatch ( TH1 * hist,
Int_t chanNum = 9999,
Double_t energy1 = 1173.228,
Double_t energy2 = 1332.492 )

◆ CoarseMatchAll()

Bool_t TGainMatch::CoarseMatchAll ( TCalManager * cm,
TH2 * mat,
Double_t energy1 = 1173.228,
Double_t energy2 = 1332.492 )
static

Definition at line 359 of file TGainMatch.cxx.

References TGainMatch(), TCalManager::AddToManager(), and mat.

◆ Copy()

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

Definition at line 21 of file TGainMatch.cxx.

References TCal::Copy(), fCoarseMatch, and fCoarseRange.

Referenced by TGainMatch().

◆ FineMatch()

Bool_t TGainMatch::FineMatch ( TH1 * energyHist,
TH1 * testhist,
TH1 * chargeHist,
Double_t energy1,
Double_t energy2,
Int_t low_range = 100,
Int_t high_range = 600,
Int_t channelNum = 9999 )

◆ FineMatchAll()

Bool_t TGainMatch::FineMatchAll ( TCalManager * cm,
TH2 * charge_mat,
TH2 * eng_mat,
Int_t testchan,
Double_t energy1,
Double_t energy2,
Int_t low_range = 100,
Int_t high_range = 600 )
static

Definition at line 621 of file TGainMatch.cxx.

References TGainMatch(), and TCalManager::AddToManager().

◆ FineMatchFast() [1/4]

Bool_t TGainMatch::FineMatchFast ( TH1 * hist,
Double_t energy1,
Double_t energy2,
Int_t channelNum = 9999 )

Definition at line 298 of file TGainMatch.cxx.

References FineMatchFast(), and hist.

◆ FineMatchFast() [2/4]

Bool_t TGainMatch::FineMatchFast ( TH1 * hist,
TPeak * peak1,
TPeak * peak2,
Int_t channelNum = 9999 )

Definition at line 290 of file TGainMatch.cxx.

References FineMatchFast(), and hist.

◆ FineMatchFast() [3/4]

Bool_t TGainMatch::FineMatchFast ( TH1 * hist1,
Double_t energy1,
TH1 * hist2,
Double_t energy2,
Int_t channelNum = 9999 )

Definition at line 305 of file TGainMatch.cxx.

References FineMatchFast().

◆ FineMatchFast() [4/4]

Bool_t TGainMatch::FineMatchFast ( TH1 * hist1,
TPeak * peak1,
TH1 * hist2,
TPeak * peak2,
Int_t channelNum = 9999 )

◆ FineMatchFastAll() [1/4]

Bool_t TGainMatch::FineMatchFastAll ( TCalManager * cm,
TH2 * mat,
Double_t energy1,
Double_t energy2 )
static

Definition at line 421 of file TGainMatch.cxx.

References FineMatchFastAll(), and mat.

Referenced by FineMatchFastAll(), FineMatchFastAll(), and FineMatchFastAll().

◆ FineMatchFastAll() [2/4]

Bool_t TGainMatch::FineMatchFastAll ( TCalManager * cm,
TH2 * mat,
TPeak * peak1,
TPeak * peak2 )
static

Definition at line 491 of file TGainMatch.cxx.

References FineMatchFastAll(), and mat.

◆ FineMatchFastAll() [3/4]

Bool_t TGainMatch::FineMatchFastAll ( TCalManager * cm,
TH2 * mat1,
Double_t energy1,
TH2 * mat2,
Double_t energy2 )
static

Definition at line 406 of file TGainMatch.cxx.

References FineMatchFastAll().

◆ FineMatchFastAll() [4/4]

Bool_t TGainMatch::FineMatchFastAll ( TCalManager * cm,
TH2 * mat1,
TPeak * peak1,
TH2 * mat2,
TPeak * peak2 )
static

Definition at line 426 of file TGainMatch.cxx.

References TGainMatch(), and TCalManager::AddToManager().

◆ GetChannel()

◆ GetCoarseRange()

Double_t TGainMatch::GetCoarseRange ( ) const
inline

Definition at line 72 of file TGainMatch.h.

References fCoarseRange.

◆ GetDefaultCoarseRange()

static Double_t TGainMatch::GetDefaultCoarseRange ( )
inlinestatic

Definition at line 78 of file TGainMatch.h.

References fDefaultCoarseRange.

◆ GetFitFunction()

virtual TF1 * TCal::GetFitFunction ( ) const
inlinevirtualinherited

Definition at line 59 of file TCal.h.

References TCal::fFitFunc.

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

◆ GetHist()

TH1 * TGainMatch::GetHist ( ) const
inline

Definition at line 65 of file TGainMatch.h.

◆ GetNucleus()

TNucleus * TGainMatch::GetNucleus ( ) const
inlineoverridevirtual

Reimplemented from TCal.

Definition at line 58 of file TGainMatch.h.

◆ GetParameter()

Double_t TCal::GetParameter ( size_t parameter) const
virtualinherited

Returns the parameter at the index parameter

Reimplemented in TCFDCal, TEnergyCal, and TTimeCal.

Definition at line 99 of file TCal.cxx.

References TCal::GetFitFunction().

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

◆ GetParameters()

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

Returns all of the parameters in the current TCal.

Reimplemented in TCFDCal, TEnergyCal, and TTimeCal.

Definition at line 81 of file TCal.cxx.

References TCal::GetFitFunction(), and TCal::GetParameter().

◆ HistCompare()

Double_t TGainMatch::HistCompare ( Double_t * x,
Double_t * par )
private

Definition at line 840 of file TGainMatch.cxx.

References fHist.

Referenced by Align().

◆ 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 TGainMatch::IsGroupable ( ) const
inlineoverridevirtual

Implements TCal.

Definition at line 54 of file TGainMatch.h.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

TGainMatch & TGainMatch::operator= ( TGainMatch && )
defaultnoexcept

◆ Print()

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

Definition at line 337 of file TGainMatch.cxx.

References fAlignCoeffs, fAligned, fCoarseMatch, fGainCoeffs, and TCal::Print().

◆ SetChannel() [1/2]

Bool_t TCal::SetChannel ( TChannel * chan)
inherited

Sets the channel being calibrated

Definition at line 51 of file TCal.cxx.

References TCal::fChan.

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

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

◆ SetCoarseRange()

void TGainMatch::SetCoarseRange ( Double_t coarseRange)
inline

Definition at line 71 of file TGainMatch.h.

References fCoarseRange.

◆ SetDefaultCoarseRange()

static void TGainMatch::SetDefaultCoarseRange ( Double_t coarseRange)
inlinestatic

Definition at line 73 of file TGainMatch.h.

References fDefaultCoarseRange.

◆ SetFitFunction()

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

Definition at line 60 of file TCal.h.

References TCal::fFitFunc.

Referenced by CalculateGain(), CoarseMatch(), FineMatch(), and FineMatchFast().

◆ SetHist()

void TGainMatch::SetHist ( TH1 * )
inlineoverridevirtual

Reimplemented from TCal.

Definition at line 64 of file TGainMatch.h.

◆ SetNucleus()

void TGainMatch::SetNucleus ( TNucleus * ,
Option_t * = "" )
inlineoverridevirtual

Reimplemented from TCal.

Definition at line 57 of file TGainMatch.h.

◆ 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 TGainMatch::WriteToChannel ( ) const
overridevirtual

Member Data Documentation

◆ fAlignCoeffs

std::array<Double_t, 2> TGainMatch::fAlignCoeffs {0.}
private

Definition at line 84 of file TGainMatch.h.

Referenced by Align(), Clear(), FineMatch(), and Print().

◆ fAligned

Bool_t TGainMatch::fAligned {false}
private

Definition at line 82 of file TGainMatch.h.

Referenced by Align(), Clear(), and Print().

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

◆ fCoarseMatch

Bool_t TGainMatch::fCoarseMatch {false}
private

Definition at line 81 of file TGainMatch.h.

Referenced by Clear(), CoarseMatch(), Copy(), FineMatch(), FineMatchFast(), and Print().

◆ fCoarseRange

Double_t TGainMatch::fCoarseRange {0.}
private

Definition at line 86 of file TGainMatch.h.

Referenced by TGainMatch(), CoarseMatch(), Copy(), GetCoarseRange(), and SetCoarseRange().

◆ fDefaultCoarseRange

Double_t TGainMatch::fDefaultCoarseRange = 40.
staticprivate

Definition at line 89 of file TGainMatch.h.

Referenced by GetDefaultCoarseRange(), and SetDefaultCoarseRange().

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

◆ fGainCoeffs

std::array<Double_t, 2> TGainMatch::fGainCoeffs {0.}
private

Definition at line 85 of file TGainMatch.h.

Referenced by CalculateGain(), Clear(), CoarseMatch(), FineMatch(), FineMatchFast(), and Print().

◆ fHist

TH1* TGainMatch::fHist {nullptr}
private

Definition at line 83 of file TGainMatch.h.

Referenced by Align(), CoarseMatch(), and HistCompare().

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