ComPWA
Common Partial-Wave-Analysis Framework
HistTools.hpp File Reference

Collection of useful routines to plot histograms, e.g. More...

#include <TCanvas.h>
#include <TFile.h>
#include <TGraph.h>
#include <TH1D.h>
#include <TH2D.h>
#include <TH2Poly.h>
#include <TKDTreeBinning.h>
#include <TLatex.h>
#include <TMath.h>
#include <TObject.h>
#include <TPad.h>
#include <TPaveStats.h>
#include <TRandom3.h>
#include <TStyle.h>
#include "Core/Logging.hpp"
+ Include dependency graph for HistTools.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

TH1 * getPull (TH1 *Histogram1, TH1 *Histogram2, TString Name="pull_")
 
TH1 * getResidual (TH1 *Histogram1, TH1 *Histogram2, TString Name="res_")
 
TPad * drawHist (std::vector< TH1D *> Histograms, std::vector< TString > DrawOption, double Min=0, double Max=0)
 
TPad * drawPull (std::vector< TH1D *> Histogram, std::vector< TString > DrawOptions, double Min=0, double Max=0)
 
TPad * drawPull (TH1D *Histogram1, TH1D *Histogram2, TString DrawOption1, TString DrawOption2, double Min=0, double Max=0)
 
TPad * drawResidual (std::vector< TH1D *> Histograms, std::vector< TString > DrawOptions, double Min=0, double Max=0)
 
TPad * drawResidual (TH1D *Histogram1, TH1D *Histogram2, TString DrawOption1, TString DrawOption2, double Min=0, double Max=0)
 
void getTH2PolyChi2 (TH2Poly *Histogram1, TH2Poly *Histogram2, double &Chi2, int &NDF, int &IGood)
 
TH2Poly * getTH2PolyPull (TH2Poly *Histogram1, TH2Poly *Histogram2, TString Name)
 
TH2Poly * adaptiveBinning (UInt_t DataSize, UInt_t DataDimension, Double_t *Data, UInt_t NBins=100)
 

Detailed Description

Collection of useful routines to plot histograms, e.g.

creating (normalized) residual plots

Definition in file HistTools.hpp.

Function Documentation

◆ adaptiveBinning()

TH2Poly* adaptiveBinning ( UInt_t  DataSize,
UInt_t  DataDimension,
Double_t *  Data,
UInt_t  NBins = 100 
)
inline

Definition at line 435 of file HistTools.hpp.

◆ drawHist()

TPad* drawHist ( std::vector< TH1D *>  Histograms,
std::vector< TString >  DrawOption,
double  Min = 0,
double  Max = 0 
)
inline

Definition at line 132 of file HistTools.hpp.

◆ drawPull() [1/2]

TPad* drawPull ( std::vector< TH1D *>  Histogram,
std::vector< TString >  DrawOptions,
double  Min = 0,
double  Max = 0 
)
inline

Definition at line 150 of file HistTools.hpp.

◆ drawPull() [2/2]

TPad* drawPull ( TH1D *  Histogram1,
TH1D *  Histogram2,
TString  DrawOption1,
TString  DrawOption2,
double  Min = 0,
double  Max = 0 
)
inline

Definition at line 253 of file HistTools.hpp.

◆ drawResidual() [1/2]

TPad* drawResidual ( std::vector< TH1D *>  Histograms,
std::vector< TString >  DrawOptions,
double  Min = 0,
double  Max = 0 
)
inline

Definition at line 264 of file HistTools.hpp.

◆ drawResidual() [2/2]

TPad* drawResidual ( TH1D *  Histogram1,
TH1D *  Histogram2,
TString  DrawOption1,
TString  DrawOption2,
double  Min = 0,
double  Max = 0 
)
inline

Definition at line 356 of file HistTools.hpp.

◆ getPull()

TH1* getPull ( TH1 *  Histogram1,
TH1 *  Histogram2,
TString  Name = "pull_" 
)
inline

Definition at line 30 of file HistTools.hpp.

◆ getResidual()

TH1* getResidual ( TH1 *  Histogram1,
TH1 *  Histogram2,
TString  Name = "res_" 
)
inline

Definition at line 90 of file HistTools.hpp.

◆ getTH2PolyChi2()

void getTH2PolyChi2 ( TH2Poly *  Histogram1,
TH2Poly *  Histogram2,
double &  Chi2,
int &  NDF,
int &  IGood 
)
inline

Definition at line 368 of file HistTools.hpp.

◆ getTH2PolyPull()

TH2Poly* getTH2PolyPull ( TH2Poly *  Histogram1,
TH2Poly *  Histogram2,
TString  Name 
)
inline

Definition at line 391 of file HistTools.hpp.