RootHistogram11

Hi,
I started to create histogram for (first.root) that has TTree file inside it and has two variables mass and weight like

TFile *f = new  TFile ("first.root");
  TTree *t2 = (TTree*)f->Get("tree");           
  Double_t Mass=0;
  TBranch *mass= t2->GetBranch("Mass");
->SetAddress(&Mass);
  Double_t Weight=0;
  TBranch *weight = t2->GetBranch("Weight");

I want to compare the data of this file by plotting the difference sub_plot below the main file and add the (second.root) to this histogram and write as PDF, There is any help for this,

May be the ratio-plots examples given on the following page may help you:
https://root.cern/doc/master/dir_d19fad060e71a4fa91e5d42b7a1a4b08.html

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.