Logo ROOT   6.10/00
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
th2polyHoneycomb.C File Reference

Detailed Description

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.