Skip to content

Commit

Permalink
Merge pull request #5819 from bendavid/py8200final_72x
Browse files Browse the repository at this point in the history
Backport of interface changes for final pythia 8.200 release (72x)
  • Loading branch information
aledegano committed Oct 15, 2014
2 parents 753d15d + 3635b8b commit 33663f5
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions GeneratorInterface/Pythia8Interface/plugins/LHAupLesHouches.cc
Original file line number Diff line number Diff line change
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

0 comments on commit 33663f5

Please sign in to comment.