Solutions for ROOT Exercise Session C

 

Session C

 

Question C1:

You can run the following session:

root [] TFile f("c1.root");

root [] c1->Draw();

root [] TH1F *hdmd = (TH1F*)c1->GetPrimitive("hdmd");

root [] TF1 *f5 = hdmd->GetFunction("f5");

root [] double hint = hdmd->Integral();

root [] double fint = f5->Integral(0.139,0.170);

root [] double ratio = fint/hint

   9.96772242932099936e-04