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

Detailed Description

Definition at line 126 of file TSourceCalibration.h.

Public Member Functions

 TChannelTab (const TChannelTab &)=default
 
 TChannelTab (TChannelTab &&) noexcept=default
 
 TChannelTab (TSourceCalibration *sourceCal, std::vector< TNucleus * > nuclei, std::vector< GH1D * > projections, std::string name, TGCompositeFrame *frame, std::vector< std::vector< std::tuple< double, double, double, double > > > sourceEnergies, TGHProgressBar *progressBar)
 
 ~TChannelTab ()
 
int ActiveSourceTab () const
 
void Calibrate ()
 
void Calibrate (int degree)
 
void CalibrationStatus (Int_t event, Int_t px, Int_t py, TObject *selected)
 
TGraphErrors * Data (int channelId) const
 
void Disconnect ()
 
void Draw ()
 
void FindAllCalibratedPeaks ()
 
void FindCalibratedPeaks ()
 
void Initialize (const bool &force)
 
void MakeConnections ()
 
std::string Name () const
 
size_t NumberOfSources () const
 
TChannelTaboperator= (const TChannelTab &)=default
 
TChannelTaboperator= (TChannelTab &&) noexcept=default
 
void PrintCanvases () const
 
void PrintLayout () const
 
void RecursiveRemove (const double &maxResidual)
 
void RemovePoint (Int_t oldGraph, Int_t oldPoint)
 
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 Member Functions

void BuildInterface ()
 
void CreateSourceTab (size_t source)
 

Private Attributes

int fActiveSourceTab {0}
 
TRootEmbeddedCanvas * fCalibrationCanvas {nullptr}
 
TGCompositeFrame * fCalibrationFrame {nullptr}
 
TPad * fCalibrationPad {nullptr}
 
TPaveText * fCalLabel {nullptr}
 
TGTab * fCanvasTab {nullptr}
 
TGCompositeFrame * fChannelFrame {nullptr}
 
TGStatusBar * fChannelStatusBar {nullptr}
 
TPaveText * fChi2Label {nullptr}
 
TCalibrationGraphSetfData {nullptr}
 
TCalibrationGraphSetfFwhm {nullptr}
 
TRootEmbeddedCanvas * fFwhmCanvas {nullptr}
 
TGCompositeFrame * fFwhmFrame {nullptr}
 
TPaveText * fInfoLabel {nullptr}
 
TCalibrationGraphSetfInit {nullptr}
 
TRootEmbeddedCanvas * fInitCanvas {nullptr}
 
TGCompositeFrame * fInitFrame {nullptr}
 
TLegend * fLegend {nullptr}
 
std::string fName
 
std::vector< TNucleus * > fNuclei
 
TGHProgressBar * fProgressBar {nullptr}
 
std::vector< GH1D * > fProjections
 
TPad * fResidualPad {nullptr}
 
TSourceCalibrationfSourceCalibration
 
std::vector< std::vector< std::tuple< double, double, double, double > > > fSourceEnergies
 
std::vector< TSourceTab * > fSources
 
TGTab * fSourceTab {nullptr}
 
+ Collaboration diagram for TChannelTab:

Constructor & Destructor Documentation

◆ TChannelTab() [1/3]

TChannelTab::TChannelTab ( TSourceCalibration * sourceCal,
std::vector< TNucleus * > nuclei,
std::vector< GH1D * > projections,
std::string name,
TGCompositeFrame * frame,
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 157 of file TSourceCalibration.h.

References fActiveSourceTab.

◆ BuildInterface()

◆ Calibrate() [1/2]

void TChannelTab::Calibrate ( )

Uses the statis TSourceCalibration::Degree for the degree of the polynomial used to calibrate the data.

Definition at line 1680 of file TSourceCalibration.cxx.

References Calibrate(), TSourceCalibration::Degree(), and fSourceCalibration.

Referenced by Calibrate(), Initialize(), TSourceTab::ProjectionStatus(), and RecursiveRemove().

◆ Calibrate() [2/2]

◆ CalibrationStatus()

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

Definition at line 1581 of file TSourceCalibration.cxx.

References fCalibrationCanvas, and fChannelStatusBar.

◆ CreateSourceTab()

void TChannelTab::CreateSourceTab ( size_t source)
private

◆ Data()

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

Definition at line 154 of file TSourceCalibration.h.

References fSources.

Referenced by UpdateData().

◆ Disconnect()

void TChannelTab::Disconnect ( )

Definition at line 1519 of file TSourceCalibration.cxx.

References fCalibrationCanvas, fData, fSources, and fSourceTab.

◆ Draw()

void TChannelTab::Draw ( )

◆ FindAllCalibratedPeaks()

void TChannelTab::FindAllCalibratedPeaks ( )

◆ FindCalibratedPeaks()

◆ Initialize()

◆ MakeConnections()

void TChannelTab::MakeConnections ( )

◆ Name()

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

Definition at line 156 of file TSourceCalibration.h.

References fName.

Referenced by PrintCanvases(), and RecursiveRemove().

◆ NumberOfSources()

size_t TChannelTab::NumberOfSources ( ) const
inline

Definition at line 155 of file TSourceCalibration.h.

References fSources.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ PrintCanvases()

void TChannelTab::PrintCanvases ( ) const

Definition at line 2120 of file TSourceCalibration.cxx.

References fCalibrationCanvas, fFwhmCanvas, fSources, and Name().

◆ PrintLayout()

void TChannelTab::PrintLayout ( ) const

Definition at line 2137 of file TSourceCalibration.cxx.

References fCalibrationCanvas, fChannelFrame, and fSources.

◆ RecursiveRemove()

void TChannelTab::RecursiveRemove ( const double & maxResidual)

This function goes through the residuals of the calibration and recursively removes each point that is above the maxResidual parameter. The function requires an initial calibration to have residuals available. After each point that is removed, it re-calibrates the data, producing new residuals.

Definition at line 1782 of file TSourceCalibration.cxx.

References Calibrate(), DYELLOW, fData, kBasicFlow, kSubroutines, Name(), RecursiveRemove(), TCalibrationGraphSet::RemovePoint(), RESET_COLOR, TCalibrationGraphSet::TotalGraph(), TCalibrationGraphSet::TotalResidualGraph(), UpdateData(), UpdateFwhm(), and TSourceCalibration::VerboseLevel().

Referenced by RecursiveRemove().

◆ RemovePoint()

void TChannelTab::RemovePoint ( Int_t oldGraph,
Int_t oldPoint )

◆ SelectCanvas()

void TChannelTab::SelectCanvas ( Event_t * event)

◆ SelectedSourceTab()

TSourceTab * TChannelTab::SelectedSourceTab ( ) const
inline

Definition at line 158 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 1530 of file TSourceCalibration.cxx.

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

◆ SourceTab()

TGTab * TChannelTab::SourceTab ( ) const
inline

Definition at line 153 of file TSourceCalibration.h.

References fSourceTab.

◆ UpdateChannel()

◆ UpdateData()

◆ UpdateFwhm()

◆ Write()

void TChannelTab::Write ( TFile * output)

Write graphs to output.

Definition at line 1968 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 1978 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 2052 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 204 of file TSourceCalibration.h.

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

◆ fCalibrationCanvas

TRootEmbeddedCanvas* TChannelTab::fCalibrationCanvas {nullptr}
private

◆ fCalibrationFrame

TGCompositeFrame* TChannelTab::fCalibrationFrame {nullptr}
private

frame of tab with calibration

Definition at line 180 of file TSourceCalibration.h.

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

◆ fCalibrationPad

TPad* TChannelTab::fCalibrationPad {nullptr}
private

Definition at line 183 of file TSourceCalibration.h.

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

◆ fCalLabel

TPaveText* TChannelTab::fCalLabel {nullptr}
private

Definition at line 187 of file TSourceCalibration.h.

Referenced by Initialize().

◆ fCanvasTab

TGTab* TChannelTab::fCanvasTab {nullptr}
private

tab for canvases (calibration with residuals, and FWHM)

Definition at line 179 of file TSourceCalibration.h.

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

◆ fChannelFrame

TGCompositeFrame* TChannelTab::fChannelFrame {nullptr}
private

main frame of this tab

Definition at line 176 of file TSourceCalibration.h.

Referenced by ~TChannelTab(), BuildInterface(), and PrintLayout().

◆ fChannelStatusBar

TGStatusBar* TChannelTab::fChannelStatusBar {nullptr}
private

Definition at line 184 of file TSourceCalibration.h.

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

◆ fChi2Label

TPaveText* TChannelTab::fChi2Label {nullptr}
private

Definition at line 186 of file TSourceCalibration.h.

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

◆ fData

◆ fFwhm

TCalibrationGraphSet* TChannelTab::fFwhm {nullptr}
private

combined fwhm from all sources

Definition at line 202 of file TSourceCalibration.h.

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

◆ fFwhmCanvas

TRootEmbeddedCanvas* TChannelTab::fFwhmCanvas {nullptr}
private

Definition at line 190 of file TSourceCalibration.h.

Referenced by ~TChannelTab(), BuildInterface(), Draw(), and PrintCanvases().

◆ fFwhmFrame

TGCompositeFrame* TChannelTab::fFwhmFrame {nullptr}
private

frame of tab with fwhm

Definition at line 189 of file TSourceCalibration.h.

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

◆ fInfoLabel

TPaveText* TChannelTab::fInfoLabel {nullptr}
private

Definition at line 188 of file TSourceCalibration.h.

Referenced by Calibrate().

◆ fInit

TCalibrationGraphSet* TChannelTab::fInit {nullptr}
private

combined initial data from all sources

Definition at line 203 of file TSourceCalibration.h.

Referenced by Initialize().

◆ fInitCanvas

TRootEmbeddedCanvas* TChannelTab::fInitCanvas {nullptr}
private

Definition at line 192 of file TSourceCalibration.h.

Referenced by BuildInterface(), and Initialize().

◆ fInitFrame

TGCompositeFrame* TChannelTab::fInitFrame {nullptr}
private

frame of tab with initial calibration

Definition at line 191 of file TSourceCalibration.h.

Referenced by BuildInterface().

◆ fLegend

TLegend* TChannelTab::fLegend {nullptr}
private

Definition at line 185 of file TSourceCalibration.h.

Referenced by ~TChannelTab(), BuildInterface(), Calibrate(), Draw(), and Initialize().

◆ fName

std::string TChannelTab::fName
private

◆ fNuclei

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

the source nucleus

Definition at line 197 of file TSourceCalibration.h.

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

◆ fProgressBar

TGHProgressBar* TChannelTab::fProgressBar {nullptr}
private

Definition at line 193 of file TSourceCalibration.h.

Referenced by CreateSourceTab(), and Initialize().

◆ fProjections

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

vector of all projections

Definition at line 198 of file TSourceCalibration.h.

Referenced by CreateSourceTab().

◆ fResidualPad

TPad* TChannelTab::fResidualPad {nullptr}
private

Definition at line 182 of file TSourceCalibration.h.

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

◆ fSourceCalibration

TSourceCalibration* TChannelTab::fSourceCalibration
private

the parent of this tab

Definition at line 196 of file TSourceCalibration.h.

Referenced by Calibrate(), CreateSourceTab(), and UpdateChannel().

◆ fSourceEnergies

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

vector with source energies and uncertainties

Definition at line 200 of file TSourceCalibration.h.

Referenced by CreateSourceTab().

◆ fSources

◆ fSourceTab

TGTab* TChannelTab::fSourceTab {nullptr}
private