I have two 2D histograms(h1 and h2) that I am trying to divide, I create a third 2D histogram (h3) and call the divide function as follows:

h3->Divide(h1,h2);

but it is not working, any ideas!

Send thye shortest possible running script showing your problem.

Rene

I have two 2D TH2F histograms with variables (x,y) i want to plot third 2D histogram with variables (x,y) but filled with the ratio of first two. I am using following for this. But getting empty plots, any ideas why?

TH2F *histo2_m1 = new TH2F(“histo2_m1”,“Module1”,40,0.4,2.5,20,0,0.392);

TH2F *histo2e_m1 = new TH2F(“histo2e_m1”,“Module1”,40,0.4,2.5,20,0,0.392);

TH2F histo2ee_m1 =(*histo2e_m1)/(*histo2_m1);

histo2ee_m1.Draw(“COLZ”);

Just give empty plots.

Aman

```
TH2F *histo2ee_m1 = new TH2F(*histo2_m1);
histo2ee_m1->Divide(histo2e_m1);
histo2ee_m1->SetNameTitle("histo2ee_m1", "histo2e_m1 / histo2_m1");
histo2ee_m1->Draw("COLZ");
```

Thanks a lot it works. Just a naive question when we write h1->Divide(h2) this means h2/h1 or h1/h2. Just some confusion with what is numerator and what is denominator.

Thanks a lot for clarification