![]() |
GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
|
![]() |
Definition at line 49 of file TCalibrationGraph.h.
Public Member Functions | |
TCalibrationGraphSet (const TCalibrationGraphSet &)=delete | |
TCalibrationGraphSet (std::string xAxisLabel, std::string yAxisLabel) | |
TCalibrationGraphSet (TCalibrationGraphSet &&) noexcept=delete | |
TCalibrationGraphSet (TGraphErrors *graph=nullptr, const std::string &label="") | |
~TCalibrationGraphSet () | |
int | Add (TGraphErrors *, const std::string &label) |
void | Clear (Option_t *option="") override |
void | DrawCalibration (Option_t *opt="", TLegend *legend=nullptr) |
void | DrawResidual (Option_t *opt="", TLegend *legend=nullptr) |
void | Fit (TF1 *function, Option_t *opt="") |
TF1 * | FitFunction () |
double * | GetEX () |
double * | GetEY () |
double | GetMaximumX () const |
double | GetMaximumY () const |
double | GetMinimumX () const |
double | GetMinimumY () const |
int | GetN () |
double * | GetX () |
double * | GetY () |
TCalibrationGraph * | Graph (size_t index) |
size_t | NumberOfGraphs () |
TCalibrationGraphSet & | operator= (const TCalibrationGraphSet &rhs) |
TCalibrationGraphSet & | operator= (TCalibrationGraphSet &&) noexcept=delete |
void | Print (Option_t *opt="") const override |
void | RemoveGraph (int64_t index) |
Int_t | RemovePoint (const Int_t &px, const Int_t &py) |
Int_t | RemoveResidualPoint (const Int_t &px, const Int_t &py) |
void | ResetTotalGraph () |
TCalibrationGraph * | Residual (size_t index) |
void | Scale (bool useAllPrevious=true) |
void | SetAxisTitle (const char *title) |
void | SetColor (int index, Color_t color) |
void | SetColorStyle (int index, int val) |
void | SetLineColor (int index, Color_t color) |
void | SetMarkerColor (int index, Color_t color) |
void | SetMarkerStyle (int index, Style_t style) |
bool | SetResidual (const bool &force=false) |
TGraphErrors * | TotalGraph () |
std::string | XAxisLabel () |
void | XAxisLabel (const std::string &xAxisLabel) |
std::string | YAxisLabel () |
void | YAxisLabel (const std::string &yAxisLabel) |
Static Public Member Functions | |
static EVerbosity | VerboseLevel () |
static void | VerboseLevel (EVerbosity val) |
Private Attributes | |
std::vector< size_t > | fGraphIndex |
std::vector< TCalibrationGraph > | fGraphs |
std::vector< std::string > | fLabel |
double | fMaximumX {0.} |
double | fMaximumY {0.} |
double | fMinimumX {0.} |
double | fMinimumY {0.} |
std::vector< size_t > | fPointIndex |
std::vector< TCalibrationGraph > | fResidualGraphs |
bool | fResidualSet {false} |
TGraphErrors * | fTotalGraph {nullptr} |
TGraphErrors * | fTotalResidualGraph {nullptr} |
std::string | fXAxisLabel |
std::string | fYAxisLabel |
Static Private Attributes | |
static EVerbosity | fVerboseLevel = EVerbosity::kQuiet |
|
explicit |
Definition at line 37 of file TCalibrationGraph.cxx.
References Add(), fTotalGraph, fVerboseLevel, kBasicFlow, and Print().
TCalibrationGraphSet::TCalibrationGraphSet | ( | std::string | xAxisLabel, |
std::string | yAxisLabel ) |
Definition at line 47 of file TCalibrationGraph.cxx.
References fTotalGraph, fVerboseLevel, and kBasicFlow.
TCalibrationGraphSet::~TCalibrationGraphSet | ( | ) |
Definition at line 53 of file TCalibrationGraph.cxx.
References fTotalGraph, and fTotalResidualGraph.
|
delete |
|
deletenoexcept |
int TCalibrationGraphSet::Add | ( | TGraphErrors * | graph, |
const std::string & | label ) |
Add new graph to set, using the label when creating legends during plotting.
Definition at line 59 of file TCalibrationGraph.cxx.
References fGraphIndex, fGraphs, fLabel, fMaximumX, fMaximumY, fMinimumX, fMinimumY, fPointIndex, fResidualGraphs, fResidualSet, fTotalGraph, fTotalResidualGraph, fVerboseLevel, kBasicFlow, kSubroutines, and Print().
Referenced by TCalibrationGraphSet(), TChannelTab::UpdateData(), and TChannelTab::UpdateFwhm().
|
override |
Definition at line 542 of file TCalibrationGraph.cxx.
References fGraphIndex, fGraphs, fLabel, fMaximumX, fMaximumY, fMinimumX, fMinimumY, fPointIndex, fResidualGraphs, and fResidualSet.
Referenced by TChannelTab::UpdateData(), and TChannelTab::UpdateFwhm().
void TCalibrationGraphSet::DrawCalibration | ( | Option_t * | opt = "", |
TLegend * | legend = nullptr ) |
Definition at line 190 of file TCalibrationGraph.cxx.
References fGraphs, fLabel, fTotalGraph, fVerboseLevel, fXAxisLabel, fYAxisLabel, and kBasicFlow.
Referenced by TChannelTab::Calibrate().
void TCalibrationGraphSet::DrawResidual | ( | Option_t * | opt = "", |
TLegend * | legend = nullptr ) |
Definition at line 218 of file TCalibrationGraph.cxx.
References fLabel, fResidualGraphs, fTotalResidualGraph, fVerboseLevel, hist, and kBasicFlow.
Referenced by TChannelTab::Calibrate().
|
inline |
Fits the provided function to the total graph.
Definition at line 127 of file TCalibrationGraph.h.
References fTotalGraph.
Referenced by TChannelTab::Calibrate().
|
inline |
Gets the calibration from the total graph (might be nullptr!).
Definition at line 128 of file TCalibrationGraph.h.
References fTotalGraph.
Referenced by SetResidual(), and TChannelTab::UpdateChannel().
|
inline |
Returns an array of x-errors of the total graph.
Definition at line 119 of file TCalibrationGraph.h.
References fTotalGraph.
|
inline |
Returns an array of y-errors of the total graph.
Definition at line 120 of file TCalibrationGraph.h.
References fTotalGraph.
|
inline |
Return maximum x-value.
Definition at line 123 of file TCalibrationGraph.h.
References fMaximumX.
Referenced by TChannelTab::Calibrate().
|
inline |
Return maximum y-value.
Definition at line 125 of file TCalibrationGraph.h.
References fMaximumY.
Referenced by TChannelTab::Calibrate().
|
inline |
Return minimum x-value.
Definition at line 122 of file TCalibrationGraph.h.
References fMinimumX.
Referenced by TChannelTab::Calibrate().
|
inline |
Return minimum y-value.
Definition at line 124 of file TCalibrationGraph.h.
References fMinimumY.
Referenced by TChannelTab::Calibrate().
|
inline |
Returns GetN(), i.e. number of points of the total graph.
Definition at line 116 of file TCalibrationGraph.h.
References fTotalGraph.
Referenced by TChannelTab::Calibrate(), SetResidual(), TChannelTab::UpdateChannel(), TChannelTab::UpdateData(), and TChannelTab::UpdateFwhm().
|
inline |
Returns an array of x-values of the total graph.
Definition at line 117 of file TCalibrationGraph.h.
References fTotalGraph.
Referenced by TChannelTab::UpdateChannel().
|
inline |
Returns an array of y-values of the total graph.
Definition at line 118 of file TCalibrationGraph.h.
References fTotalGraph.
Referenced by TChannelTab::UpdateChannel().
|
inline |
Definition at line 131 of file TCalibrationGraph.h.
References fGraphs.
|
inline |
Definition at line 130 of file TCalibrationGraph.h.
References fGraphs.
|
inline |
Assignment operator that takes care of properly cloning all the pointers to objects.
Definition at line 56 of file TCalibrationGraph.h.
References fGraphIndex, fGraphs, fLabel, fPointIndex, fResidualGraphs, fResidualSet, fTotalGraph, and fTotalResidualGraph.
|
deletenoexcept |
|
override |
Definition at line 493 of file TCalibrationGraph.cxx.
References fGraphIndex, fGraphs, fLabel, fPointIndex, fResidualGraphs, fTotalGraph, fTotalResidualGraph, fVerboseLevel, and kBasicFlow.
Referenced by TCalibrationGraphSet(), Add(), TChannelTab::Calibrate(), RemovePoint(), RemoveResidualPoint(), Scale(), SetResidual(), TChannelTab::UpdateData(), and TChannelTab::UpdateFwhm().
|
inline |
Definition at line 137 of file TCalibrationGraph.h.
References fGraphs, and ResetTotalGraph().
Int_t TCalibrationGraphSet::RemovePoint | ( | const Int_t & | px, |
const Int_t & | py ) |
This function is primarily a copy of TGraph::RemovePoint with some added bits to remove a point that has been selected in the calibration graph from it and the corresponding point from the residual graph and the total graphs
Definition at line 241 of file TCalibrationGraph.cxx.
References fGraphIndex, fGraphs, fPointIndex, fResidualGraphs, fResidualSet, fTotalGraph, fTotalResidualGraph, fVerboseLevel, kBasicFlow, kSubroutines, Print(), and RemovePoint().
Referenced by TCalibrationGraph::RemovePoint(), RemovePoint(), and RemoveResidualPoint().
Int_t TCalibrationGraphSet::RemoveResidualPoint | ( | const Int_t & | px, |
const Int_t & | py ) |
This function is primarily a copy of TGraph::RemovePoint with some added bits to remove a point that has been selected in the residual graph from it and the corresponding point from the calibration graph and the total graphs
Definition at line 322 of file TCalibrationGraph.cxx.
References fGraphIndex, fGraphs, fPointIndex, fResidualGraphs, fTotalGraph, fTotalResidualGraph, fVerboseLevel, kBasicFlow, kSubroutines, Print(), and RemovePoint().
Referenced by TCalibrationGraph::RemovePoint().
void TCalibrationGraphSet::ResetTotalGraph | ( | ) |
reset the total graph and add the individual ones again (used e.g. after scaling of individual graphs is done)
Definition at line 440 of file TCalibrationGraph.cxx.
References fGraphIndex, fGraphs, fMaximumX, fMaximumY, fMinimumX, fMinimumY, fPointIndex, fResidualSet, fTotalGraph, fTotalResidualGraph, fVerboseLevel, kBasicFlow, kLoops, and kSubroutines.
Referenced by RemoveGraph(), and Scale().
|
inline |
Definition at line 132 of file TCalibrationGraph.h.
References fResidualGraphs.
void TCalibrationGraphSet::Scale | ( | bool | useAllPrevious = true | ) |
Scale all graphs to fit each other (based on the first "previous" graph found or just the first graph). If no overlap is being found between the graph that is being scaled and the first graph (or all graphs before this one), the current graph isn't being scaled and we continue with the next graph.
Definition at line 387 of file TCalibrationGraph.cxx.
References fGraphs, fVerboseLevel, kBasicFlow, kLoops, kQuiet, kSubroutines, Print(), and ResetTotalGraph().
void TCalibrationGraphSet::SetAxisTitle | ( | const char * | title | ) |
Set axis title for the graph (form "x-axis title;y-axis title")
Definition at line 181 of file TCalibrationGraph.cxx.
References fTotalGraph.
|
inline |
Set the line and marker color of the graph and residuals at index
Definition at line 100 of file TCalibrationGraph.h.
References SetLineColor(), and SetMarkerColor().
|
inline |
Set the line and marker color and marker style of the graph and residuals at index
Definition at line 106 of file TCalibrationGraph.h.
References SetLineColor(), SetMarkerColor(), and SetMarkerStyle().
|
inline |
Set the line color of the graph and residuals at index
Definition at line 81 of file TCalibrationGraph.h.
References fGraphs, and fResidualGraphs.
Referenced by SetColor(), SetColorStyle(), TChannelTab::UpdateData(), and TChannelTab::UpdateFwhm().
|
inline |
Set the marker color of the graph and residuals at index
Definition at line 87 of file TCalibrationGraph.h.
References fGraphs, fResidualGraphs, fVerboseLevel, and kSubroutines.
Referenced by SetColor(), SetColorStyle(), TChannelTab::UpdateData(), and TChannelTab::UpdateFwhm().
|
inline |
Set the marker style of the graph and residuals at index
Definition at line 94 of file TCalibrationGraph.h.
References fGraphs, and fResidualGraphs.
Referenced by SetColorStyle().
bool TCalibrationGraphSet::SetResidual | ( | const bool & | force = false | ) |
Definition at line 138 of file TCalibrationGraph.cxx.
References fGraphs, FitFunction(), fResidualGraphs, fResidualSet, fTotalGraph, fTotalResidualGraph, fVerboseLevel, GetN(), kBasicFlow, kSubroutines, and Print().
Referenced by TChannelTab::Calibrate().
|
inline |
Definition at line 129 of file TCalibrationGraph.h.
References fTotalGraph.
Referenced by TChannelTab::UpdateChannel().
|
inlinestatic |
Definition at line 158 of file TCalibrationGraph.h.
References fVerboseLevel.
Referenced by TCalibrationGraph::RemovePoint().
|
inlinestatic |
Definition at line 157 of file TCalibrationGraph.h.
References fVerboseLevel.
|
inline |
Definition at line 148 of file TCalibrationGraph.h.
References fXAxisLabel.
|
inline |
Definition at line 145 of file TCalibrationGraph.h.
References fXAxisLabel.
|
inline |
Definition at line 149 of file TCalibrationGraph.h.
References fYAxisLabel.
|
inline |
Definition at line 146 of file TCalibrationGraph.h.
References fYAxisLabel.
|
private |
Index of the graph this point belongs to.
Definition at line 168 of file TCalibrationGraph.h.
Referenced by Add(), Clear(), operator=(), Print(), RemovePoint(), RemoveResidualPoint(), and ResetTotalGraph().
|
private |
These are the graphs used for plotting the calibration points per source.
Definition at line 163 of file TCalibrationGraph.h.
Referenced by Add(), Clear(), DrawCalibration(), Graph(), NumberOfGraphs(), operator=(), Print(), RemoveGraph(), RemovePoint(), RemoveResidualPoint(), ResetTotalGraph(), Scale(), SetLineColor(), SetMarkerColor(), SetMarkerStyle(), and SetResidual().
|
private |
The labels for the different graphs.
Definition at line 165 of file TCalibrationGraph.h.
Referenced by Add(), Clear(), DrawCalibration(), DrawResidual(), operator=(), and Print().
|
private |
Maximum x-value.
Definition at line 172 of file TCalibrationGraph.h.
Referenced by Add(), Clear(), GetMaximumX(), and ResetTotalGraph().
|
private |
Maximum y-value.
Definition at line 174 of file TCalibrationGraph.h.
Referenced by Add(), Clear(), GetMaximumY(), and ResetTotalGraph().
|
private |
Minimum x-value.
Definition at line 171 of file TCalibrationGraph.h.
Referenced by Add(), Clear(), GetMinimumX(), and ResetTotalGraph().
|
private |
Minimum y-value.
Definition at line 173 of file TCalibrationGraph.h.
Referenced by Add(), Clear(), GetMinimumY(), and ResetTotalGraph().
|
private |
Index of the point within the graph this point corresponds to.
Definition at line 169 of file TCalibrationGraph.h.
Referenced by Add(), Clear(), operator=(), Print(), RemovePoint(), RemoveResidualPoint(), and ResetTotalGraph().
|
private |
These are the graphs used for plotting the residuals per source.
Definition at line 164 of file TCalibrationGraph.h.
Referenced by Add(), Clear(), DrawResidual(), operator=(), Print(), RemovePoint(), RemoveResidualPoint(), Residual(), SetLineColor(), SetMarkerColor(), SetMarkerStyle(), and SetResidual().
|
private |
Flag to indicate if the residual has been set correctly.
Definition at line 170 of file TCalibrationGraph.h.
Referenced by Add(), Clear(), operator=(), RemovePoint(), ResetTotalGraph(), and SetResidual().
|
private |
The sum of the other graphs, used for fitting.
Definition at line 166 of file TCalibrationGraph.h.
Referenced by TCalibrationGraphSet(), TCalibrationGraphSet(), ~TCalibrationGraphSet(), Add(), DrawCalibration(), Fit(), FitFunction(), GetEX(), GetEY(), GetN(), GetX(), GetY(), operator=(), Print(), RemovePoint(), RemoveResidualPoint(), ResetTotalGraph(), SetAxisTitle(), SetResidual(), and TotalGraph().
|
private |
The sum of the residuals. Not really used apart from plotting (but overlayed with the individual graphs).
Definition at line 167 of file TCalibrationGraph.h.
Referenced by ~TCalibrationGraphSet(), Add(), DrawResidual(), operator=(), Print(), RemovePoint(), RemoveResidualPoint(), ResetTotalGraph(), and SetResidual().
|
staticprivate |
Changes verbosity.
Definition at line 178 of file TCalibrationGraph.h.
Referenced by TCalibrationGraphSet(), TCalibrationGraphSet(), Add(), DrawCalibration(), DrawResidual(), Print(), RemovePoint(), RemoveResidualPoint(), ResetTotalGraph(), Scale(), SetMarkerColor(), SetResidual(), VerboseLevel(), and VerboseLevel().
|
private |
The label of the x-axis.
Definition at line 175 of file TCalibrationGraph.h.
Referenced by DrawCalibration(), XAxisLabel(), and XAxisLabel().
|
private |
The label of the y-axis.
Definition at line 176 of file TCalibrationGraph.h.
Referenced by DrawCalibration(), YAxisLabel(), and YAxisLabel().