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

Detailed Description

Definition at line 15 of file TCalibrator.h.

Classes

struct  Peak
 

Public Member Functions

 TCalibrator ()
 
 TCalibrator (const TCalibrator &)=default
 
 TCalibrator (TCalibrator &&) noexcept=default
 
 ~TCalibrator ()
 
int AddData (TH1 *data, const std::string &source, double sigma=2.0, double threshold=0.05, double error=0.001)
 
int AddData (TH1 *data, TNucleus *source, double sigma=2.0, double threshold=0.05, double error=0.001)
 
void AddPeak (double cent, double eng, std::string nuc, double a=0.0, double inten=0.0)
 
std::vector< double > Calibrate (double min_figure_of_merit=0.001)
 
void Clear (Option_t *opt="") override
 
void Copy (TObject &obj) const override
 
void Draw (Option_t *opt="") override
 
TF1 * EffFit ()
 
TGraph * EffGraph ()
 
void Fit (int order=1)
 
TGraph * FitGraph ()
 
double GetEffParameter (int i=0) const
 
int GetFitOrder () const
 
double GetParameter (int i=0) const
 
Peak GetPeak (UInt_t i) const
 
TF1 * LinFit ()
 
TGraph & MakeCalibrationGraph (double min_figure_of_merit=0.001)
 
TGraphErrors & MakeEffGraph (double seconds=3600., double bq=100000., Option_t *opt="draw")
 
TCalibratoroperator= (const TCalibrator &)=default
 
TCalibratoroperator= (TCalibrator &&) noexcept=default
 
void Print (Option_t *opt="") const override
 
std::string PrintEfficency (const char *filename="")
 
void SetFitOrder (int order)
 
UInt_t Size () const
 
void UpdateTChannel (TChannel *channel)
 

Static Private Member Functions

static bool CheckMap (const std::map< double, double > &inmap)
 
static std::map< double, double > Match (std::vector< double >, std::vector< double >)
 
static void PrintMap (std::map< double, double > &inmap)
 
static void ResetMap (std::map< double, double > &inmap)
 

Private Attributes

TF1 * fEffFit {nullptr}
 
TGraphErrors fEffGraph
 
std::array< double, 4 > fEffPar {0.}
 
TGraph fFitGraph
 
int fFitOrder {0}
 
TF1 * fLinFit {nullptr}
 
std::vector< PeakfPeaks
 
+ Inheritance diagram for TCalibrator:
+ Collaboration diagram for TCalibrator:

Constructor & Destructor Documentation

◆ TCalibrator() [1/3]

TCalibrator::TCalibrator ( )

Definition at line 28 of file TCalibrator.cxx.

References Clear().

◆ TCalibrator() [2/3]

TCalibrator::TCalibrator ( const TCalibrator & )
default

◆ TCalibrator() [3/3]

TCalibrator::TCalibrator ( TCalibrator && )
defaultnoexcept

◆ ~TCalibrator()

TCalibrator::~TCalibrator ( )

Definition at line 33 of file TCalibrator.cxx.

References fEffFit, and fLinFit.

Member Function Documentation

◆ AddData() [1/2]

int TCalibrator::AddData ( TH1 * data,
const std::string & source,
double sigma = 2.0,
double threshold = 0.05,
double error = 0.001 )

Definition at line 216 of file TCalibrator.cxx.

References AddData().

Referenced by AddData().

◆ AddData() [2/2]

int TCalibrator::AddData ( TH1 * data,
TNucleus * source,
double sigma = 2.0,
double threshold = 0.05,
double error = 0.001 )

◆ AddPeak()

void TCalibrator::AddPeak ( double cent,
double eng,
std::string nuc,
double a = 0.0,
double inten = 0.0 )

◆ Calibrate()

std::vector< double > TCalibrator::Calibrate ( double min_figure_of_merit = 0.001)

Definition at line 210 of file TCalibrator.cxx.

◆ CheckMap()

bool TCalibrator::CheckMap ( const std::map< double, double > & inmap)
staticprivate

Return false if any member of map is nan (not a number).

Definition at line 382 of file TCalibrator.cxx.

◆ Clear()

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

Definition at line 125 of file TCalibrator.cxx.

References fEffGraph, fEffPar, and fFitGraph.

Referenced by TCalibrator().

◆ Copy()

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

Definition at line 39 of file TCalibrator.cxx.

◆ Draw()

void TCalibrator::Draw ( Option_t * opt = "")
override

Definition at line 136 of file TCalibrator.cxx.

References fFitGraph.

◆ EffFit()

TF1 * TCalibrator::EffFit ( )
inline

Definition at line 61 of file TCalibrator.h.

References fEffFit.

◆ EffGraph()

TGraph * TCalibrator::EffGraph ( )
inline

Definition at line 59 of file TCalibrator.h.

References fEffGraph.

◆ Fit()

void TCalibrator::Fit ( int order = 1)

◆ FitGraph()

TGraph * TCalibrator::FitGraph ( )
inline

Definition at line 58 of file TCalibrator.h.

References fFitGraph.

◆ GetEffParameter()

double TCalibrator::GetEffParameter ( int i = 0) const

Definition at line 185 of file TCalibrator.cxx.

References fEffFit.

◆ GetFitOrder()

int TCalibrator::GetFitOrder ( ) const
inline

Definition at line 30 of file TCalibrator.h.

References fFitOrder.

◆ GetParameter()

double TCalibrator::GetParameter ( int i = 0) const

Definition at line 177 of file TCalibrator.cxx.

References fLinFit.

Referenced by Print().

◆ GetPeak()

Peak TCalibrator::GetPeak ( UInt_t i) const
inline

Definition at line 56 of file TCalibrator.h.

References fPeaks.

◆ LinFit()

TF1 * TCalibrator::LinFit ( )
inline

Definition at line 60 of file TCalibrator.h.

References fLinFit.

◆ MakeCalibrationGraph()

TGraph & TCalibrator::MakeCalibrationGraph ( double min_figure_of_merit = 0.001)

Definition at line 193 of file TCalibrator.cxx.

References fFitGraph, and fPeaks.

Referenced by Fit().

◆ MakeEffGraph()

TGraphErrors & TCalibrator::MakeEffGraph ( double seconds = 3600.,
double bq = 100000.,
Option_t * opt = "draw" )

Definition at line 79 of file TCalibrator.cxx.

References fEffFit, fEffGraph, fPeaks, and GRootFunctions::GammaEff().

◆ Match()

std::map< double, double > TCalibrator::Match ( std::vector< double > peaks,
std::vector< double > source )
staticprivate

Definition at line 299 of file TCalibrator.cxx.

Referenced by AddData().

◆ operator=() [1/2]

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

◆ operator=() [2/2]

TCalibrator & TCalibrator::operator= ( TCalibrator && )
defaultnoexcept

◆ Print()

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

Definition at line 43 of file TCalibrator.cxx.

References fPeaks, and GetParameter().

Referenced by Fit().

◆ PrintEfficency()

std::string TCalibrator::PrintEfficency ( const char * filename = "")

Definition at line 56 of file TCalibrator.cxx.

References fPeaks.

◆ PrintMap()

void TCalibrator::PrintMap ( std::map< double, double > & inmap)
staticprivate

Definition at line 290 of file TCalibrator.cxx.

◆ ResetMap()

void TCalibrator::ResetMap ( std::map< double, double > & inmap)
staticprivate

Definition at line 283 of file TCalibrator.cxx.

◆ SetFitOrder()

void TCalibrator::SetFitOrder ( int order)
inline

Definition at line 31 of file TCalibrator.h.

References fFitOrder.

◆ Size()

UInt_t TCalibrator::Size ( ) const
inline

Definition at line 28 of file TCalibrator.h.

References fPeaks.

◆ UpdateTChannel()

void TCalibrator::UpdateTChannel ( TChannel * channel)

Definition at line 389 of file TCalibrator.cxx.

Member Data Documentation

◆ fEffFit

TF1* TCalibrator::fEffFit {nullptr}
private

Definition at line 84 of file TCalibrator.h.

Referenced by ~TCalibrator(), EffFit(), GetEffParameter(), and MakeEffGraph().

◆ fEffGraph

TGraphErrors TCalibrator::fEffGraph
private

Definition at line 82 of file TCalibrator.h.

Referenced by Clear(), EffGraph(), and MakeEffGraph().

◆ fEffPar

std::array<double, 4> TCalibrator::fEffPar {0.}
private

Definition at line 88 of file TCalibrator.h.

Referenced by Clear().

◆ fFitGraph

TGraph TCalibrator::fFitGraph
private

Definition at line 81 of file TCalibrator.h.

Referenced by Clear(), Draw(), Fit(), FitGraph(), and MakeCalibrationGraph().

◆ fFitOrder

int TCalibrator::fFitOrder {0}
private

Definition at line 86 of file TCalibrator.h.

Referenced by GetFitOrder(), and SetFitOrder().

◆ fLinFit

TF1* TCalibrator::fLinFit {nullptr}
private

Definition at line 83 of file TCalibrator.h.

Referenced by ~TCalibrator(), Fit(), GetParameter(), and LinFit().

◆ fPeaks

std::vector<Peak> TCalibrator::fPeaks
private