I’m trying to get the Chi2 value for 2 histograms into a variable. According the ROOT documentation the option “Chi2” tells the function to return the Chi2 value. But when I run it, the function always returns 1.00.
Here's the code:
double chi2;
chi2 = h1TracksPerSectorX13->Chi2Test(h1TracksPerSectorTrigSim, "Chi2,P");
cout <<"X2=" << chi2 << endl;
Here’s the results:
[code]the value of chi2 = 0.019242
the number of degrees of freedom = 80
X2=1[/code]
I want my variable to be set the value of chi2, in this case 0.019242.
Thanks.