Skip to content

Commit

Permalink
Merge pull request #7652 from bendavid/lhescales_53x
Browse files Browse the repository at this point in the history
Backport configurable setting of scales from lhe for pythia 8 (and then turn off by default) (53x)
  • Loading branch information
cmsbuild committed Feb 11, 2015
2 parents da6744f + 9868dad commit cad70e8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
pythia8CommonSettings = cms.vstring(
'Main:timesAllowErrors = 10000',
'Check:epTolErr = 0.01',
'Beams:setProductionScalesFromLHEF = off',
'SLHA:keepSM = on',
'SLHA:minMassSM = 1000.',
'ParticleDecays:limitTau0 = on',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ bool LHAupLesHouches::setEvent(int inProcId)

//handle clustering scales if present,
//applies to outgoing partons only
if (scales.size()>0 && hepeup.ISTUP[i]==1) {
if (setScalesFromLHEF_ && scales.size()>0 && hepeup.ISTUP[i]==1) {
if (iscale>=scales.size()) {
edm::LogError("InvalidLHEInput") << "Pythia8 requires"
<< "cluster scales for all outgoing partons or for none"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

class LHAupLesHouches : public Pythia8::LHAup {
public:
LHAupLesHouches() {;}
LHAupLesHouches() : setScalesFromLHEF_(false) {;}

//void loadRunInfo(const boost::shared_ptr<lhef::LHERunInfo> &runInfo)
void loadRunInfo(lhef::LHERunInfo* runInfo)
Expand All @@ -30,6 +30,8 @@ class LHAupLesHouches : public Pythia8::LHAup {
//void loadEvent(const boost::shared_ptr<lhef::LHEEvent> &event)
void loadEvent(lhef::LHEEvent* event)
{ this->event = event; }

void setScalesFromLHEF(bool b) { setScalesFromLHEF_ = b; }

private:

Expand All @@ -40,4 +42,8 @@ class LHAupLesHouches : public Pythia8::LHAup {
lhef::LHERunInfo* runInfo;
//boost::shared_ptr<lhef::LHEEvent> event;
lhef::LHEEvent* event;

// Flag to set particle production scales or not.
bool setScalesFromLHEF_;

};
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ bool Pythia8Hadronizer::initializeForExternalPartons()
} else {

lhaUP.reset(new LHAupLesHouches());
lhaUP->setScalesFromLHEF(fMasterGen->settings.flag("Beams:setProductionScalesFromLHEF"));
lhaUP->loadRunInfo(lheRunInfo());

if ( fJetMatchingHook )
Expand Down

0 comments on commit cad70e8

Please sign in to comment.