![]() |
AliRoot Core
aab2016 (aab2016)
|
Summary of statistics functions. More...
Enumerations | |
enum | TStatType { kEntries, kSum, kMean, kRMS, kMedian, kLTM, kLTMRMS } |
enum | ENormType { kL1, kL2, kLp, kMax, kHamming, kNNormType } |
Functions | |
void | EvaluateUni (Int_t nvectors, Double_t *data, Double_t &mean, Double_t &sigma, Int_t hh) |
void | EvaluateUniExternal (Int_t nvectors, Double_t *data, Double_t &mean, Double_t &sigma, Int_t hh, Float_t externalfactor=1) |
Int_t | Freq (Int_t n, const Int_t *inlist, Int_t *outlist, Bool_t down) |
template<typename T > | |
void | TruncatedMean (const TH1 *his, TVectorT< T > *param, Float_t down=0, Float_t up=1.0, Bool_t verbose=kFALSE) |
void | MedianFilter (TH1 *his1D, Int_t nmedian) |
template<typename T > | |
Bool_t | LTMHisto (TH1 *his, TVectorT< T > ¶m, Float_t fraction=1) |
template<typename T > | |
Int_t * | LTMUnbinned (int np, const T *arr, TVectorT< T > ¶ms, Float_t keep=1.0) |
template<typename T > | |
void | Reorder (int np, T *arr, const int *idx) |
template<typename T > | |
void | LTM (TH1 *his, TVectorT< T > *param=0, Float_t fraction=1, Bool_t verbose=kFALSE) |
template<typename T > | |
Double_t | FitGaus (TH1 *his, TVectorT< T > *param=0, TMatrixT< T > *matrix=0, Float_t xmin=0, Float_t xmax=0, Bool_t verbose=kFALSE) |
template<typename T > | |
Double_t | FitGaus (Float_t *arr, Int_t nBins, Float_t xMin, Float_t xMax, TVectorT< T > *param=0, TMatrixT< T > *matrix=0, Bool_t verbose=kFALSE) |
Float_t | GetCOG (const Short_t *arr, Int_t nBins, Float_t xMin, Float_t xMax, Float_t *rms=0, Float_t *sum=0) |
TGraph2D * | MakeStat2D (TH3 *his, Int_t delta0, Int_t delta1, Int_t type) |
TGraphErrors * | MakeStat1D (TH2 *his, Int_t deltaBin, Double_t fraction, Int_t returnType, Int_t markerStyle, Int_t markerColor) |
Double_t | RobustBinMedian (TH1 *hist, Double_t fractionCut=1.) |
THashList * | AddMetadata (TTree *, const char *vartagName, const char *varTagValue) |
TNamed * | GetMetadata (TTree *tree, const char *vartagName, TString *prefix=0, Bool_t fullMatch=kFALSE) |
TGraph * | MakeGraphSparse (TTree *tree, const char *expr="Entry", const char *cut="1", Int_t mstyle=25, Int_t mcolor=1, Float_t msize=-1, Float_t offset=0.0) |
TGraphErrors * | MakeGraphErrors (TTree *tree, const char *expr="Entry", const char *cut="1", Int_t mstyle=25, Int_t mcolor=1, Float_t msize=-1, Float_t offset=0.0, Int_t entries=10000000, Int_t firstEntry=0) |
TMultiGraph * | MakeMultGraph (TTree *tree, const char *groupName, const char *expr, const char *cut, const char *markers, const char *colors, Bool_t drawSparse, Float_t msize, Float_t sigmaRange, TLegend *legend, Bool_t comp=kTRUE) |
void | RebinSparseGraph (TGraph *graph0, TGraph *graph1, Option_t *option="") |
void | RebinSparseMultiGraph (TMultiGraph *multiGraph, TGraph *graphRef) |
void | MakeMultiGraphSparse (TMultiGraph *multiGraph) |
TString * | FitPlane (TTree *tree, const char *drawCommand, const char *formula, const char *cuts, Double_t &chi2, Int_t &npoints, TVectorD &fitParam, TMatrixD &covMatrix, Float_t frac=-1, Int_t start=0, Int_t stop=10000000, Bool_t fix0=kFALSE) |
TString * | FitPlaneFixed (TTree *tree, const char *drawCommand, const char *formula, const char *cuts, Double_t &chi2, Int_t &npoints, TVectorD &fitParam, TMatrixD &covMatrix, Float_t frac=-1, Int_t start=0, Int_t stop=10000000) |
TString * | FitPlaneConstrain (TTree *tree, const char *drawCommand, const char *formula, const char *cuts, Double_t &chi2, Int_t &npoints, TVectorD &fitParam, TMatrixD &covMatrix, Float_t frac=-1, Int_t start=0, Int_t stop=10000000, Double_t constrain=-1) |
Int_t | GetFitIndex (const TString fString, const TString subString) |
TString | FilterFit (const TString &input, const TString filter, TVectorD &vec, TMatrixD &covar) |
void | Update1D (Double_t delta, Double_t sigma, Int_t s1, TMatrixD ¶m, TMatrixD &covar) |
void | Constrain1D (const TString &input, const TString filter, TVectorD ¶m, TMatrixD &covar, Double_t mean, Double_t sigma) |
TString | MakeFitString (const TString &input, const TVectorD ¶m, const TMatrixD &covar, Bool_t verbose=kFALSE) |
Int_t | MakeStatAlias (TTree *tree, const char *expr, const char *cut, const char *alias) |
void | MakeAnchorAlias (TTree *tree, TString &sTrendVars, Int_t doCheck, Int_t verbose) |
void | MakeCombinedAlias (TTree *tree, TString &sCombinedStatus, Bool_t doCheck, Int_t verbose) |
Int_t | SetStatusAlias (TTree *tree, const char *expr, const char *cut, const char *alias) |
TMultiGraph * | MakeStatusMultGr (TTree *tree, const char *expr, const char *cut, const char *alias, Int_t igr=0) |
void | AddStatusPad (TCanvas *c1, Float_t padratio, Float_t bottommargin) |
void | DrawMultiGraph (TMultiGraph *graph, Option_t *option) |
void | DrawStatusGraphs (TObjArray *oaMultGr) |
TTree * | WriteStatusToTree (TObject *oStatusGr) |
TMultiGraph * | MakeStatusLines (TTree *tree, const char *expr, const char *cut, const char *alias) |
void | MakeSummaryTree (TTree *treeIn, TTreeSRedirector *pcstream, TObjString &sumID, TCut &selection) |
Double_t | GetDefaultStat (TTree *tree, const char *var, const char *selection, TStatType statType) |
void | MakeDistortionMap (Int_t iter, THnBase *histo, TTreeSRedirector *pcstream, TMatrixD &projectionInfo, Int_t dumpHisto=100, Int_t verbose=kFALSE) |
void | MakeDistortionMapFast (THnBase *histo, TTreeSRedirector *pcstream, TMatrixD &projectionInfo, Int_t verbose=0, Double_t fractionCut=0.1, const char *estimators=0) |
void | CombineArray (TTree *tree, TVectorD &values) |
Double_t | GetDistance (const TVectorD &values, const ENormType normType, const Bool_t normaliseToEntries=kFALSE, const Double_t pvalue=1.) |
Double_t | GetDistance (const Int_t size, const Double_t *values, const ENormType normType, const Bool_t normaliseToEntries=kFALSE, const Double_t pvalue=1.) |
Double_t | GetDistance (TTree *tree, const char *var, const char *selection, const ENormType normType, const Bool_t normaliseToEntries=kFALSE, const Double_t pvalue=1.) |
TH1 * | DrawHistogram (TTree *tree, const char *drawCommand, const char *cuts="1", const char *hname="histo", const char *htitle="histo", Int_t nsigma=4, Float_t fraction=0.75, TObjArray *description=0) |
Int_t | AdaptHistoMetadata (TTree *tree, TH1 *histogram, TString option) |
void | TestGausFit (Int_t nhistos=5000) |
void | CheckTreeAliases (TTree *tree, Int_t ncheck) |
template<typename T > | |
void | GetMinMax (const T *arr, Long64_t n, double &minVal, double &maxVal) |
template<typename T > | |
void | GetMinMaxMean (const T *arr, Long64_t n, double &minVal, double &maxVal, double &meanVal) |
Summary of statistics functions.
Enumerator | |
---|---|
kL1 | |
kL2 | |
kLp | |
kMax | |
kHamming | |
kNNormType |
Definition at line 55 of file TStatToolkit.h.
Enumerator | |
---|---|
kEntries | |
kSum | |
kMean | |
kRMS | |
kMedian | |
kLTM | |
kLTMRMS |
Definition at line 54 of file TStatToolkit.h.
Int_t TStatToolkit::AdaptHistoMetadata | ( | TTree * | tree, |
TH1 * | histogram, | ||
TString | option | ||
) |
Adapt style for histogram created by TTree queries
tree | - input tree (owner of metadata) |
histogram | - pointer to histogram to AdaptStyle if NULL tree->GetHistogram used |
option | - draw option |
TODO - TEMPORARY -make z tilte vissible - using pallet size should be done using CSS
Definition at line 3109 of file TStatToolkit.cxx.
THashList * TStatToolkit::AddMetadata | ( | TTree * | tree, |
const char * | varTagName, | ||
const char * | varTagValue | ||
) |
AddMetadata to the input tree - see https://alice.its.cern.ch/jira/browse/ATO-290
tree | - input tree |
varTagName | - tag to register |
varTagValue | - value |
Definition at line 1081 of file TStatToolkit.cxx.
Referenced by addHtmlMetadata(), AliExternalInfo::BuildIndex(), logbookAddMetadata(), qaitsAddMetadata(), qatpcAddMetadata(), qatrdAddMetadata(), and AliTPCclusterFast::SetMetadata().
void TStatToolkit::AddStatusPad | ( | TCanvas * | c1, |
Float_t | padratio, | ||
Float_t | bottommargin | ||
) |
Definition at line 1905 of file TStatToolkit.cxx.
void TStatToolkit::CheckTreeAliases | ( | TTree * | tree, |
Int_t | ncheck | ||
) |
Definition at line 2317 of file TStatToolkit.cxx.
void TStatToolkit::CombineArray | ( | TTree * | tree, |
TVectorD & | values | ||
) |
Collect all variables from the last draw in one array.
It is assumed that the Draw function of the TTree was called before if e.g. Draw("v1:v2:v3") had been called, then values will contain the concatenated array of the values from v1,v2 and v3. E.g. if the v1[0..n], v2[0..n], v3[0..n] then values[0..3n] = [v1, v2, v3]
[in] | tree | input tree |
[out] | values | array in which to summarise all 'drawn' values |
Definition at line 2361 of file TStatToolkit.cxx.
Referenced by GetDistance().
void TStatToolkit::Constrain1D | ( | const TString & | input, |
const TString | filter, | ||
TVectorD & | param, | ||
TMatrixD & | covar, | ||
Double_t | mean, | ||
Double_t | sigma | ||
) |
Definition at line 944 of file TStatToolkit.cxx.
TH1 * TStatToolkit::DrawHistogram | ( | TTree * | tree, |
const char * | drawCommand, | ||
const char * | cuts = "1" , |
||
const char * | hname = "histo" , |
||
const char * | htitle = "histo" , |
||
Int_t | nsigma = 4 , |
||
Float_t | fraction = 0.75 , |
||
TObjArray * | description = 0 |
||
) |
Definition at line 2219 of file TStatToolkit.cxx.
void TStatToolkit::DrawMultiGraph | ( | TMultiGraph * | graph, |
Option_t * | option | ||
) |
Definition at line 1507 of file TStatToolkit.cxx.
Referenced by AliTreeTrending::AppendBand(), AliTreeTrending::AppendDefaultBands(), AliTreeTrending::MakePlot(), and AliTreeTrending::MakeStatusPlot().
void TStatToolkit::DrawStatusGraphs | ( | TObjArray * | oaMultGr | ) |
Definition at line 1936 of file TStatToolkit.cxx.
void TStatToolkit::EvaluateUni | ( | Int_t | nvectors, |
Double_t * | data, | ||
Double_t & | mean, | ||
Double_t & | sigma, | ||
Int_t | hh | ||
) |
Definition at line 38 of file TStatToolkit.cxx.
Referenced by AliTMinuitToolkit::Bootstrap(), DrawHistogram(), LTM(), MakeMultGraph(), MakeStatAlias(), MakeSummaryTree(), AliFFTsmoother::ReplaceOutlierFrequenciesMedian(), SetStatusAlias(), and TestLTM().
void TStatToolkit::EvaluateUniExternal | ( | Int_t | nvectors, |
Double_t * | data, | ||
Double_t & | mean, | ||
Double_t & | sigma, | ||
Int_t | hh, | ||
Float_t | externalfactor = 1 |
||
) |
Definition at line 94 of file TStatToolkit.cxx.
TString TStatToolkit::FilterFit | ( | const TString & | input, |
const TString | filter, | ||
TVectorD & | vec, | ||
TMatrixD & | covar | ||
) |
Definition at line 865 of file TStatToolkit.cxx.
Double_t TStatToolkit::FitGaus | ( | TH1 * | his, |
TVectorT< T > * | param = 0 , |
||
TMatrixT< T > * | matrix = 0 , |
||
Float_t | xmin = 0 , |
||
Float_t | xmax = 0 , |
||
Bool_t | verbose = kFALSE |
||
) |
Definition at line 345 of file TStatToolkit.h.
Referenced by TestGausFit().
Double_t TStatToolkit::FitGaus | ( | Float_t * | arr, |
Int_t | nBins, | ||
Float_t | xMin, | ||
Float_t | xMax, | ||
TVectorT< T > * | param = 0 , |
||
TMatrixT< T > * | matrix = 0 , |
||
Bool_t | verbose = kFALSE |
||
) |
Definition at line 486 of file TStatToolkit.h.
TString * TStatToolkit::FitPlane | ( | TTree * | tree, |
const char * | drawCommand, | ||
const char * | formula, | ||
const char * | cuts, | ||
Double_t & | chi2, | ||
Int_t & | npoints, | ||
TVectorD & | fitParam, | ||
TMatrixD & | covMatrix, | ||
Float_t | frac = -1 , |
||
Int_t | start = 0 , |
||
Int_t | stop = 10000000 , |
||
Bool_t | fix0 = kFALSE |
||
) |
Definition at line 526 of file TStatToolkit.cxx.
Referenced by FitAlignCombined0(), FitAlignCombinedCorr(), FitdY(), FitLookup(), FitRodShift(), FitTransferFunctionAll(), FitTransferFunctionTheta(), MakeFit(), MakeGlobalCorr(), MakeGlobalFit(), and MakeGlobalFitRelative().
TString * TStatToolkit::FitPlaneConstrain | ( | TTree * | tree, |
const char * | drawCommand, | ||
const char * | formula, | ||
const char * | cuts, | ||
Double_t & | chi2, | ||
Int_t & | npoints, | ||
TVectorD & | fitParam, | ||
TMatrixD & | covMatrix, | ||
Float_t | frac = -1 , |
||
Int_t | start = 0 , |
||
Int_t | stop = 10000000 , |
||
Double_t | constrain = -1 |
||
) |
Definition at line 628 of file TStatToolkit.cxx.
Referenced by DrawDriftCorel().
TString * TStatToolkit::FitPlaneFixed | ( | TTree * | tree, |
const char * | drawCommand, | ||
const char * | formula, | ||
const char * | cuts, | ||
Double_t & | chi2, | ||
Int_t & | npoints, | ||
TVectorD & | fitParam, | ||
TMatrixD & | covMatrix, | ||
Float_t | frac = -1 , |
||
Int_t | start = 0 , |
||
Int_t | stop = 10000000 |
||
) |
Definition at line 738 of file TStatToolkit.cxx.
Int_t TStatToolkit::Freq | ( | Int_t | n, |
const Int_t * | inlist, | ||
Int_t * | outlist, | ||
Bool_t | down | ||
) |
Definition at line 149 of file TStatToolkit.cxx.
Float_t TStatToolkit::GetCOG | ( | const Short_t * | arr, |
Int_t | nBins, | ||
Float_t | xMin, | ||
Float_t | xMax, | ||
Float_t * | rms = 0 , |
||
Float_t * | sum = 0 |
||
) |
Definition at line 221 of file TStatToolkit.cxx.
Double_t TStatToolkit::GetDefaultStat | ( | TTree * | tree, |
const char * | var, | ||
const char * | selection, | ||
TStatType | statType | ||
) |
Definition at line 2339 of file TStatToolkit.cxx.
Double_t TStatToolkit::GetDistance | ( | const TVectorD & | values, |
const ENormType | normType, | ||
const Bool_t | normaliseToEntries = kFALSE , |
||
const Double_t | pvalue = 1. |
||
) |
Calculate the distance of the elements in values using a certain norm
[in] | values | array with input values |
[in] | normType | normalisation to use |
[in] | normaliseToEntries | divide the norm by the number of eleements ('average norm') |
[in] | pvalue | the p value for the p-type norm, ignored for all other norms |
Definition at line 2394 of file TStatToolkit.cxx.
Referenced by GetDistance(), and TestNormTypes().
Double_t TStatToolkit::GetDistance | ( | const Int_t | size, |
const Double_t * | values, | ||
const ENormType | normType, | ||
const Bool_t | normaliseToEntries = kFALSE , |
||
const Double_t | pvalue = 1. |
||
) |
Calculate the distance of the elements in values using a certain norm
Definition at line 2446 of file TStatToolkit.cxx.
Double_t TStatToolkit::GetDistance | ( | TTree * | tree, |
const char * | var, | ||
const char * | selection, | ||
const ENormType | normType, | ||
const Bool_t | normaliseToEntries = kFALSE , |
||
const Double_t | pvalue = 1. |
||
) |
Calculate the distance of the values selecte in tree->Draw(var, selection)
If var contains more than one variable (separated by ':' as usual) the arrays are concatenated:
E.g. if var="v1:v2:v3", then the norm of the the concatenated array of the values from v1,v2 and v3 will be calculated:
This means if the internal tree arrays for each variable are v1[0..n], v2[0..n], v3[0..n] then the norm of vx[0..3n] = [v1, v2, v3] is calculated.
[in] | tree | input tree |
[in] | var | variable expression for the tree->Draw() |
[in] | selection | selection for the tree->Draw() |
[in] | normType | norm to use for calculating the point distances |
[in] | normaliseToEntries | divide the norm by the number of eleements ('average norm') |
[in] | pvalue | p-value for the p-norm (ignored for other norm types |
Definition at line 2457 of file TStatToolkit.cxx.
Int_t TStatToolkit::GetFitIndex | ( | const TString | fString, |
const TString | subString | ||
) |
Definition at line 841 of file TStatToolkit.cxx.
TNamed * TStatToolkit::GetMetadata | ( | TTree * | tree, |
const char * | varTagName, | ||
TString * | prefix = 0 , |
||
Bool_t | fullMatch = kFALSE |
||
) |
Get metadata description In case metadata contains friend part - friend path os returned as prefix Metadata are supposed to be added into tree using TStatToolkit::AddMetadata() function
tree | - input tree |
varTagName | - tag name |
prefix | - friend prefix in case metadata are in friend tree |
fullMatch | - request full match in varTagName (to enable different metadata for tree and friend tree) |
Definition at line 1109 of file TStatToolkit.cxx.
Referenced by AdaptHistoMetadata(), AddMetadata(), AliTreeTrending::DecomposeStatusAlias(), DrawHistogram(), AliTMinuitToolkit::GetFitFunctionAsAlias(), MakeGraphErrors(), MakeGraphSparse(), AliTreePlayer::MakeHistograms(), MakeMultGraph(), AliTreePlayer::selectTreeInfo(), and AliTreePlayer::selectWhatWhereOrderBy().
void TStatToolkit::GetMinMax | ( | const T * | arr, |
Long64_t | n, | ||
double & | minVal, | ||
double & | maxVal | ||
) |
Definition at line 164 of file TStatToolkit.h.
void TStatToolkit::GetMinMaxMean | ( | const T * | arr, |
Long64_t | n, | ||
double & | minVal, | ||
double & | maxVal, | ||
double & | meanVal | ||
) |
Definition at line 178 of file TStatToolkit.h.
Referenced by DrawHistogram().
void TStatToolkit::LTM | ( | TH1 * | his, |
TVectorT< T > * | param = 0 , |
||
Float_t | fraction = 1 , |
||
Bool_t | verbose = kFALSE |
||
) |
Definition at line 442 of file TStatToolkit.h.
Referenced by MakeStat2D(), and TestLTM().
Bool_t TStatToolkit::LTMHisto | ( | TH1 * | his, |
TVectorT< T > & | param, | ||
Float_t | fraction = 1 |
||
) |
Definition at line 226 of file TStatToolkit.h.
Referenced by MakeDistortionMapFast(), MakeStat1D(), and TestLTM().
Int_t * TStatToolkit::LTMUnbinned | ( | int | np, |
const T * | arr, | ||
TVectorT< T > & | params, | ||
Float_t | keep = 1.0 |
||
) |
Definition at line 626 of file TStatToolkit.h.
Referenced by AliTreePlayer::AddStatInfo().
void TStatToolkit::MakeAnchorAlias | ( | TTree * | tree, |
TString & | sTrendVars, | ||
Int_t | doCheck, | ||
Int_t | verbose | ||
) |
Build anchor aliases and check consistency of aliases strings Input:
tree | - input tree |
doCheck | - force check of the variables if valid formulas are used (slow down execution) |
verbose | - verbosity level |
sTrendVars | - semicolomn seprated list of tuples with 5 elements tuple: (variable, variableAnchor, deltaWarning,deltaError, PhysAcc) <variable>_AnchorWarning:= |variable-variableAnchor|>deltaWarning <variable>_AnchorError:= |variable-variableAnchor|>deltaError <variable>_AnchorPhysAcceptable:= |variable-variableAnchor|>PhysAcc Example configuration: |
Definition at line 1688 of file TStatToolkit.cxx.
void TStatToolkit::MakeCombinedAlias | ( | TTree * | tree, |
TString & | sCombinedStatus, | ||
Bool_t | doCheck, | ||
Int_t | verbose | ||
) |
============================================================== Build combined aliases as a logical OR of subexpressions and check consistency for combined status
tree | - input tree |
doCheck | - flag to check validity of aliases (time consuminng to evaluat formulas) |
verbose | - specify verbosity (verbode>0 recomended) |
sCombinedStatus | - coma separated list of expression
|
Definition at line 1762 of file TStatToolkit.cxx.
void TStatToolkit::MakeDistortionMap | ( | Int_t | iter, |
THnBase * | histo, | ||
TTreeSRedirector * | pcstream, | ||
TMatrixD & | projectionInfo, | ||
Int_t | dumpHisto = 100 , |
||
Int_t | verbose = kFALSE |
||
) |
Definition at line 2485 of file TStatToolkit.cxx.
void TStatToolkit::MakeDistortionMapFast | ( | THnBase * | histo, |
TTreeSRedirector * | pcstream, | ||
TMatrixD & | projectionInfo, | ||
Int_t | verbose = 0 , |
||
Double_t | fractionCut = 0.1 , |
||
const char * | estimators = 0 |
||
) |
Definition at line 2627 of file TStatToolkit.cxx.
TString TStatToolkit::MakeFitString | ( | const TString & | input, |
const TVectorD & | param, | ||
const TMatrixD & | covar, | ||
Bool_t | verbose = kFALSE |
||
) |
Definition at line 979 of file TStatToolkit.cxx.
TGraphErrors * TStatToolkit::MakeGraphErrors | ( | TTree * | tree, |
const char * | expr = "Entry" , |
||
const char * | cut = "1" , |
||
Int_t | mstyle = 25 , |
||
Int_t | mcolor = 1 , |
||
Float_t | msize = -1 , |
||
Float_t | offset = 0.0 , |
||
Int_t | entries = 10000000 , |
||
Int_t | firstEntry = 0 |
||
) |
Definition at line 997 of file TStatToolkit.cxx.
Referenced by FitTransferFunctionAll(), FitTransferFunctionTheta(), MakeMultGraph(), and Test1D().
TGraph * TStatToolkit::MakeGraphSparse | ( | TTree * | tree, |
const char * | expr = "Entry" , |
||
const char * | cut = "1" , |
||
Int_t | mstyle = 25 , |
||
Int_t | mcolor = 1 , |
||
Float_t | msize = -1 , |
||
Float_t | offset = 0.0 |
||
) |
Definition at line 1156 of file TStatToolkit.cxx.
Referenced by CheckHVCorrection(), DrawDriftCorel(), DrawDriftRun(), drawLogbook(), AliTreeTrending::InitSummaryTrending(), MakeMultGraph(), MakeStatusLines(), and MakeStatusMultGr().
TMultiGraph * TStatToolkit::MakeMultGraph | ( | TTree * | tree, |
const char * | groupName, | ||
const char * | expr, | ||
const char * | cut, | ||
const char * | styles, | ||
const char * | colors, | ||
Bool_t | drawSparse, | ||
Float_t | msize, | ||
Float_t | sigmaRange, | ||
TLegend * | legend, | ||
Bool_t | comp = kTRUE |
||
) |
Create MultiGraphs
tree | - tree containing data to be plot |
groupname | - name of the output graph |
expr | - string <variablearray>:<tagID>:<variablearrayError> <variablearray>="var0; ...; varN <variablearrayError>="err0; ...;errN" \param cut - string "selection", resp. cut array - <variablearray>="defaultCut;cut0;cut1;...; cutN" \param markers - "marker0:...; markerN" \param colors - "color0:...; colorN" |
drawSparse | - swith use sparse drawing |
comp | - swith: demanding that every variable in expr returned a plot OR accepting variables yielding no result Example usage legend=new TLegend(0.1,0.1,0.3,0.3,"T0 <Q> per sector"); legend->SetNColumns(2); TMultiGraph * mGraph=TStatToolkit::MakeMultGraph(tree, "T0 <Q>","amplPMT1;amplPMT2;amplPMT3;amplPMT4;amplPMT5;amplPMT6:tagID:0.02;0.02;0.02;0.02;0.02;0.02","","21;22;25;26;27;28","1;2;4;3;856;616",kTRUE,0.9,10, legend); mGraph->Draw(); legend->Draw(); |
Definition at line 1302 of file TStatToolkit.cxx.
Referenced by AliTreeTrending::AppendBand(), AliTreeTrending::AppendDefaultBands(), drawLogbookMultiCut(), drawLogbookMultiExpr(), and AliTreeTrending::MakePlot().
void TStatToolkit::MakeMultiGraphSparse | ( | TMultiGraph * | multiGraph | ) |
MakeMultiGraphSparse - transform TMultiGraph using sparse representation for X axis
multiGraph | Example case: Rebin run lists |
Input graph with run list for the logbook, QA.TPC and QA.EVS
Output multi graph
Definition at line 3066 of file TStatToolkit.cxx.
TGraphErrors * TStatToolkit::MakeStat1D | ( | TH2 * | his, |
Int_t | deltaBin, | ||
Double_t | fraction, | ||
Int_t | returnType, | ||
Int_t | markerStyle, | ||
Int_t | markerColor | ||
) |
Definition at line 395 of file TStatToolkit.cxx.
Referenced by AliTreePlayer::DrawHistograms(), Test1D(), and TestLTM().
TGraph2D * TStatToolkit::MakeStat2D | ( | TH3 * | his, |
Int_t | delta0, | ||
Int_t | delta1, | ||
Int_t | type | ||
) |
Definition at line 352 of file TStatToolkit.cxx.
Int_t TStatToolkit::MakeStatAlias | ( | TTree * | tree, |
const char * | expr, | ||
const char * | cut, | ||
const char * | alias | ||
) |
Definition at line 1537 of file TStatToolkit.cxx.
TMultiGraph * TStatToolkit::MakeStatusLines | ( | TTree * | tree, |
const char * | expr, | ||
const char * | cut, | ||
const char * | alias | ||
) |
Definition at line 2172 of file TStatToolkit.cxx.
TMultiGraph * TStatToolkit::MakeStatusMultGr | ( | TTree * | tree, |
const char * | expr, | ||
const char * | cut, | ||
const char * | alias, | ||
Int_t | igr = 0 |
||
) |
Compute a trending multigraph that shows for which runs a variable has outliers. format of expr : varname:xaxis (e.g. meanTPCncl:run, but 'varname' can be any string that you need for seach-and-replace) format of cut : char like in TCut format of alias: (1):(statisticOK):(varname_Warning):(varname_Out)[:(varname_PhysAcc):(varname_Extra)]
function MakeGraphSparse() is called for each alias argument, which will be used as tree expression. each alias argument is supposed to be a Boolean statement which can be evaluated as tree expression. the order of these criteria should be kept, as the marker styles and colors are chosen to be meaningful this way! 'statisticOK' could e.g. be an alias for '(meanTPCncl>0)'. if you dont need e.g. a 'warning' condition, then just replace it by (0). in the alias, 'varname' will be replaced by its content (e.g. varname_Out -> meanTPCncl_Out) note: the aliases 'varname_Out' etc have to be defined by function TStatToolkit::SetStatusAlias(...) counter igr is used to shift the multigraph in y when filling a TObjArray.
tree | - tree containing data to be plot |
expr | - string <variablearray>:<tagID>:<variablearrayError> <variablearray>="var0; ...; varN <variablearrayError>="err0; ...;errN" |
alias | - Boolean statement which can be evaluated as tree expression |
igr | - counter used to shift the multigraph in y when filling a TObjArray Example usage To create the Status Bar, the following is done in principle. ( example current usage in $ALICE_ROOT/PWGPP/TPC/macros/drawPerformanceTPCQAMatchTrends.C and ./qaConfig.C. ) TStatToolkit::SetStatusAlias(tree, "meanTPCncl", "", "varname_Out:(abs(varname-MeanEF)>6.*RMSEF):0.8"); TStatToolkit::SetStatusAlias(tree, "tpcItsMatchA", "", "varname_Out:(abs(varname-MeanEF)>6.*RMSEF):0.8"); TStatToolkit::SetStatusAlias(tree, "meanTPCncl", "", "varname_Warning:(abs(varname-MeanEF)>3.*RMSEF):0.8"); TStatToolkit::SetStatusAlias(tree, "tpcItsMatchA", "", "varname_Warning:(abs(varname-MeanEF)>3.*RMSEF):0.8"); oaMultGr->Add( TStatToolkit::MakeStatusMultGr(tree, "tpcItsMatchA:run", "", "(1):(meanTPCncl>0):(varname_Warning):(varname_Outlier):", igr) ); igr++; oaMultGr->Add( TStatToolkit::MakeStatusMultGr(tree, "meanTPCncl:run", "", "(1):(meanTPCncl>0):(varname_Warning):(varname_Outlier):", igr) ); igr++; TCanvas *c1 = new TCanvas("c1","c1"); TStatToolkit::AddStatusPad(c1, 0.30, 0.40); TStatToolkit::DrawStatusGraphs(oaMultGr); |
Definition at line 1856 of file TStatToolkit.cxx.
Referenced by AliTreeTrending::MakeMultiGraphStatus().
void TStatToolkit::MakeSummaryTree | ( | TTree * | treeIn, |
TTreeSRedirector * | pcstream, | ||
TObjString & | sumID, | ||
TCut & | selection | ||
) |
Definition at line 2109 of file TStatToolkit.cxx.
void TStatToolkit::MedianFilter | ( | TH1 * | his1D, |
Int_t | nmedian | ||
) |
Definition at line 196 of file TStatToolkit.cxx.
void TStatToolkit::RebinSparseGraph | ( | TGraph * | graph0, |
TGraph * | graph1, | ||
Option_t * | option = "" |
||
) |
Remap bin labels for sparse graphs
graph0 | - sparse graph to be rebinned |
graph1 | - graph with "template x axis" (default) |
option | - TODO - implement merge option as an option |
Definition at line 2988 of file TStatToolkit.cxx.
Referenced by RebinSparseMultiGraph().
void TStatToolkit::RebinSparseMultiGraph | ( | TMultiGraph * | multiGraph, |
TGraph * | graphRef | ||
) |
Rebin sparse MultiGraph to have the same granularity of x axis as in reference graphRef
multiGraph | - multiGraph to remap |
graphRef | - reference graph |
Used e.g to remap graphs in case of missing measurement in one of the sources
Definition at line 3031 of file TStatToolkit.cxx.
Referenced by AliTreeTrending::AppendBand(), AliTreeTrending::AppendDefaultBands(), AliTreeTrending::MakePlot(), and AliTreeTrending::MakeStatusPlot().
void TStatToolkit::Reorder | ( | int | np, |
T * | arr, | ||
const int * | idx | ||
) |
Definition at line 706 of file TStatToolkit.h.
Double_t TStatToolkit::RobustBinMedian | ( | TH1 * | hist, |
Double_t | fractionCut = 1. |
||
) |
Definition at line 497 of file TStatToolkit.cxx.
Referenced by MakeStat1D().
Int_t TStatToolkit::SetStatusAlias | ( | TTree * | tree, |
const char * | expr, | ||
const char * | cut, | ||
const char * | alias | ||
) |
Definition at line 1590 of file TStatToolkit.cxx.
void TStatToolkit::TestGausFit | ( | Int_t | nhistos = 5000 | ) |
Definition at line 269 of file TStatToolkit.cxx.
void TStatToolkit::TruncatedMean | ( | const TH1 * | his, |
TVectorT< T > * | param, | ||
Float_t | down = 0 , |
||
Float_t | up = 1.0 , |
||
Bool_t | verbose = kFALSE |
||
) |
Definition at line 195 of file TStatToolkit.h.
void TStatToolkit::Update1D | ( | Double_t | delta, |
Double_t | sigma, | ||
Int_t | s1, | ||
TMatrixD & | param, | ||
TMatrixD & | covar | ||
) |
Definition at line 891 of file TStatToolkit.cxx.
Referenced by Constrain1D().
TTree * TStatToolkit::WriteStatusToTree | ( | TObject * | oStatusGr | ) |
Definition at line 1965 of file TStatToolkit.cxx.