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");
  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:

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