Logo ROOT   6.14/05
Reference Guide
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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.