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

Detailed Description

Definition at line 105 of file TSourceCalibration.h.

Public Member Functions

 TChannelTab (const TChannelTab &)=default
 
 TChannelTab (TChannelTab &&) noexcept=default
 
 TChannelTab (TSourceCalibration *parent, std::vector< TNucleus * > nuclei, std::vector< GH1D * > projections, std::string name, TGCompositeFrame *frame, double sigma, double threshold, int degree, std::vector< std::vector< std::tuple< double, double, double, double > > > sourceEnergies, TGHProgressBar *progressBar)
 
 ~TChannelTab ()
 
int ActiveSourceTab () const
 
void Calibrate ()
 
void Calibrate (const int &degree, const bool &force=false)
 
void CalibrationStatus (Int_t event, Int_t px, Int_t py, TObject *selected)
 
void CreateSourceTab (size_t source)
 
TGraphErrors * Data (int channelId) const
 
void Disconnect ()
 
void FindPeaks (const double &sigma, const double &threshold, const double &peakRatio, const bool &force=false, const bool &fast=true)
 
void MakeConnections ()
 
std::string Name () const
 
size_t NumberOfSources () const
 
TChannelTaboperator= (const TChannelTab &)=default
 
TChannelTaboperator= (TChannelTab &&) noexcept=default
 
void PrintLayout () const
 
void SelectCanvas (Event_t *event)
 
TSourceTabSelectedSourceTab () const
 
void SelectedTab (Int_t id)
 
TGTab * SourceTab () const
 
void UpdateChannel ()
 
void UpdateData ()
 
void UpdateFwhm ()
 
void Write (TFile *output)
 

Static Public Member Functions

static void ZoomX ()
 
static void ZoomY ()
 

Private Attributes

int fActiveSourceTab {0}
 
TRootEmbeddedCanvas * fCalibrationCanvas {nullptr}
 
TGCompositeFrame * fCalibrationFrame {nullptr}
 
TPad * fCalibrationPad {nullptr}
 
TGTab * fCanvasTab {nullptr}
 
TGCompositeFrame * fChannelFrame {nullptr}
 
TGStatusBar * fChannelStatusBar {nullptr}
 
TPaveText * fChi2Label {nullptr}
 
TCalibrationGraphSetfData {nullptr}
 
int fDegree {1}
 
TCalibrationGraphSetfFwhm {nullptr}
 
TRootEmbeddedCanvas * fFwhmCanvas {nullptr}
 
TGCompositeFrame * fFwhmFrame {nullptr}
 
TLegend * fLegend {nullptr}
 
std::string fName
 
std::vector< TNucleus * > fNuclei
 
TSourceCalibrationfParent
 
TGHProgressBar * fProgressBar {nullptr}
 
std::vector< GH1D * > fProjections
 
TPad * fResidualPad {nullptr}
 
double fSigma {2.}
 
std::vector< std::vector< std::tuple< double, double, double, double > > > fSourceEnergies
 
std::vector< TSourceTab * > fSources
 
TGTab * fSourceTab {nullptr}
 
double fThreshold {0.05}
 
+ Collaboration diagram for TChannelTab:

Constructor & Destructor Documentation

◆ TChannelTab() [1/3]

TChannelTab::TChannelTab ( TSourceCalibration * parent,
std::vector< TNucleus * > nuclei,
std::vector< GH1D * > projections,
std::string name,
TGCompositeFrame * frame,
double sigma,
double threshold,
int degree,
std::vector< std::vector< std::tuple< double, double, double, double > > > sourceEnergies,
TGHProgressBar * progressBar )

◆ TChannelTab() [2/3]

TChannelTab::TChannelTab ( const TChannelTab & )
default

◆ TChannelTab() [3/3]

TChannelTab::TChannelTab ( TChannelTab && )
defaultnoexcept

◆ ~TChannelTab()

Member Function Documentation

◆ ActiveSourceTab()

int TChannelTab::ActiveSourceTab ( ) const
inline

Definition at line 134 of file TSourceCalibration.h.

References fActiveSourceTab.

◆ Calibrate() [1/2]

◆ Calibrate() [2/2]

void TChannelTab::Calibrate ( const int & degree,
const bool & force = false )

◆ CalibrationStatus()

void TChannelTab::CalibrationStatus ( Int_t event,
Int_t px,
Int_t py,
TObject * selected )

Definition at line 1033 of file TSourceCalibration.cxx.

References fCalibrationCanvas, and fChannelStatusBar.

◆ CreateSourceTab()

◆ Data()

TGraphErrors * TChannelTab::Data ( int channelId) const
inline

Definition at line 131 of file TSourceCalibration.h.

References fSources.

Referenced by UpdateData().

◆ Disconnect()

void TChannelTab::Disconnect ( )

Definition at line 985 of file TSourceCalibration.cxx.

References fCalibrationCanvas, fData, fSources, and fSourceTab.

◆ FindPeaks()

void TChannelTab::FindPeaks ( const double & sigma,
const double & threshold,
const double & peakRatio,
const bool & force = false,
const bool & fast = true )

◆ MakeConnections()

void TChannelTab::MakeConnections ( )

Definition at line 973 of file TSourceCalibration.cxx.

References fCalibrationCanvas, fData, fSources, and fSourceTab.

◆ Name()

std::string TChannelTab::Name ( ) const
inline

Definition at line 133 of file TSourceCalibration.h.

References fName.

◆ NumberOfSources()

size_t TChannelTab::NumberOfSources ( ) const
inline

Definition at line 132 of file TSourceCalibration.h.

References fSources.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

TChannelTab & TChannelTab::operator= ( TChannelTab && )
defaultnoexcept

◆ PrintLayout()

void TChannelTab::PrintLayout ( ) const

Definition at line 1412 of file TSourceCalibration.cxx.

References fCalibrationCanvas, fChannelFrame, and fSources.

◆ SelectCanvas()

void TChannelTab::SelectCanvas ( Event_t * event)

◆ SelectedSourceTab()

TSourceTab * TChannelTab::SelectedSourceTab ( ) const
inline

Definition at line 135 of file TSourceCalibration.h.

References fActiveSourceTab, and fSources.

◆ SelectedTab()

void TChannelTab::SelectedTab ( Int_t id)

Simple function that enables and disables the previous and next buttons depending on which tab was selected.

Definition at line 996 of file TSourceCalibration.cxx.

References DGREEN, DYELLOW, fActiveSourceTab, fSources, kBasicFlow, RESET_COLOR, and TSourceCalibration::VerboseLevel().

◆ SourceTab()

TGTab * TChannelTab::SourceTab ( ) const
inline

Definition at line 130 of file TSourceCalibration.h.

References fSourceTab.

◆ UpdateChannel()

◆ UpdateData()

void TChannelTab::UpdateData ( )

◆ UpdateFwhm()

void TChannelTab::UpdateFwhm ( )

◆ Write()

void TChannelTab::Write ( TFile * output)

Write graphs to output.

Definition at line 1260 of file TSourceCalibration.cxx.

References DYELLOW, fData, fFwhm, fName, kSubroutines, and TSourceCalibration::VerboseLevel().

◆ ZoomX()

void TChannelTab::ZoomX ( )
static

finds corresponding graph (res_xxx for cal_xxx and vice versa) and sets it's x-axis range to be the same as the selected graphs

Definition at line 1270 of file TSourceCalibration.cxx.

References kLoops, and TSourceCalibration::VerboseLevel().

◆ ZoomY()

void TChannelTab::ZoomY ( )
static

finds corresponding graph (res_xxx for cal_xxx and vice versa) and sets it's y-axis range to be the same as the selected graphs

Definition at line 1344 of file TSourceCalibration.cxx.

References kLoops, and TSourceCalibration::VerboseLevel().

Member Data Documentation

◆ fActiveSourceTab

int TChannelTab::fActiveSourceTab {0}
private

id of the currently active source tab

Definition at line 170 of file TSourceCalibration.h.

Referenced by ActiveSourceTab(), FindPeaks(), SelectedSourceTab(), and SelectedTab().

◆ fCalibrationCanvas

TRootEmbeddedCanvas* TChannelTab::fCalibrationCanvas {nullptr}
private

◆ fCalibrationFrame

TGCompositeFrame* TChannelTab::fCalibrationFrame {nullptr}
private

frame of tab with calibration

Definition at line 148 of file TSourceCalibration.h.

Referenced by ~TChannelTab().

◆ fCalibrationPad

TPad* TChannelTab::fCalibrationPad {nullptr}
private

Definition at line 151 of file TSourceCalibration.h.

Referenced by ~TChannelTab(), and Calibrate().

◆ fCanvasTab

TGTab* TChannelTab::fCanvasTab {nullptr}
private

tab for canvases (calibration with residuals, and FWHM)

Definition at line 147 of file TSourceCalibration.h.

Referenced by ~TChannelTab().

◆ fChannelFrame

TGCompositeFrame* TChannelTab::fChannelFrame {nullptr}
private

main frame of this tab

Definition at line 144 of file TSourceCalibration.h.

Referenced by TChannelTab(), and PrintLayout().

◆ fChannelStatusBar

TGStatusBar* TChannelTab::fChannelStatusBar {nullptr}
private

Definition at line 152 of file TSourceCalibration.h.

Referenced by ~TChannelTab(), Calibrate(), and CalibrationStatus().

◆ fChi2Label

TPaveText* TChannelTab::fChi2Label {nullptr}
private

Definition at line 154 of file TSourceCalibration.h.

Referenced by ~TChannelTab(), and Calibrate().

◆ fData

TCalibrationGraphSet* TChannelTab::fData {nullptr}
private

combined data from all sources

Definition at line 168 of file TSourceCalibration.h.

Referenced by TChannelTab(), ~TChannelTab(), Calibrate(), Disconnect(), MakeConnections(), UpdateChannel(), UpdateData(), and Write().

◆ fDegree

int TChannelTab::fDegree {1}
private

degree of polynomial function used to calibrate

Definition at line 166 of file TSourceCalibration.h.

Referenced by Calibrate(), and Calibrate().

◆ fFwhm

TCalibrationGraphSet* TChannelTab::fFwhm {nullptr}
private

combined fwhm from all sources

Definition at line 169 of file TSourceCalibration.h.

Referenced by ~TChannelTab(), UpdateFwhm(), and Write().

◆ fFwhmCanvas

TRootEmbeddedCanvas* TChannelTab::fFwhmCanvas {nullptr}
private

Definition at line 156 of file TSourceCalibration.h.

Referenced by ~TChannelTab().

◆ fFwhmFrame

TGCompositeFrame* TChannelTab::fFwhmFrame {nullptr}
private

frame of tab with fwhm

Definition at line 155 of file TSourceCalibration.h.

Referenced by ~TChannelTab().

◆ fLegend

TLegend* TChannelTab::fLegend {nullptr}
private

Definition at line 153 of file TSourceCalibration.h.

Referenced by ~TChannelTab(), and Calibrate().

◆ fName

std::string TChannelTab::fName
private

name of this tab

Definition at line 163 of file TSourceCalibration.h.

Referenced by TChannelTab(), Calibrate(), CreateSourceTab(), Name(), UpdateChannel(), UpdateData(), UpdateFwhm(), and Write().

◆ fNuclei

std::vector<TNucleus*> TChannelTab::fNuclei
private

the source nucleus

Definition at line 161 of file TSourceCalibration.h.

Referenced by TChannelTab(), CreateSourceTab(), UpdateData(), and UpdateFwhm().

◆ fParent

TSourceCalibration* TChannelTab::fParent
private

the parent of this tab

Definition at line 160 of file TSourceCalibration.h.

Referenced by CreateSourceTab(), and UpdateChannel().

◆ fProgressBar

TGHProgressBar* TChannelTab::fProgressBar {nullptr}
private

Definition at line 157 of file TSourceCalibration.h.

Referenced by ~TChannelTab(), and CreateSourceTab().

◆ fProjections

std::vector<GH1D*> TChannelTab::fProjections
private

vector of all projections

Definition at line 162 of file TSourceCalibration.h.

Referenced by CreateSourceTab().

◆ fResidualPad

TPad* TChannelTab::fResidualPad {nullptr}
private

Definition at line 150 of file TSourceCalibration.h.

Referenced by ~TChannelTab(), and Calibrate().

◆ fSigma

double TChannelTab::fSigma {2.}
private

the sigma used in the peak finder

Definition at line 164 of file TSourceCalibration.h.

Referenced by CreateSourceTab().

◆ fSourceEnergies

std::vector<std::vector<std::tuple<double, double, double, double> > > TChannelTab::fSourceEnergies
private

vector with source energies and uncertainties

Definition at line 167 of file TSourceCalibration.h.

Referenced by CreateSourceTab().

◆ fSources

std::vector<TSourceTab*> TChannelTab::fSources
private

◆ fSourceTab

TGTab* TChannelTab::fSourceTab {nullptr}
private

tab for sources

Definition at line 145 of file TSourceCalibration.h.

Referenced by ~TChannelTab(), CreateSourceTab(), Disconnect(), FindPeaks(), MakeConnections(), and SourceTab().

◆ fThreshold

double TChannelTab::fThreshold {0.05}
private

the threshold (relative to the largest peak) used in the peak finder

Definition at line 165 of file TSourceCalibration.h.

Referenced by CreateSourceTab().