Definition at line 44 of file TCalibrationGraph.h.
Public Member Functions | |
TCalibrationGraphSet (TGraphErrors *graph=nullptr, const std::string &label="") | |
~TCalibrationGraphSet () | |
void | Add (TGraphErrors *, const std::string &label) |
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 () |
double | GetMaximumY () |
double | GetMinimumX () |
double | GetMinimumY () |
int | GetN () |
double * | GetX () |
double * | GetY () |
TCalibrationGraph * | Graph (size_t i) |
size_t | NumberOfGraphs () |
TCalibrationGraphSet & | operator= (const TCalibrationGraphSet &rhs) |
void | Print () |
Int_t | RemovePoint () |
Int_t | RemoveResidualPoint () |
void | ResetTotalGraph () |
TCalibrationGraph * | Residual (size_t i) |
void | Scale () |
void | SetLineColor (int index, int color) |
void | SetMarkerColor (int index, int color) |
bool | SetResidual (const bool &force=false) |
TGraphErrors * | TotalGraph () |
void | VerboseLevel (int 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} |
int | fVerboseLevel {0} |
#include <TCalibrationGraph.h>
TCalibrationGraphSet::TCalibrationGraphSet | ( | TGraphErrors * | graph = nullptr , |
const std::string & | label = "" |
||
) |
Definition at line 44 of file TCalibrationGraph.cxx.
References Add(), fTotalGraph, fTotalResidualGraph, fVerboseLevel, and Print().
TCalibrationGraphSet::~TCalibrationGraphSet | ( | ) |
Definition at line 54 of file TCalibrationGraph.cxx.
void TCalibrationGraphSet::Add | ( | TGraphErrors * | graph, |
const std::string & | label | ||
) |
Definition at line 58 of file TCalibrationGraph.cxx.
References fGraphIndex, fGraphs, fLabel, fMaximumX, fMaximumY, fMinimumX, fMinimumY, fPointIndex, fResidualGraphs, fResidualSet, fTotalGraph, fTotalResidualGraph, fVerboseLevel, and Print().
Referenced by TCalibrationGraphSet().
void TCalibrationGraphSet::DrawCalibration | ( | Option_t * | opt = "" , |
TLegend * | legend = nullptr |
||
) |
Definition at line 163 of file TCalibrationGraph.cxx.
References fGraphs, fLabel, fTotalGraph, and fVerboseLevel.
void TCalibrationGraphSet::DrawResidual | ( | Option_t * | opt = "" , |
TLegend * | legend = nullptr |
||
) |
Definition at line 178 of file TCalibrationGraph.cxx.
References fLabel, fResidualGraphs, fTotalResidualGraph, and fVerboseLevel.
|
inline |
Fits the provided function to the total graph.
Definition at line 66 of file TCalibrationGraph.h.
References fTotalGraph.
|
inline |
Gets the calibration from the total graph (might be nullptr!).
Definition at line 67 of file TCalibrationGraph.h.
References fTotalGraph.
Referenced by SetResidual().
|
inline |
Returns an array of x-errors of the total graph.
Definition at line 58 of file TCalibrationGraph.h.
References fTotalGraph.
|
inline |
Returns an array of y-errors of the total graph.
Definition at line 59 of file TCalibrationGraph.h.
References fTotalGraph.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Returns GetN(), i.e. number of points of the total graph.
Definition at line 55 of file TCalibrationGraph.h.
References fTotalGraph.
Referenced by Scale(), and SetResidual().
|
inline |
Returns an array of x-values of the total graph.
Definition at line 56 of file TCalibrationGraph.h.
References fTotalGraph.
|
inline |
Returns an array of y-values of the total graph.
Definition at line 57 of file TCalibrationGraph.h.
References fTotalGraph.
|
inline |
Definition at line 70 of file TCalibrationGraph.h.
References fGraphs.
|
inline |
Definition at line 69 of file TCalibrationGraph.h.
References fGraphs.
|
inline |
Assignment operator that takes care of properly cloning all the pointers to objects.
Definition at line 86 of file TCalibrationGraph.h.
References fGraphIndex, fGraphs, fLabel, fPointIndex, fResidualGraphs, fResidualSet, fTotalGraph, and fTotalResidualGraph.
void TCalibrationGraphSet::Print | ( | ) |
Definition at line 399 of file TCalibrationGraph.cxx.
References fGraphIndex, fGraphs, fLabel, fPointIndex, fResidualGraphs, fTotalGraph, and fTotalResidualGraph.
Referenced by Add(), RemovePoint(), RemoveResidualPoint(), Scale(), SetResidual(), and TCalibrationGraphSet().
Int_t TCalibrationGraphSet::RemovePoint | ( | ) |
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 193 of file TCalibrationGraph.cxx.
References fGraphIndex, fGraphs, fPointIndex, fResidualGraphs, fResidualSet, fTotalGraph, fTotalResidualGraph, fVerboseLevel, and Print().
Referenced by ClassImp().
Int_t TCalibrationGraphSet::RemoveResidualPoint | ( | ) |
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 251 of file TCalibrationGraph.cxx.
References fGraphIndex, fGraphs, fPointIndex, fResidualGraphs, fTotalResidualGraph, fVerboseLevel, and Print().
Referenced by ClassImp().
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 346 of file TCalibrationGraph.cxx.
References fGraphIndex, fGraphs, fMaximumX, fMaximumY, fMinimumX, fMinimumY, fPointIndex, fResidualSet, fTotalGraph, fTotalResidualGraph, and fVerboseLevel.
Referenced by Scale().
|
inline |
Definition at line 71 of file TCalibrationGraph.h.
References fResidualGraphs.
void TCalibrationGraphSet::Scale | ( | ) |
scale all graphs to fit each other (based on the first graph)
Definition at line 308 of file TCalibrationGraph.cxx.
References fGraphs, fVerboseLevel, GetN(), Print(), and ResetTotalGraph().
|
inline |
Set the line color of the graph and residuals at index.
Definition at line 52 of file TCalibrationGraph.h.
References fGraphs, and fResidualGraphs.
|
inline |
Set the marker color of the graph and residuals at index.
Definition at line 53 of file TCalibrationGraph.h.
References fGraphs, and fResidualGraphs.
bool TCalibrationGraphSet::SetResidual | ( | const bool & | force = false | ) |
Definition at line 122 of file TCalibrationGraph.cxx.
References fGraphs, FitFunction(), fResidualGraphs, fResidualSet, fTotalGraph, fTotalResidualGraph, fVerboseLevel, GetN(), and Print().
|
inline |
Definition at line 68 of file TCalibrationGraph.h.
References fTotalGraph.
|
inline |
Definition at line 106 of file TCalibrationGraph.h.
References fGraphs, fResidualGraphs, and fVerboseLevel.
|
private |
Index of the graph this point belongs to.
Definition at line 114 of file TCalibrationGraph.h.
Referenced by Add(), operator=(), Print(), RemovePoint(), RemoveResidualPoint(), and ResetTotalGraph().
|
private |
These are the graphs used for plotting the calibration points per source.
Definition at line 109 of file TCalibrationGraph.h.
Referenced by Add(), DrawCalibration(), Graph(), NumberOfGraphs(), operator=(), Print(), RemovePoint(), RemoveResidualPoint(), ResetTotalGraph(), Scale(), SetLineColor(), SetMarkerColor(), SetResidual(), and VerboseLevel().
|
private |
The labels for the different graphs.
Definition at line 111 of file TCalibrationGraph.h.
Referenced by Add(), DrawCalibration(), DrawResidual(), operator=(), and Print().
|
private |
Maximum x-value.
Definition at line 118 of file TCalibrationGraph.h.
Referenced by Add(), GetMaximumX(), and ResetTotalGraph().
|
private |
Maximum y-value.
Definition at line 120 of file TCalibrationGraph.h.
Referenced by Add(), GetMaximumY(), and ResetTotalGraph().
|
private |
Minimum x-value.
Definition at line 117 of file TCalibrationGraph.h.
Referenced by Add(), GetMinimumX(), and ResetTotalGraph().
|
private |
Minimum y-value.
Definition at line 119 of file TCalibrationGraph.h.
Referenced by Add(), GetMinimumY(), and ResetTotalGraph().
|
private |
Index of the point within the graph this point corresponds to.
Definition at line 115 of file TCalibrationGraph.h.
Referenced by Add(), operator=(), Print(), RemovePoint(), RemoveResidualPoint(), and ResetTotalGraph().
|
private |
These are the graphs used for plotting the residuals per source.
Definition at line 110 of file TCalibrationGraph.h.
Referenced by Add(), DrawResidual(), operator=(), Print(), RemovePoint(), RemoveResidualPoint(), Residual(), SetLineColor(), SetMarkerColor(), SetResidual(), and VerboseLevel().
|
private |
Flag to indicate if the residual has been set correctly.
Definition at line 116 of file TCalibrationGraph.h.
Referenced by Add(), operator=(), RemovePoint(), ResetTotalGraph(), and SetResidual().
|
private |
The sum of the other graphs, used for fitting.
Definition at line 112 of file TCalibrationGraph.h.
Referenced by Add(), DrawCalibration(), Fit(), FitFunction(), GetEX(), GetEY(), GetN(), GetX(), GetY(), operator=(), Print(), RemovePoint(), ResetTotalGraph(), SetResidual(), TCalibrationGraphSet(), and TotalGraph().
|
private |
The sum of the residuals. Not really used apart from plotting (but overlayed with the individual graphs).
Definition at line 113 of file TCalibrationGraph.h.
Referenced by Add(), DrawResidual(), operator=(), Print(), RemovePoint(), RemoveResidualPoint(), ResetTotalGraph(), SetResidual(), and TCalibrationGraphSet().
|
private |
Changes verbosity from 0 (quiet) to 4 (very verbose)
Definition at line 122 of file TCalibrationGraph.h.
Referenced by Add(), DrawCalibration(), DrawResidual(), RemovePoint(), RemoveResidualPoint(), ResetTotalGraph(), Scale(), SetResidual(), TCalibrationGraphSet(), and VerboseLevel().