Open physcxia opened 1 year ago
Thanks for the report, Chen. This is somewhat old code, so we will need to refresh our memory about how the importance sampliing envelope was constructed and investigate further. We will try to do this asap. In the mean time, if you are concerned that the actual differential cross-section overshoots the importance sampling envelope and, therefore, the generation of kinematics distorts the inputs cross-section modek, you can use the safety check implemented in KineGeneratorWithCache::AssertXSecLimits() - See https://github.com/GENIE-MC/Generator/blob/25df35f9ca97b6eeab79308b6b49974ffb01d4ef/src/Physics/Common/KineGeneratorWithCache.cxx. You can enable this check by setting the MaxXSec-DiffTolerance in https://github.com/GENIE-MC/Generator/blob/master/config/RESKinematicsGenerator.xml
Follow up by Chen Xia:
Following your suggestions, we set MaxXSec-DiffTolerance = 0.1 and tested with the following command using GENIE R-3_04_00:
gevgen -n 10000 -e 5.0 -p 12 -t 1000260560 --cross-sections ./genie_xsec/v3_04_00/NULL/G1802a00000-k250-e1000/data/gxspl-NUsmall.xml --seed 171872 --event-generator-list NCRES
This test was passed.
However, we found an issue with the test code implemented in RESKinematicGenerator.cxx, which is at Line 215:
this->AssertXSecLimits(interaction, xsec, max);
This comparison between xsec
and max
is incorrect because xsec
is the differential cross section in terms of Q^2, but the max
is the value of the envelope which is a function of QD^2.
We have tried to correct this line as follows:
this->AssertXSecLimits(interaction, xsec*J, max);
where the Jacobian J is inserted. In this case, the test was failed even if setting a large tolerance of MaxXSec-DiffTolerance = 100.
We would greatly appreciate any further guidance or assistance you can provide regarding this matter.
In the importance sampling of RESKinematicsGenerator, the maximal cross section
xsec_max
is being passed to the envelope function in the following line:https://github.com/GENIE-MC/Generator/blob/25df35f9ca97b6eeab79308b6b49974ffb01d4ef/src/Physics/Resonance/EventGen/RESKinematicsGenerator.cxx#L187
The envelope represents a distribution of the transformed kinematic variable $Q_D^2$. However, the variable
xsec_max
is calculated as the maximal differential cross section, $\frac{d\sigma^{\max}}{dWdQ^2}$, with original $Q^2$,https://github.com/GENIE-MC/Generator/blob/25df35f9ca97b6eeab79308b6b49974ffb01d4ef/src/Physics/Resonance/EventGen/RESKinematicsGenerator.cxx#L104
which has incorrect dimension and numerically may be much less than the maximal differential cross section in $Q_D^2$, $\frac{d\sigma^{\max}}{dWdQ_D^2}$, as expected by the envelope.
The phase space
kPSWQD2fE
instead ofkPSWQ2fE
should be used inComputeMaxXSec
,https://github.com/GENIE-MC/Generator/blob/25df35f9ca97b6eeab79308b6b49974ffb01d4ef/src/Physics/Resonance/EventGen/RESKinematicsGenerator.cxx#L370
Could someone help investigate this issue?