![]() |
GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
|
![]() |
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 |
TChannelTab & | operator= (const TChannelTab &)=default |
TChannelTab & | operator= (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) |
TSourceTab * | SelectedSourceTab () 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} |
TCalibrationGraphSet * | fData {nullptr} |
TCalibrationGraphSet * | fFwhm {nullptr} |
TRootEmbeddedCanvas * | fFwhmCanvas {nullptr} |
TGCompositeFrame * | fFwhmFrame {nullptr} |
TPaveText * | fInfoLabel {nullptr} |
TCalibrationGraphSet * | fInit {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} |
TSourceCalibration * | fSourceCalibration |
std::vector< std::vector< std::tuple< double, double, double, double > > > | fSourceEnergies |
std::vector< TSourceTab * > | fSources |
TGTab * | fSourceTab {nullptr} |
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 ) |
Definition at line 1346 of file TSourceCalibration.cxx.
References BuildInterface(), DYELLOW, fData, fName, kBasicFlow, and TSourceCalibration::VerboseLevel().
|
default |
|
defaultnoexcept |
TChannelTab::~TChannelTab | ( | ) |
Definition at line 1366 of file TSourceCalibration.cxx.
References fCalibrationCanvas, fCalibrationFrame, fCalibrationPad, fCanvasTab, fChannelFrame, fChannelStatusBar, fChi2Label, fData, fFwhm, fFwhmCanvas, fFwhmFrame, fLegend, fResidualPad, fSources, and fSourceTab.
|
inline |
Definition at line 157 of file TSourceCalibration.h.
References fActiveSourceTab.
|
private |
Definition at line 1388 of file TSourceCalibration.cxx.
References CreateSourceTab(), fCalibrationCanvas, fCalibrationFrame, fCalibrationPad, fCanvasTab, fChannelFrame, fChannelStatusBar, fFwhmCanvas, fFwhmFrame, fInitCanvas, fInitFrame, fLegend, fName, fNuclei, fResidualPad, fSources, fSourceTab, TSourceCalibration::PanelHeight(), TSourceCalibration::PanelWidth(), TSourceCalibration::StatusbarHeight(), UpdateData(), and UpdateFwhm().
Referenced by TChannelTab().
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().
void TChannelTab::Calibrate | ( | int | degree | ) |
This function fit's the final data of the given channel. It requires all other elements to have been created already.
Definition at line 1686 of file TSourceCalibration.cxx.
References TCalibrationGraphSet::DrawCalibration(), TCalibrationGraphSet::DrawResidual(), DYELLOW, fCalibrationCanvas, fCalibrationPad, fChannelStatusBar, fChi2Label, fData, fInfoLabel, TCalibrationGraphSet::Fit(), TCalibrationGraphSet::FitFunction(), fLegend, fResidualPad, TCalibrationGraphSet::GetMaximumX(), TCalibrationGraphSet::GetMaximumY(), TCalibrationGraphSet::GetMinimumX(), TCalibrationGraphSet::GetMinimumY(), TCalibrationGraphSet::GetN(), kBasicFlow, kSubroutines, Polynomial(), TCalibrationGraphSet::Print(), TCalibrationGraphSet::SetResidual(), TCalibrationGraphSet::TotalGraph(), and TSourceCalibration::VerboseLevel().
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.
|
private |
Definition at line 1468 of file TSourceCalibration.cxx.
References DYELLOW, fName, fNuclei, fProgressBar, fProjections, fSourceCalibration, fSourceEnergies, fSources, fSourceTab, kBasicFlow, and TSourceCalibration::VerboseLevel().
Referenced by BuildInterface().
|
inline |
Definition at line 154 of file TSourceCalibration.h.
References fSources.
Referenced by UpdateData().
void TChannelTab::Disconnect | ( | ) |
Definition at line 1519 of file TSourceCalibration.cxx.
References fCalibrationCanvas, fData, fSources, and fSourceTab.
void TChannelTab::Draw | ( | ) |
Definition at line 1958 of file TSourceCalibration.cxx.
References TCalibrationGraphSet::DrawCalibration(), fFwhm, fFwhmCanvas, fLegend, and fSources.
void TChannelTab::FindAllCalibratedPeaks | ( | ) |
Definition at line 1940 of file TSourceCalibration.cxx.
References DYELLOW, fData, TCalibrationGraphSet::FitFunction(), fSources, kSubroutines, UpdateData(), UpdateFwhm(), and TSourceCalibration::VerboseLevel().
void TChannelTab::FindCalibratedPeaks | ( | ) |
Definition at line 1923 of file TSourceCalibration.cxx.
References DYELLOW, fActiveSourceTab, fData, TCalibrationGraphSet::FitFunction(), fSources, fSourceTab, kSubroutines, UpdateData(), UpdateFwhm(), and TSourceCalibration::VerboseLevel().
void TChannelTab::Initialize | ( | const bool & | force | ) |
Definition at line 1867 of file TSourceCalibration.cxx.
References Calibrate(), TCalibrationGraphSet::DrawCalibration(), DYELLOW, fCalLabel, fData, fInit, fInitCanvas, TCalibrationGraphSet::FitFunction(), fLegend, fName, fProgressBar, fSources, TCalibrationGraphSet::GetMaximumX(), TCalibrationGraphSet::GetMaximumY(), TCalibrationGraphSet::GetMinimumX(), TCalibrationGraphSet::GetMinimumY(), kSubroutines, TCalibrationGraphSet::Print(), UpdateData(), and TSourceCalibration::VerboseLevel().
void TChannelTab::MakeConnections | ( | ) |
Definition at line 1499 of file TSourceCalibration.cxx.
References DRED, DYELLOW, fCalibrationCanvas, fData, fSources, fSourceTab, kBasicFlow, TCalibrationGraphSet::Print(), and TSourceCalibration::VerboseLevel().
|
inline |
Definition at line 156 of file TSourceCalibration.h.
References fName.
Referenced by PrintCanvases(), and RecursiveRemove().
|
inline |
Definition at line 155 of file TSourceCalibration.h.
References fSources.
|
default |
|
defaultnoexcept |
void TChannelTab::PrintCanvases | ( | ) | const |
Definition at line 2120 of file TSourceCalibration.cxx.
References fCalibrationCanvas, fFwhmCanvas, fSources, and Name().
void TChannelTab::PrintLayout | ( | ) | const |
Definition at line 2137 of file TSourceCalibration.cxx.
References fCalibrationCanvas, fChannelFrame, and fSources.
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().
void TChannelTab::RemovePoint | ( | Int_t | oldGraph, |
Int_t | oldPoint ) |
Definition at line 1567 of file TSourceCalibration.cxx.
References DCYAN, fSources, kBasicFlow, and TSourceCalibration::VerboseLevel().
void TChannelTab::SelectCanvas | ( | Event_t * | event | ) |
Definition at line 1554 of file TSourceCalibration.cxx.
References fCalibrationCanvas, kBasicFlow, and TSourceCalibration::VerboseLevel().
|
inline |
Definition at line 158 of file TSourceCalibration.h.
References fActiveSourceTab, and fSources.
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().
|
inline |
Definition at line 153 of file TSourceCalibration.h.
References fSourceTab.
void TChannelTab::UpdateChannel | ( | ) |
Definition at line 1827 of file TSourceCalibration.cxx.
References TChannel::AddEnergyNonlinearityPoint(), TChannel::DestroyEnergyNonlinearity(), DYELLOW, fData, TCalibrationGraphSet::FitFunction(), fName, fSourceCalibration, TChannel::GetChannel(), TChannel::GetEnergyNonlinearity(), TCalibrationGraphSet::GetN(), TCalibrationGraphSet::GetX(), TCalibrationGraphSet::GetY(), hex(), kBasicFlow, kLoops, kSubroutines, TChannel::SetENGCoefficients(), TCalibrationGraphSet::TotalGraph(), TSourceCalibration::VerboseLevel(), and TSourceCalibration::WriteNonlinearities().
void TChannelTab::UpdateData | ( | ) |
Copy data from all sources into one graph (which we use for the calib && source < fSources.size()ration).
Definition at line 1618 of file TSourceCalibration.cxx.
References TCalibrationGraphSet::Add(), TCalibrationGraphSet::Clear(), Data(), DYELLOW, fData, fName, fNuclei, fSources, TCalibrationGraphSet::GetN(), kBasicFlow, kSubroutines, TCalibrationGraphSet::Print(), TCalibrationGraphSet::SetLineColor(), TCalibrationGraphSet::SetMarkerColor(), and TSourceCalibration::VerboseLevel().
Referenced by BuildInterface(), FindAllCalibratedPeaks(), FindCalibratedPeaks(), Initialize(), TSourceTab::ProjectionStatus(), and RecursiveRemove().
void TChannelTab::UpdateFwhm | ( | ) |
Copy data from all sources into one graph (which we use for the calib && source < fSources.size()ration).
Definition at line 1649 of file TSourceCalibration.cxx.
References TCalibrationGraphSet::Add(), TCalibrationGraphSet::Clear(), DYELLOW, fFwhm, fName, fNuclei, fSources, TCalibrationGraphSet::GetN(), kBasicFlow, kSubroutines, TCalibrationGraphSet::Print(), TCalibrationGraphSet::SetLineColor(), TCalibrationGraphSet::SetMarkerColor(), and TSourceCalibration::VerboseLevel().
Referenced by BuildInterface(), FindAllCalibratedPeaks(), FindCalibratedPeaks(), TSourceTab::ProjectionStatus(), and RecursiveRemove().
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().
|
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().
|
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().
|
private |
id of the currently active source tab
Definition at line 204 of file TSourceCalibration.h.
Referenced by ActiveSourceTab(), FindCalibratedPeaks(), SelectedSourceTab(), and SelectedTab().
|
private |
Definition at line 181 of file TSourceCalibration.h.
Referenced by ~TChannelTab(), BuildInterface(), Calibrate(), CalibrationStatus(), Disconnect(), MakeConnections(), PrintCanvases(), PrintLayout(), and SelectCanvas().
|
private |
frame of tab with calibration
Definition at line 180 of file TSourceCalibration.h.
Referenced by ~TChannelTab(), and BuildInterface().
|
private |
Definition at line 183 of file TSourceCalibration.h.
Referenced by ~TChannelTab(), BuildInterface(), and Calibrate().
|
private |
Definition at line 187 of file TSourceCalibration.h.
Referenced by Initialize().
|
private |
tab for canvases (calibration with residuals, and FWHM)
Definition at line 179 of file TSourceCalibration.h.
Referenced by ~TChannelTab(), and BuildInterface().
|
private |
main frame of this tab
Definition at line 176 of file TSourceCalibration.h.
Referenced by ~TChannelTab(), BuildInterface(), and PrintLayout().
|
private |
Definition at line 184 of file TSourceCalibration.h.
Referenced by ~TChannelTab(), BuildInterface(), Calibrate(), and CalibrationStatus().
|
private |
Definition at line 186 of file TSourceCalibration.h.
Referenced by ~TChannelTab(), and Calibrate().
|
private |
combined data from all sources
Definition at line 201 of file TSourceCalibration.h.
Referenced by TChannelTab(), ~TChannelTab(), Calibrate(), Disconnect(), FindAllCalibratedPeaks(), FindCalibratedPeaks(), Initialize(), MakeConnections(), RecursiveRemove(), UpdateChannel(), UpdateData(), and Write().
|
private |
combined fwhm from all sources
Definition at line 202 of file TSourceCalibration.h.
Referenced by ~TChannelTab(), Draw(), UpdateFwhm(), and Write().
|
private |
Definition at line 190 of file TSourceCalibration.h.
Referenced by ~TChannelTab(), BuildInterface(), Draw(), and PrintCanvases().
|
private |
frame of tab with fwhm
Definition at line 189 of file TSourceCalibration.h.
Referenced by ~TChannelTab(), and BuildInterface().
|
private |
Definition at line 188 of file TSourceCalibration.h.
Referenced by Calibrate().
|
private |
combined initial data from all sources
Definition at line 203 of file TSourceCalibration.h.
Referenced by Initialize().
|
private |
Definition at line 192 of file TSourceCalibration.h.
Referenced by BuildInterface(), and Initialize().
|
private |
frame of tab with initial calibration
Definition at line 191 of file TSourceCalibration.h.
Referenced by BuildInterface().
|
private |
Definition at line 185 of file TSourceCalibration.h.
Referenced by ~TChannelTab(), BuildInterface(), Calibrate(), Draw(), and Initialize().
|
private |
name of this tab
Definition at line 199 of file TSourceCalibration.h.
Referenced by TChannelTab(), BuildInterface(), CreateSourceTab(), Initialize(), Name(), UpdateChannel(), UpdateData(), UpdateFwhm(), and Write().
|
private |
the source nucleus
Definition at line 197 of file TSourceCalibration.h.
Referenced by BuildInterface(), CreateSourceTab(), UpdateData(), and UpdateFwhm().
|
private |
Definition at line 193 of file TSourceCalibration.h.
Referenced by CreateSourceTab(), and Initialize().
|
private |
vector of all projections
Definition at line 198 of file TSourceCalibration.h.
Referenced by CreateSourceTab().
|
private |
Definition at line 182 of file TSourceCalibration.h.
Referenced by ~TChannelTab(), BuildInterface(), and Calibrate().
|
private |
the parent of this tab
Definition at line 196 of file TSourceCalibration.h.
Referenced by Calibrate(), CreateSourceTab(), and UpdateChannel().
|
private |
vector with source energies and uncertainties
Definition at line 200 of file TSourceCalibration.h.
Referenced by CreateSourceTab().
|
private |
tabs for all sources
Definition at line 178 of file TSourceCalibration.h.
Referenced by ~TChannelTab(), BuildInterface(), CreateSourceTab(), Data(), Disconnect(), Draw(), FindAllCalibratedPeaks(), FindCalibratedPeaks(), Initialize(), MakeConnections(), NumberOfSources(), PrintCanvases(), PrintLayout(), RemovePoint(), SelectedSourceTab(), SelectedTab(), UpdateData(), and UpdateFwhm().
|
private |
tab for sources
Definition at line 177 of file TSourceCalibration.h.
Referenced by ~TChannelTab(), BuildInterface(), CreateSourceTab(), Disconnect(), FindCalibratedPeaks(), MakeConnections(), and SourceTab().