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

Lhe interface update for pythia 8.205 (74x) #7447

Merged
merged 2 commits into from Jan 29, 2015
Merged
Show file tree
Hide file tree
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
Expand Up @@ -26,7 +26,6 @@
'JetMatching:doFxFx = on',
'JetMatching:qCutME = 10.',#this must match the ptj cut in the lhe generation step
'JetMatching:nQmatch = 5', #4 corresponds to 4-flavour scheme (no matching of b-quarks), 5 for 5-flavour scheme
'TimeShower:nPartonsInBorn = 1', #number of coloured particles (before resonance decays) in highest multiplicity born matrix element
'JetMatching:nJetMax = 1', #number of partons in born matrix element for highest multiplicity
),
parameterSets = cms.vstring('pythia8CommonSettings',
Expand Down
28 changes: 5 additions & 23 deletions GeneratorInterface/Pythia8Interface/plugins/LHAupLesHouches.cc
Expand Up @@ -50,7 +50,7 @@ bool LHAupLesHouches::setInit()
}


bool LHAupLesHouches::setEvent(int inProcId, double mRecalculate)
bool LHAupLesHouches::setEvent(int inProcId)
{
if (!event) return false;

Expand All @@ -64,9 +64,7 @@ bool LHAupLesHouches::setEvent(int inProcId, double mRecalculate)
hepeup.AQEDUP, hepeup.AQCDUP);

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 @@ -83,25 +81,13 @@ 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], energy,
mass, hepeup.VTIMUP[i],
hepeup.PUP[i][2], hepeup.PUP[i][3],
hepeup.PUP[i][4], hepeup.VTIMUP[i],
hepeup.SPINUP[i],scalein);
}

Expand Down Expand Up @@ -138,10 +124,6 @@ bool LHAupLesHouches::setEvent(int inProcId, double mRecalculate)
0., 0., 0., false);
}

//hadronisation->onBeforeHadronisation().emit();

//event.reset();

event->attempted();

return true;
Expand Down
Expand Up @@ -36,7 +36,7 @@ class LHAupLesHouches : public Pythia8::LHAup {
private:

bool setInit();
bool setEvent(int idProcIn, double mRecalculate = -1.);
bool setEvent(int idProcIn);

//boost::shared_ptr<lhef::LHERunInfo> runInfo;
lhef::LHERunInfo* runInfo;
Expand Down