Chi2Test retrieving chi2 value

Hi,

How I can store the value of Chi2/NDF after the use of Chi2Test?

Best and thanks.

Nicolás V.

Hi,
according to TH1::Chi2Test() documentation,
you just need the option

"CHI2/NDF"

to return the Chi2/NDF instead of the p-value.

So you can simply do

Double_t chi2_ndf=0;
chi2_ndf=h1->Chi2Test(h2,"CHI2/NDF");
printf("%lf\n",chi2_ndf);

Best,
Stefano