Skip to content

Commit 4dd17cd

Browse files
authored
Merge pull request GENIE-MC#452 from GENIE-MC/bugfix/res_stored-phspvar
correctly record the phase space used in RES calculator
2 parents 1ee1e67 + 38a1301 commit 4dd17cd

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/Physics/Resonance/EventGen/RESKinematicsGenerator.cxx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ void RESKinematicsGenerator::ProcessEventRecord(GHepRecord * evrec) const
167167

168168
//-- Computing cross section for the current kinematics
169169
xsec = fXSecModel->XSec(interaction, kPSWQD2fE);
170-
171170
//-- Decide whether to accept the current kinematics
172171
if(!fGenerateUniformly)
173172
{
@@ -195,8 +194,13 @@ void RESKinematicsGenerator::ProcessEventRecord(GHepRecord * evrec) const
195194
double M = init_state.Tgt().HitNucP4().M();
196195
kinematics::WQ2toXY(E,M,gW,gQ2,gx,gy);
197196

198-
// set the cross section for the selected kinematics
199-
evrec->SetDiffXSec(xsec,kPSWQ2fE);
197+
// set the cross section for the selected kinematics.
198+
// we're converting here to the more familiar "W*Q2" space
199+
// rather than the "W*Q2D" (precomputed dipole) space that's used above
200+
// for generation efficiency in the accept-reject loop
201+
double J = kinematics::Jacobian(interaction, kPSWQD2fE, kPSWQ2fE);
202+
xsec *= J;
203+
evrec->SetDiffXSec(xsec, kPSWQ2fE);
200204

201205
// for uniform kinematics, compute an event weight as
202206
// wght = (phase space volume)*(differential xsec)/(event total xsec)

0 commit comments

Comments
 (0)