Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How to define histograms?

define histograms
0
Posted

How to define histograms?

0

ROOT provides you with 3-d histograms as well. TH1D *h1 = new TH1D(“h1”, “histogram title”, 100, 0., 10.); TH2D *h2 = new TH2D(“h2”, “histogram title”, 100, 0., 10., 18, 0., 180.); TH3D *h3 = new TH3D(“h3″, histogram title”, 100, 0., 10., 18, 0., 180., 10, 0., 1.); What Options are there for drawing? Many of these options are the same like in PAW: h2->Draw(“text”); h2->Draw(“col”), h2->Draw(“colz”); h2->Draw(“box”); h2->Draw(“surf”); A complete list is available in the official documentation. How to overlay two histograms h1a->Draw(); h1b->Draw(“same”); How to copy a histogram TH1D hcopy(*h1); // assuming h1 is a pointer to a TH1D How to get Poissonian errors in an efficiency plot heff->Divide(hgood, hall, 1., 1., “b”); // assuming you have three histograms called hall, hgood, and heff How to get a profile histogram from a 2-d histogram Tprofile *px = h2->ProfileX(“px”, 0, 9); // where firstYbin = 0 and lastYbin = 9 px->Draw(); Tprofile *py = h2->ProfileY(“py”, 0, 9); // where firstXbi

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123