gundam-organization / gundam

GUNDAM, for Generalized and Unified Neutrino Data Analysis Methods, is a suite of applications which aims at performing various statistical analysis with different purposes and setups.
GNU Lesser General Public License v2.1
13 stars 10 forks source link

Posible bad distribution reconstruction with `gundamCalcXsec` #547

Closed BenjouilleDem closed 2 days ago

BenjouilleDem commented 2 weeks ago

Hi, we are using 1.8.1, and we noticed that the gundamCalcXsec distribution reconstruction might be problematic, especially when using --use-prefit. Below, I summarize what I have done :

In the graph below, you can see the differences between the distribution :

MC_Pmu_Distribution_ComparisonFHC FGD1 #nu{#mu} CC 0#pi 0p 0#gamma.pdf DiffMCPmuFHC FGD1 #nu{#mu} CC 0#pi Np 0#gamma.pdf

The red dashed line is the 'true' MC distribution, the other dots on the same plot represent different configurations used. "Asimov" when we used the asimov file, "--use-prefit" when we used this command, and "UseBestFitAsCentralValue:True" when we used that in the config file. On the other graph, we made the absolute differences of the "True" MC (red dashed line) with the one computed by gundamCalcXsec (others points), the legend follows the logic of before.

This is problematic because, from what I understood, gundamCalcXsec should re-use the parameters that the fitter computes and not move them. But that may not be the case compared to what I had obtained. Plus we have different result with the asimov file, when using --use-prefit and not using it. But it should be the same since the fit parameter remain in the same position.

PS : here the same type graph than before but with different sample : MC_Pmu_Distribution_ComparisonFHC FGD2 #nu{#mu} CC 1#pi 0#gamma.pdf MC_Pmu_Distribution_ComparisonFHC FGD2 #nu{#mu} CC 0#pi Np 0#gamma.pdf MC_Pmu_Distribution_ComparisonFHC FGD2 #nu{#mu} CC 0#pi 0p 0#gamma.pdf MC_Pmu_Distribution_ComparisonFHC FGD1 #nu{#mu} CC 1#pi 0#gamma.pdf MC_Pmu_Distribution_ComparisonFHC FGD1 #nu{#mu} CC 0#pi Np 0#gamma.pdf DiffMCPmuFHC FGD2 #nu{#mu} CC 1#pi 0#gamma.pdf DiffMCPmuFHC FGD2 #nu{#mu} CC 0#pi Np 0#gamma.pdf DiffMCPmuFHC FGD2 #nu{#mu} CC 0#pi 0p 0#gamma.pdf DiffMCPmuFHC FGD1 #nu{#mu} CC 1#pi 0#gamma.pdf DiffMCPmuFHC FGD1 #nu{#mu} CC 0#pi Np 0#gamma.pdf

BenjouilleDem commented 2 days ago

I was using a bad command to compute the reconstruction of the nominal MC. The right command to use seems to be when adding --use-prefit and --use-bf-as-xsec. It worked on the 1.8.1 and the main branch of GUNDAM (19/07/2024).