class TH1F;
class TH1;
+class TH2;
class TH3;
class TString;
class TTree;
class TGraph;
class TGraph2D;
-
+class TCanvas;
+class TMultiGraph;
+class TGraphErrors;
+
class TStatToolkit : public TObject
{
public:
// HISTOGRAMS TOOLS
//
static void TruncatedMean(const TH1 * his, TVectorD *param, Float_t down=0, Float_t up=1.0, Bool_t verbose=kFALSE);
- static void LTM(TH1F * his, TVectorD *param=0 , Float_t fraction=1, Bool_t verbose=kFALSE);
+ static void MedianFilter(TH1 * his1D, Int_t nmedian);
+ static Bool_t LTMHisto(TH1 * his, TVectorD ¶m , Float_t fraction=1);
+ //
+ static void LTM(TH1 * his, TVectorD *param=0 , Float_t fraction=1, Bool_t verbose=kFALSE);
static Double_t FitGaus(TH1* his, TVectorD *param=0, TMatrixD *matrix=0, Float_t xmin=0, Float_t xmax=0, Bool_t verbose=kFALSE);
static Double_t FitGaus(Float_t *arr, Int_t nBins, Float_t xMin, Float_t xMax, TVectorD *param=0, TMatrixD *matrix=0, Bool_t verbose=kFALSE);
static Float_t GetCOG(const Short_t *arr, Int_t nBins, Float_t xMin, Float_t xMax, Float_t *rms=0, Float_t *sum=0);
static TGraph2D * MakeStat2D(TH3 * his, Int_t delta0, Int_t delta1, Int_t type);
- static TGraph * MakeStat1D(TH3 * his, Int_t delta1, Int_t type);
+ static TGraphErrors * MakeStat1D(TH2 * his, Int_t deltaBin, Double_t fraction, Int_t returnType, Int_t markerStyle, Int_t markerColor);
//
// Graph tools
//
- static TGraph * MakeGraphSparse(TTree * tree, const char * expr="Entry", const char * cut="1", Int_t mstyle=25, Int_t mcolor=1, Float_t msize=-1);
+ static 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);
+ static 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);
+
//
// Fitting function
//
static void Update1D(Double_t delta, Double_t sigma, Int_t s1, TMatrixD ¶m, TMatrixD &covar);
static void Constrain1D(const TString &input, const TString filter, TVectorD ¶m, TMatrixD & covar, Double_t mean, Double_t sigma);
static TString MakeFitString(const TString &input, const TVectorD ¶m, const TMatrixD & covar, Bool_t verbose=kFALSE);
-
+ //
+ // TTree function for the trneding
+ //
+ static Int_t MakeStatAlias(TTree * tree, const char * expr, const char * cut, const char * alias);
+ static Int_t SetStatusAlias(TTree * tree, const char * expr, const char * cut, const char * alias);
+ static TMultiGraph* MakeStatusMultGr(TTree * tree, const char * expr, const char * cut, const char * alias, Int_t igr);
+ static void AddStatusPad(TCanvas* c1, Float_t padratio, Float_t bottommargin);
+ static void DrawStatusGraphs(TObjArray* oaMultGr);
+ //
+ // TTree function for robust draw
+ //
+ static 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);
//
// TestFunctions:
//