GRSISort
Created by P.C. Bender
Developement Team: P.C. Bender, R. Dunlop, V. Bildstein
An extension of the ROOT analysis Framework
TChannelTab Class Reference

Definition at line 43 of file TSourceCalibration.h.

Public Member Functions

 TChannelTab (TGTab *parent, TH1 *projection, TGCompositeFrame *frame, const double &sigma, const double &threshold, const int &degree, const std::vector< std::tuple< double, double, double, double > > &sourceEnergy)
 
 TChannelTab (const TChannelTab &rhs)
 
 ~TChannelTab ()
 
void Add (std::map< std::tuple< double, double, double, double >, std::tuple< double, double, double, double > > map)
 
void Calibrate (const int &degree, const bool &force=false)
 
void CalibrationStatus (Int_t event, Int_t px, Int_t py, TObject *selected)
 
TGraphErrors * Data ()
 
void Disconnect ()
 
TGraphErrors * Efficiency ()
 
void FindPeaks (const double &sigma, const double &threshold, const std::vector< std::tuple< double, double, double, double > > &sourceEnergy, const bool &force=false, const bool &fast=true)
 
void MakeConnections ()
 
void ProjectionStatus (Int_t event, Int_t px, Int_t py, TObject *selected)
 
void VerboseLevel (int val)
 

Private Member Functions

void BuildInterface ()
 

Private Attributes

TRootEmbeddedCanvas * fCalibrationCanvas {nullptr}
 
TGraphErrors * fData {nullptr}
 
int fDegree {1}
 
TGraphErrors * fEfficiency {nullptr}
 
TGCompositeFrame * fFrame {nullptr}
 
TGVerticalFrame * fLeftFrame {nullptr}
 
TGTab * fParent {nullptr}
 
std::vector< GPeak * > fPeaks
 
TH1 * fProjection {nullptr}
 
TRootEmbeddedCanvas * fProjectionCanvas {nullptr}
 
TGVerticalFrame * fRightFrame {nullptr}
 
double fSigma {2.}
 
TGStatusBar * fStatusBar {nullptr}
 
double fThreshold {0.05}
 
TGHorizontalFrame * fTopFrame {nullptr}
 
int fVerboseLevel {0}
 

#include <TSourceCalibration.h>

+ Collaboration diagram for TChannelTab:

Constructor & Destructor Documentation

◆ TChannelTab() [1/2]

TChannelTab::TChannelTab ( TGTab *  parent,
TH1 *  projection,
TGCompositeFrame *  frame,
const double &  sigma,
const double &  threshold,
const int &  degree,
const std::vector< std::tuple< double, double, double, double > > &  sourceEnergy 
)

Definition at line 270 of file TSourceCalibration.cxx.

References BuildInterface(), Calibrate(), and FindPeaks().

◆ TChannelTab() [2/2]

◆ ~TChannelTab()

TChannelTab::~TChannelTab ( )

Definition at line 299 of file TSourceCalibration.cxx.

References fCalibrationCanvas, fPeaks, fProjectionCanvas, and fTopFrame.

Member Function Documentation

◆ Add()

void TChannelTab::Add ( std::map< std::tuple< double, double, double, double >, std::tuple< double, double, double, double > >  map)

Definition at line 467 of file TSourceCalibration.cxx.

References fData, fEfficiency, fProjection, fSigma, and fVerboseLevel.

Referenced by FindPeaks().

◆ BuildInterface()

void TChannelTab::BuildInterface ( )
private

Definition at line 310 of file TSourceCalibration.cxx.

References fCalibrationCanvas, fFrame, fProjectionCanvas, fStatusBar, and fTopFrame.

Referenced by TChannelTab().

◆ Calibrate()

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

Definition at line 391 of file TSourceCalibration.cxx.

References fCalibrationCanvas, fData, fDegree, fStatusBar, fVerboseLevel, and Polynomial().

Referenced by TChannelTab().

◆ CalibrationStatus()

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

Definition at line 383 of file TSourceCalibration.cxx.

References fStatusBar, and fVerboseLevel.

◆ Data()

TGraphErrors* TChannelTab::Data ( )
inline

Definition at line 59 of file TSourceCalibration.h.

References fData.

◆ Disconnect()

void TChannelTab::Disconnect ( )

Definition at line 335 of file TSourceCalibration.cxx.

References fCalibrationCanvas, and fProjectionCanvas.

◆ Efficiency()

TGraphErrors* TChannelTab::Efficiency ( )
inline

Definition at line 60 of file TSourceCalibration.h.

References fEfficiency.

◆ FindPeaks()

void TChannelTab::FindPeaks ( const double &  sigma,
const double &  threshold,
const std::vector< std::tuple< double, double, double, double > > &  sourceEnergy,
const bool &  force = false,
const bool &  fast = true 
)

This functions finds the peaks in the histogram, fits them, and adds the fits to the list of peaks. This list is then used to find all peaks that lie on a straight line.

Definition at line 414 of file TSourceCalibration.cxx.

References Add(), GPeak::Area(), GPeak::Centroid(), fData, fPeaks, fProjection, fProjectionCanvas, fSigma, fThreshold, fVerboseLevel, Match(), PhotoPeakFit(), and SmartMatch().

Referenced by TChannelTab().

◆ MakeConnections()

void TChannelTab::MakeConnections ( )

Definition at line 329 of file TSourceCalibration.cxx.

References fCalibrationCanvas, and fProjectionCanvas.

◆ ProjectionStatus()

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

◆ VerboseLevel()

void TChannelTab::VerboseLevel ( int  val)
inline

Definition at line 62 of file TSourceCalibration.h.

References fVerboseLevel.

Member Data Documentation

◆ fCalibrationCanvas

TRootEmbeddedCanvas* TChannelTab::fCalibrationCanvas {nullptr}
private

◆ fData

TGraphErrors* TChannelTab::fData {nullptr}
private

Definition at line 81 of file TSourceCalibration.h.

Referenced by Add(), Calibrate(), Data(), FindPeaks(), and TChannelTab().

◆ fDegree

int TChannelTab::fDegree {1}
private

Definition at line 85 of file TSourceCalibration.h.

Referenced by Calibrate(), and TChannelTab().

◆ fEfficiency

TGraphErrors* TChannelTab::fEfficiency {nullptr}
private

Definition at line 82 of file TSourceCalibration.h.

Referenced by Add(), Efficiency(), and TChannelTab().

◆ fFrame

TGCompositeFrame* TChannelTab::fFrame {nullptr}
private

Definition at line 71 of file TSourceCalibration.h.

Referenced by BuildInterface(), and TChannelTab().

◆ fLeftFrame

TGVerticalFrame* TChannelTab::fLeftFrame {nullptr}
private

Definition at line 73 of file TSourceCalibration.h.

Referenced by TChannelTab().

◆ fParent

TGTab* TChannelTab::fParent {nullptr}
private

Definition at line 68 of file TSourceCalibration.h.

Referenced by TChannelTab().

◆ fPeaks

std::vector<GPeak*> TChannelTab::fPeaks
private

Definition at line 86 of file TSourceCalibration.h.

Referenced by FindPeaks(), ProjectionStatus(), TChannelTab(), and ~TChannelTab().

◆ fProjection

TH1* TChannelTab::fProjection {nullptr}
private

Definition at line 80 of file TSourceCalibration.h.

Referenced by Add(), FindPeaks(), ProjectionStatus(), and TChannelTab().

◆ fProjectionCanvas

TRootEmbeddedCanvas* TChannelTab::fProjectionCanvas {nullptr}
private

◆ fRightFrame

TGVerticalFrame* TChannelTab::fRightFrame {nullptr}
private

Definition at line 74 of file TSourceCalibration.h.

Referenced by TChannelTab().

◆ fSigma

double TChannelTab::fSigma {2.}
private

Definition at line 83 of file TSourceCalibration.h.

Referenced by Add(), FindPeaks(), ProjectionStatus(), and TChannelTab().

◆ fStatusBar

TGStatusBar* TChannelTab::fStatusBar {nullptr}
private

◆ fThreshold

double TChannelTab::fThreshold {0.05}
private

Definition at line 84 of file TSourceCalibration.h.

Referenced by FindPeaks(), and TChannelTab().

◆ fTopFrame

TGHorizontalFrame* TChannelTab::fTopFrame {nullptr}
private

Definition at line 72 of file TSourceCalibration.h.

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

◆ fVerboseLevel

int TChannelTab::fVerboseLevel {0}
private

Changes verbosity from 0 (quiet) to 4 (very verbose)

Definition at line 87 of file TSourceCalibration.h.

Referenced by Add(), Calibrate(), CalibrationStatus(), FindPeaks(), ProjectionStatus(), TChannelTab(), and VerboseLevel().