Operations with histograms

I defined two histograms in this way:

TH1F *heff = new TH1F(Form(“heff%d_mch”,nb),"",30,6.,9.);
TH1F *heff6 = new TH1F(Form(“heff6%d_mch”,nb),"",30,6.,9.);

and filled them:

if(other condition…){heff6->Fill(log10(Trep));}

then I saved them on a .root file.
Now I’d like to create an histogram that has got the same number of channels and, as entries in each channel,
the ratio between the entries of the second one and the entries of the first one.
How can I do?
Thank you very much!

see TH1::Divide or/and TEfficiency class