Logo ROOT   6.12/07
Reference Guide
th2polyHoneycomb.C File Reference

Detailed Description

View in nbviewer Open in SWAN This tutorial illustrates how to create an histogram with hexagonal bins (TH2Poly).

The method TH2Poly::Honeycomb allows to build automatically an honeycomb binning.

void th2polyHoneycomb(){
TH2Poly *hc = new TH2Poly();
hc->SetTitle("Honeycomb example");
hc->Honeycomb(0,0,.1,25,25);
TRandom ran;
for (int i = 0; i<30000; i++) {
hc->Fill(ran.Gaus(2.,1), ran.Gaus(2.,1));
}
hc->Draw("colz");
}
pict1_th2polyHoneycomb.C.png
Author
Olivier Couet

Definition in file th2polyHoneycomb.C.