Histogram package

TGraphDelaunay

TGraph2D

TGraph2DPainter

THistPainter

TGraphPainter

TGraph

TMultiGraph

THStack

TF1

TH1

THnSparse

TSpectrum2Painter

New TEfficiency class

New TKDE class

New TH2Poly class

TH2Poly is a 2D Histogram class (TH2) that allowing to define polygonal bins of arbitary shape.

Each bin in the TH2Poly histogram is a TH2PolyBin object. TH2PolyBin is a very simple class that contains the vertices (stored as TGraphs and TMultiGraphs ) and contents of the polygonal bin as well as several related functions.

Bins are defined using one of the AddBin() methods. The bin definition should be done before filling.

TH2Poly implements a partitioning algorithm to speed up bins' filling. The following very simple macro shows how to build and fill a TH2Poly:

{
   TH2Poly *h2p = new TH2Poly();

   Double_t x1[] = {0, 5, 5};
   Double_t y1[] = {0, 0, 5};
   Double_t x2[] = {0, -1, -1, 0};
   Double_t y2[] = {0, 0, -1, -1};
   Double_t x3[] = {4, 3, 0, 1, 2.4};
   Double_t y3[] = {4, 3.7, 1, 4.7, 3.5};

   h2p->AddBin(3, x1, y1);
   h2p->AddBin(3, x2, y2);
   h2p->AddBin(3, x3, y3);

   h2p->Fill(   3,    1, 3); // fill bin 1
   h2p->Fill(-0.5, -0.5, 7); // fill bin 2
   h2p->Fill(-0.7, -0.5, 1); // fill bin 2
   h2p->Fill(   1,    3, 5); // fill bin 3
}
Examples can bin found in $ROOTSYS/tutorials/hist/:

th2polyBoses.C
th2polyEurope.C
th2polyHonecomb.C
th2polyUSA.C