Normalizing and dividing the same variable from two different MCs

From: Kadir Ocalan <e123671_at_metu.edu.tr>
Date: Thu, 23 Apr 2009 16:09:13 +0300

  Hello ROOT Experts,

  I would like to normalize and obtain the "the normalized ratio" of the same variable from two different MCs. For that, I issue the following script:

  TH1::AddDirectory(kFALSE);

  TFile *f1 = TFile::Open("file1.root");

  TFile *f2 = TFile::Open("file2.root");

  TH1 *h1 = (TH1*)f1->Get("var1");

  TH1 *h2 = (TH1*)f2->Get("var1");

  h1->Divide(h2);

  h1->Sumw2();

  h2->Sumw2();

  h1->DrawNormalized();

  The problem is that the ratio plot turns out to be absolute ratio rather than normalized one. Can you please assist in finding the right scripts for that kind of plots (Maybe something very basic)? The ROOT version that i use is 5.17.

  Best, Kadir Received on Thu Apr 23 2009 - 15:09:23 CEST

This archive was generated by hypermail 2.2.0 : Thu Apr 23 2009 - 17:50:01 CEST