![]() |
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 | Draw (Option_t *opt="") 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) |
void | RemovePoint (const int &point) |
Int_t | RemovePoint (const Int_t &px, const Int_t &py) |
Int_t | RemovePoint (TGraphErrors *graph, 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) |
void | Sort () |
TGraphErrors * | TotalGraph () |
TGraphErrors * | TotalResidualGraph () |
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 595 of file TCalibrationGraph.cxx.
References fGraphIndex, fGraphs, fLabel, fMaximumX, fMaximumY, fMinimumX, fMinimumY, fPointIndex, fResidualGraphs, fResidualSet, fTotalGraph, and fTotalResidualGraph.
Referenced by TChannelTab::UpdateData(), and TChannelTab::UpdateFwhm().
|
inlineoverride |
Definition at line 135 of file TCalibrationGraph.h.
References DrawCalibration().
void TCalibrationGraphSet::DrawCalibration | ( | Option_t * | opt = "", |
TLegend * | legend = nullptr ) |
Definition at line 203 of file TCalibrationGraph.cxx.
References fGraphs, fLabel, fTotalGraph, fVerboseLevel, fXAxisLabel, fYAxisLabel, and kBasicFlow.
Referenced by TChannelTab::Calibrate(), Draw(), TChannelTab::Draw(), and TChannelTab::Initialize().
void TCalibrationGraphSet::DrawResidual | ( | Option_t * | opt = "", |
TLegend * | legend = nullptr ) |
Definition at line 236 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 TChannelTab::Calibrate(), TChannelTab::FindAllCalibratedPeaks(), TChannelTab::FindCalibratedPeaks(), TChannelTab::Initialize(), 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(), and TChannelTab::Initialize().
|
inline |
Return maximum y-value.
Definition at line 125 of file TCalibrationGraph.h.
References fMaximumY.
Referenced by TChannelTab::Calibrate(), and TChannelTab::Initialize().
|
inline |
Return minimum x-value.
Definition at line 122 of file TCalibrationGraph.h.
References fMinimumX.
Referenced by TChannelTab::Calibrate(), and TChannelTab::Initialize().
|
inline |
Return minimum y-value.
Definition at line 124 of file TCalibrationGraph.h.
References fMinimumY.
Referenced by TChannelTab::Calibrate(), and TChannelTab::Initialize().
|
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 132 of file TCalibrationGraph.h.
References fGraphs.
|
inline |
Definition at line 131 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 546 of file TCalibrationGraph.cxx.
References fGraphIndex, fGraphs, fLabel, fPointIndex, fResidualGraphs, fTotalGraph, fTotalResidualGraph, fVerboseLevel, and kBasicFlow.
Referenced by TCalibrationGraphSet(), Add(), TChannelTab::Calibrate(), TChannelTab::Initialize(), TChannelTab::MakeConnections(), RemovePoint(), RemovePoint(), Scale(), SetResidual(), TChannelTab::UpdateData(), and TChannelTab::UpdateFwhm().
|
inline |
Definition at line 139 of file TCalibrationGraph.h.
References fGraphs, and ResetTotalGraph().
void TCalibrationGraphSet::RemovePoint | ( | const int & | point | ) |
This function removes the indicated point from the total graph.
Definition at line 375 of file TCalibrationGraph.cxx.
References fGraphIndex, fGraphs, fPointIndex, fResidualGraphs, fResidualSet, fTotalGraph, fTotalResidualGraph, fVerboseLevel, kBasicFlow, kSubroutines, Print(), and RemovePoint().
Int_t TCalibrationGraphSet::RemovePoint | ( | const Int_t & | px, |
const Int_t & | py ) |
This function calls RemovePoint on the total graph.
Definition at line 263 of file TCalibrationGraph.cxx.
References fTotalGraph, fVerboseLevel, kBasicFlow, and RemovePoint().
Referenced by TChannelTab::RecursiveRemove(), TCalibrationGraph::RemovePoint(), RemovePoint(), RemovePoint(), RemovePoint(), and RemoveResidualPoint().
Int_t TCalibrationGraphSet::RemovePoint | ( | TGraphErrors * | graph, |
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 285 of file TCalibrationGraph.cxx.
References fGraphIndex, fGraphs, fPointIndex, fResidualGraphs, fResidualSet, fTotalGraph, fTotalResidualGraph, fVerboseLevel, kBasicFlow, kSubroutines, Print(), and RemovePoint().
Int_t TCalibrationGraphSet::RemoveResidualPoint | ( | const Int_t & | px, |
const Int_t & | py ) |
This function calls RemovePoint on the total graph.
Definition at line 274 of file TCalibrationGraph.cxx.
References fTotalResidualGraph, fVerboseLevel, kBasicFlow, 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 493 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 133 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 440 of file TCalibrationGraph.cxx.
References fGraphs, fVerboseLevel, kBasicFlow, kLoops, kQuiet, kSubroutines, Print(), ResetTotalGraph(), and Sort().
void TCalibrationGraphSet::SetAxisTitle | ( | const char * | title | ) |
Set axis title for the graph (form "x-axis title;y-axis title")
Definition at line 194 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().
void TCalibrationGraphSet::Sort | ( | ) |
Definition at line 429 of file TCalibrationGraph.cxx.
References fGraphs, and fResidualGraphs.
Referenced by Scale().
|
inline |
Definition at line 129 of file TCalibrationGraph.h.
References fTotalGraph.
Referenced by TChannelTab::Calibrate(), TChannelTab::RecursiveRemove(), and TChannelTab::UpdateChannel().
|
inline |
Definition at line 130 of file TCalibrationGraph.h.
References fTotalResidualGraph.
Referenced by TChannelTab::RecursiveRemove().
|
inlinestatic |
Definition at line 165 of file TCalibrationGraph.h.
References fVerboseLevel.
Referenced by TCalibrationGraph::RemovePoint().
|
inlinestatic |
Definition at line 164 of file TCalibrationGraph.h.
References fVerboseLevel.
|
inline |
Definition at line 153 of file TCalibrationGraph.h.
References fXAxisLabel.
|
inline |
Definition at line 150 of file TCalibrationGraph.h.
References fXAxisLabel.
|
inline |
Definition at line 154 of file TCalibrationGraph.h.
References fYAxisLabel.
|
inline |
Definition at line 151 of file TCalibrationGraph.h.
References fYAxisLabel.
|
private |
Index of the graph this point belongs to.
Definition at line 175 of file TCalibrationGraph.h.
Referenced by Add(), Clear(), operator=(), Print(), RemovePoint(), RemovePoint(), and ResetTotalGraph().
|
private |
These are the graphs used for plotting the calibration points per source.
Definition at line 170 of file TCalibrationGraph.h.
Referenced by Add(), Clear(), DrawCalibration(), Graph(), NumberOfGraphs(), operator=(), Print(), RemoveGraph(), RemovePoint(), RemovePoint(), ResetTotalGraph(), Scale(), SetLineColor(), SetMarkerColor(), SetMarkerStyle(), SetResidual(), and Sort().
|
private |
The labels for the different graphs.
Definition at line 172 of file TCalibrationGraph.h.
Referenced by Add(), Clear(), DrawCalibration(), DrawResidual(), operator=(), and Print().
|
private |
Maximum x-value.
Definition at line 179 of file TCalibrationGraph.h.
Referenced by Add(), Clear(), GetMaximumX(), and ResetTotalGraph().
|
private |
Maximum y-value.
Definition at line 181 of file TCalibrationGraph.h.
Referenced by Add(), Clear(), GetMaximumY(), and ResetTotalGraph().
|
private |
Minimum x-value.
Definition at line 178 of file TCalibrationGraph.h.
Referenced by Add(), Clear(), GetMinimumX(), and ResetTotalGraph().
|
private |
Minimum y-value.
Definition at line 180 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 176 of file TCalibrationGraph.h.
Referenced by Add(), Clear(), operator=(), Print(), RemovePoint(), RemovePoint(), and ResetTotalGraph().
|
private |
These are the graphs used for plotting the residuals per source.
Definition at line 171 of file TCalibrationGraph.h.
Referenced by Add(), Clear(), DrawResidual(), operator=(), Print(), RemovePoint(), RemovePoint(), Residual(), SetLineColor(), SetMarkerColor(), SetMarkerStyle(), SetResidual(), and Sort().
|
private |
Flag to indicate if the residual has been set correctly.
Definition at line 177 of file TCalibrationGraph.h.
Referenced by Add(), Clear(), operator=(), RemovePoint(), RemovePoint(), ResetTotalGraph(), and SetResidual().
|
private |
The sum of the other graphs, used for fitting.
Definition at line 173 of file TCalibrationGraph.h.
Referenced by TCalibrationGraphSet(), TCalibrationGraphSet(), ~TCalibrationGraphSet(), Add(), Clear(), DrawCalibration(), Fit(), FitFunction(), GetEX(), GetEY(), GetN(), GetX(), GetY(), operator=(), Print(), RemovePoint(), RemovePoint(), RemovePoint(), 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 174 of file TCalibrationGraph.h.
Referenced by ~TCalibrationGraphSet(), Add(), Clear(), DrawResidual(), operator=(), Print(), RemovePoint(), RemovePoint(), RemoveResidualPoint(), ResetTotalGraph(), SetResidual(), and TotalResidualGraph().
|
staticprivate |
Changes verbosity.
Definition at line 185 of file TCalibrationGraph.h.
Referenced by TCalibrationGraphSet(), TCalibrationGraphSet(), Add(), DrawCalibration(), DrawResidual(), Print(), RemovePoint(), RemovePoint(), RemovePoint(), RemoveResidualPoint(), ResetTotalGraph(), Scale(), SetMarkerColor(), SetResidual(), VerboseLevel(), and VerboseLevel().
|
private |
The label of the x-axis.
Definition at line 182 of file TCalibrationGraph.h.
Referenced by DrawCalibration(), XAxisLabel(), and XAxisLabel().
|
private |
The label of the y-axis.
Definition at line 183 of file TCalibrationGraph.h.
Referenced by DrawCalibration(), YAxisLabel(), and YAxisLabel().