JG ROOT Tools libraries
version 5.0 - august 2014
|
Functions | |
TGraph * | RGraphDifference (int n, const Double_t *t1, const Double_t *t2) |
TGraph * | RGraphDifference (int n, const Double_t xmin, const Double_t xmax, const Double_t *t1, const Double_t *t2) |
TGraphErrors * | RCreateYmeanGraph (TH2 *hptr, const string &options) |
TGraphErrors * | RConcatGraph (TGraphErrors *gtot, const TGraphErrors *gnew) |
TGraphErrors * | RConcatGraph (TGraphErrors *gtot, const TGraph *gnew) |
TGraph * | RConcatGraph (TGraph *gtot, const TGraph *gnew) |
Int_t | RGetGraphSeries (const Int_t n, const Double_t *p, const Double_t *x, const Double_t *y, const Double_t *dx, const Double_t *dy, TGraphErrors *&tab_gr, Double_t *&tab_p, const Double_t eps) |
Int_t | RGetPolyLineSeries (const Int_t n, const Double_t *p, const Double_t *x, const Double_t *y, TPolyLine *&tab_l, Double_t *&tab_p, const Double_t eps) |
Int_t | RGetPolyLine3DSeries (const Int_t n, const Double_t *p, const Double_t *x, const Double_t *y, const Double_t *z, TPolyLine3D *&tab_l, Double_t *&tab_p, const Double_t eps) |
TGraph * | RGraphFromTree (TTree &tree, const string &varx, const string &vary, const string &selection) |
TGraphErrors * | RGraphFromTree (TTree &tree, const string &varx, const string &vary, const string &errx="", const string &erry="", const string &selection="") |
TGraphErrors ** | RGraphSerieFromTree (TTree &tree, const string &varc, u_int n, double ctab[], const string &varx, const string &vary, const string &errx, const string &erry, const string &selection, double prec) |
Source file for functions related to ROOT TGraph class.
TGraph* RGraphDifference | ( | int | n, |
const Double_t * | t1, | ||
const Double_t * | t2 | ||
) |
Create a graph from the difference between 2 arrays (with same size). The X coordinate for the graph is set as the point number.
n | arrays size |
t1 | first array |
t2 | second array |
References RGraphDifference().
Referenced by RGraphDifference().
TGraph* RGraphDifference | ( | int | n, |
const Double_t | xmin, | ||
const Double_t | xmax, | ||
const Double_t * | t1, | ||
const Double_t * | t2 | ||
) |
Create a graph from the difference between 2 arrays (with same size). The X coordinate for the graph is computed from xmin to xmax, with constant interval.
n | arrays size |
xmin | X coordimate of the first point |
xmax | X coordimate of the last point |
t1 | first array |
t2 | second array |
TGraphErrors* RCreateYmeanGraph | ( | TH2 * | hptr, |
const string & | options | ||
) |
Create a TGraphErrors (that must be deleted by the calling function) from a 2D histogram. For each X bin of the histogram, the function computes an average value (and an associated error) of the data along Y. By default, the errors for each point are taken as RMS/sqrt(N), except if the "RMS" option is set.
hptr | pointer to the 2D histogram |
options | the options may specify some limitations on 2D histogram data to be accepted for building the graph:
|
TGraphErrors* RConcatGraph | ( | TGraphErrors * | gtot, |
const TGraphErrors * | gnew | ||
) |
Add points from the graph
gnew to the graph gtot. This function is defined because the Merge() function from TGraphErrors class does not include the errors (ROOT 5.28).
gtot | graph that receives new points |
gnew | graph to be added |
TGraphErrors* RConcatGraph | ( | TGraphErrors * | gtot, |
const TGraph * | gnew | ||
) |
Add points from the graph
gnew to the graph gtot. This function is defined because the Merge() function from TGraphErrors class does not include the errors (ROOT 5.28).
gtot | graph that receives new points |
gnew | graph to be added |
TGraph* RConcatGraph | ( | TGraph * | gtot, |
const TGraph * | gnew | ||
) |
Add points from the graph
gnew to the graph gtot. This function is defined because the Merge() function from TGraphErrors class does not include the errors (ROOT 5.28).
gtot | graph that receives new points |
gnew | graph to be added |
Int_t RGetGraphSeries | ( | const Int_t | n, |
const Double_t * | p, | ||
const Double_t * | x, | ||
const Double_t * | y, | ||
const Double_t * | dx, | ||
const Double_t * | dy, | ||
TGraphErrors *& | tab_gr, | ||
Double_t *& | tab_p, | ||
const Double_t | eps | ||
) |
Pour des tableaux de données p, x, y, la fonction crée un tableau de graphes (x,y) pour chacune des valeurs de p. Les graphes sont de type TGraphErrors, et si les tableaux pour les erreurs sur x et/ou y sont NULL, les erreurs correspondantes sont mises à 0. La fonction retourne le nombre de graphes, qui correspond au nombre de valeurs différentes de p.
n | nombre de données dans les tableaux |
p | table des valeurs qui sont comparées |
x | table des abscisses des graphes |
y | table des ordonnées des graphes |
dx | table des erreurs en abscisses (NULL si ignorées) |
dy | table des erreurs en ordonnées (NULL si ignorées) |
tab_gr | table des graphes en retour |
tab_p | table des valeurs de p pour chaque graphe en retour |
eps | précision pour test d'égalité des valeurs de p |
Int_t RGetPolyLineSeries | ( | const Int_t | n, |
const Double_t * | p, | ||
const Double_t * | x, | ||
const Double_t * | y, | ||
TPolyLine *& | tab_l, | ||
Double_t *& | tab_p, | ||
const Double_t | eps | ||
) |
Pour des tableaux de données p, x, y, la fonction crée un tableau de lignes TPolyLine (x,y) pour chacune des valeurs de p. La fonction retourne le nombre de lignes, qui correspond au nombre de valeurs différentes de p.
n | nombre de données dans les tableaux |
p | table des valeurs qui sont comparées |
x | table des abscisses des points |
y | table des ordonnées des points |
tab_l | table des polylines en retour |
tab_p | table des valeurs de p pour chaque polyline en retour |
eps | précision pour test d'égalité des valeurs de p |
Int_t RGetPolyLine3DSeries | ( | const Int_t | n, |
const Double_t * | p, | ||
const Double_t * | x, | ||
const Double_t * | y, | ||
const Double_t * | z, | ||
TPolyLine3D *& | tab_l, | ||
Double_t *& | tab_p, | ||
const Double_t | eps | ||
) |
Pour des tableaux de données p, x, y, la fonction crée un tableau de lignes TPolyLine (x,y) pour chacune des valeurs de p. La fonction retourne le nombre de lignes, qui correspond au nombre de valeurs différentes de p.
n | nombre de données dans les tableaux |
p | table des valeurs qui sont comparées |
x | table des coordonnées X |
y | table des coordonnées Y |
z | table des coordonnées Z |
tab_l | table des polylines en retour |
tab_p | table des valeurs de p pour chaque polyline en retour |
eps | précision pour test d'égalité des valeurs de p |
TGraph* RGraphFromTree | ( | TTree & | tree, |
const string & | varx, | ||
const string & | vary, | ||
const string & | selection | ||
) |
Create a TGraph from a TTree, with selection conditions.
tree | source TTree |
varx | name of parameter for variable X of the graph |
vary | name of parameter for variable Y of the graph |
selection | conditions for events selection |
References RGetTreeFormula(), and RIsTreeFormula().
Referenced by RGraphSerieFromTree().
TGraphErrors* RGraphFromTree | ( | TTree & | tree, |
const string & | varx, | ||
const string & | vary, | ||
const string & | errx = "" , |
||
const string & | erry = "" , |
||
const string & | selection = "" |
||
) |
Create a TGraphErrors from a TTree, with selection conditions. The variables may be aliases of the tree.
tree | source TTree |
varx | name of parameter for variable X of the graph |
vary | name of parameter for variable Y of the graph |
errx | name of parameter for error X of the graph |
erry | name of parameter for error Y of the graph |
selection | conditions for events selection |
References RGetTreeFormula(), and RIsTreeFormula().
TGraphErrors** RGraphSerieFromTree | ( | TTree & | tree, |
const string & | varc, | ||
u_int | n, | ||
double | ctab[], | ||
const string & | varx, | ||
const string & | vary, | ||
const string & | errx, | ||
const string & | erry, | ||
const string & | selection, | ||
double | prec | ||
) |
Create a serie of TGraphErrors from a TTree, with selection conditions, creating one TGraph for each value of the selection variable. Each graph pointer and the array of pointers must be deleted by the calling program.
tree | source TTree |
varc | name of the selection variable for graphs |
n | number of values of the selection variable |
ctab | array of values of the selection variable |
varx | name of parameter for variable X of the graph |
varx | name of parameter for variable X of the graph |
vary | name of parameter for variable Y of the graph |
errx | name of parameter for error X of the graph |
erry | name of parameter for error Y of the graph |
selection | conditions for events selection |
prec | conditions relative precision for selected graphs variable |
References RGraphFromTree(), and RTreeSelectEq().