Difference ROOT5.34 & ROOT6.04.16

it’s strange. I don’t understand why I can’t plot all lines (pchisq,pchisq2 and pchisq2b) on the same graph. My root version is 6.10.04 Check.zip (10.4 KB)

How about you first fix warnings that are reported:

Warning in <TCanvas::Constructor>: Deleting canvas with same name: c1

Sometime, I printed this result. image . I don’t see blue line. Please help me.

pchisq2b->Print();

Check.zip (16.4 KB) . My result isn’t change. But If I run for each TGraph in each file, I can obtain pchisq2b as: image

The purpose of pchisq2b->Print(); was NOT to change the result but to demonstrate that the “pchisq2b” contents are simply zeros. It is up to you to find out why:

The mean value of chisq is 0 and2 0

Sorry, But this code root5.zip (10.4 KB) can run perfiectly in root5. I only modified this code. And My need results: !

Fix the reported errors and your ROOT 5 code will also work in ROOT 6:

root [0] .x plot_theta13_proj_reactor.C
/.../root5/./plot_theta13_proj_reactor.C:65:14: error: redefinition of 'cfile'
    ifstream cfile("theta13_proj_reactor_current.dat");
             ^
/.../root5/./plot_theta13_proj_reactor.C:33:14: note: previous definition is here
    ifstream cfile("theta13_proj_reactor.dat");
             ^
/.../root5/./plot_theta13_proj_reactor.C:120:5: error: use of undeclared identifier 'c1'
    c1->Update();
    ^
/.../root5/./plot_theta13_proj_reactor.C:121:27: error: use of undeclared identifier 'c1'
    TLine *l1 = new TLine(c1->GetUxmin(), 1, c1->GetUxmax(), 1);
                          ^
/.../root5/./plot_theta13_proj_reactor.C:121:46: error: use of undeclared identifier 'c1'
    TLine *l1 = new TLine(c1->GetUxmin(), 1, c1->GetUxmax(), 1);
                                             ^
/.../root5/./plot_theta13_proj_reactor.C:149:15: error: redefinition of 'pleg'
    TLegend * pleg = new TLegend(0.75,0.62,0.8,0.75);
              ^
/.../root5/./plot_theta13_proj_reactor.C:139:15: note: previous definition is here
    TLegend * pleg = new TLegend(0.4,0.7,0.6,0.85);
              ^
/.../root5/./plot_theta13_proj_reactor.C:159:15: error: redefinition of 'pleg'
    TLegend * pleg = new TLegend(0.45,0.45,0.55,0.49);
              ^
/.../root5/./plot_theta13_proj_reactor.C:139:15: note: previous definition is here
    TLegend * pleg = new TLegend(0.4,0.7,0.6,0.85);
              ^

Yes, I fixed the errors, But my rersults aslo show as above. I don’t plot chisq2b although I used the datas as in root 5.Check.zip (16.4 KB) In This root, the above errors is fixed.

So we return to the question why pchisq2b->Print(); contains only zeros. Find it out!

This is my problem. Because You can see I used with the same data. This is my code If I use to run chisq2b. Run.zip (12.4 KB). It is same as in check file

An additional hint … find out why “MinNLLb” and “MinNLL2b” are zeros, too.

Your two graphs are the same. plot_theta13_current.C (2.3 KB)

I don’t think so. beucause this is the results which is run in root 5. the blue line is pchisq2 the red blue is pchisq2b Tgraph image [Checkrun.zip|attachment] (10.4 KB)

Because the datas which to plot the blue line and the red line are different. So The two Tgraphs can’t same.

The new macro you posted had many C++ mistakes and therefore could not run with ROOT 6. I fixed them in the attached file: plot_theta13_proj_reactor.C (6.0 KB)

Now this macro gives me the following plot:

Thank for your help.

I want to ask you how to find a ratio of two Graph by the command “Divide”. For example, I have TGraph: h1, h2. I want to have a ratio of h1, h2 and print ratio value at each point in terminal. How can I do?appearance_nu_mode_0.cc (2.2 KB)

Here is a corrected version of your macro:

appearance_nu_mode_0.cc (2.3 KB)

Hello everyone!
I made a loop on theta23 in TGraph*pchisq2, My problem that I want to find the point where the chisquare is equal to 1. I think I will get Eval for each theta23’s point, if the returned value is close to 1 (or 1 +/- 1e-5) then that values will be printed. How will I do? How can I fix the code?Example.zip (12.4 KB)