Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport of interface changes for final pythia 8.200 release (72x) #5819

Merged
1 commit merged into from Oct 15, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 17 additions & 2 deletions GeneratorInterface/Pythia8Interface/plugins/LHAupLesHouches.cc
Expand Up @@ -65,6 +65,8 @@ bool LHAupLesHouches::setEvent(int inProcId, double mRecalculate)

const std::vector<float> &scales = event->scales();

bool doRecalculate = (mRecalculate > 0.);

unsigned int iscale = 0;
for(int i = 0; i < hepeup.NUP; i++) {
//retrieve scale corresponding to each particle
Expand All @@ -81,12 +83,25 @@ bool LHAupLesHouches::setEvent(int inProcId, double mRecalculate)
scalein = scales[iscale];
++iscale;
}

double energy = hepeup.PUP[i][3];
double mass = hepeup.PUP[i][4];

// Optionally recalculate mass from four-momentum.
if (doRecalculate && mass > mRecalculate) {
mass = sqrtpos( energy*energy - hepeup.PUP[i][0]*hepeup.PUP[i][0] - hepeup.PUP[i][1]*hepeup.PUP[i][1] - hepeup.PUP[i][2]*hepeup.PUP[i][2]);
}
// If not, recalculate energy from three-momentum and mass.
else {
energy = sqrt( hepeup.PUP[i][0]*hepeup.PUP[i][0] + hepeup.PUP[i][1]*hepeup.PUP[i][1] + hepeup.PUP[i][2]*hepeup.PUP[i][2] + mass*mass);
}

addParticle(hepeup.IDUP[i], hepeup.ISTUP[i],
hepeup.MOTHUP[i].first, hepeup.MOTHUP[i].second,
hepeup.ICOLUP[i].first, hepeup.ICOLUP[i].second,
hepeup.PUP[i][0], hepeup.PUP[i][1],
hepeup.PUP[i][2], hepeup.PUP[i][3],
hepeup.PUP[i][4], hepeup.VTIMUP[i],
hepeup.PUP[i][2], energy,
mass, hepeup.VTIMUP[i],
hepeup.SPINUP[i],scalein);
}

Expand Down