Skip to content

Commit

Permalink
Merge pull request #7447 from bendavid/lheupdate_py8205_74x
Browse files Browse the repository at this point in the history
Lhe interface update for pythia 8.205 (74x)
  • Loading branch information
davidlange6 committed Jan 29, 2015
2 parents 8c41deb + ab1aab3 commit 90f23a0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 25 deletions.
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

0 comments on commit 90f23a0

Please sign in to comment.