Skip to content

Commit 8600a7a

Browse files
committed
correctly record the phase space used in the calculation
1 parent 1ee1e67 commit 8600a7a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Physics/Resonance/EventGen/RESKinematicsGenerator.cxx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ void RESKinematicsGenerator::ProcessEventRecord(GHepRecord * evrec) const
166166
interaction->KinePtr()->SetQ2(gQ2);
167167

168168
//-- Computing cross section for the current kinematics
169-
xsec = fXSecModel->XSec(interaction, kPSWQD2fE);
169+
const EKinePhaseSpace acceptKps = kPSWQD2fE;
170+
xsec = fXSecModel->XSec(interaction, acceptKps);
170171

171172
//-- Decide whether to accept the current kinematics
172173
if(!fGenerateUniformly)
@@ -196,12 +197,12 @@ void RESKinematicsGenerator::ProcessEventRecord(GHepRecord * evrec) const
196197
kinematics::WQ2toXY(E,M,gW,gQ2,gx,gy);
197198

198199
// set the cross section for the selected kinematics
199-
evrec->SetDiffXSec(xsec,kPSWQ2fE);
200+
evrec->SetDiffXSec(xsec,acceptKps);
200201

201202
// for uniform kinematics, compute an event weight as
202203
// wght = (phase space volume)*(differential xsec)/(event total xsec)
203204
if(fGenerateUniformly) {
204-
double vol = kinematics::PhaseSpaceVolume(interaction,kPSWQ2fE);
205+
double vol = kinematics::PhaseSpaceVolume(interaction,acceptKps);
205206
double totxsec = evrec->XSec();
206207
double wght = (vol/totxsec)*xsec;
207208
LOG("RESKinematics", pNOTICE) << "Kinematics wght = "<< wght;

0 commit comments

Comments
 (0)