I have two .root files including histograms. I got them from AIDA in geant4. For opening these files I need root.
I need to open these two files in one canvas in order to be able to compare them.
I am wondering should I write a c++ code for that or can I do it easily from the browser?
Really thank for your help
Can I ask you a very beginner question.
I need to create a script to type those codes, Could you please kindly tell me how I can create a script in root ?
Thank you again
{
TFile f1("f1.root");
h1->Draw(); // h1 is the first histogram to draw sitting in f1.root
TFile f2("f2.root");
h2->Draw("same"); // h2 is the 2nd histogram to draw sitting in f2.root
}
I think you should spend a bit of time reading the doc…
What you did cannot work … you cannot combine macros like that …
do you have the root files with the histograms what to plot ? i will try to make a macro …
These three root files contain three histograms (1,2,3)
Let’s suppose that I want to compare all histograms number number 2 in these three files.
Best Regards essai3.root (9.4 KB) essai2.root (9.74 KB) essai1.root (10 KB)
Yes you are right. The problem is that I have sort of limited time and I am sort of stressed unfortunately.
I have enclosed my two files again asking you another question. I will really appreciate if you help me with them.
in essai3.root, the histogram number 2 is sort of noisy, but it is not the case in essai2.root, Nevertheless while superimposing them, the green dots represents a line like y=0 , not the histogram 2 in essai3.root!
Could you please kindly run the script as well and see if you get the same result as 1and2and3.root? 1and2and3.root (18.2 KB) essai3.root (9.66 KB) essai2.root (9.97 KB) essai1.root (9.61 KB)