Skip to content

Commit

Permalink
Merge pull request cms-sw#7154 from bendavid/pythia8lhescales
Browse files Browse the repository at this point in the history
make setting of shower scales from lhe input configurable for pythia8
  • Loading branch information
cmsbuild authored and bendavid committed Jan 14, 2015
1 parent a24a66a commit fc1a609
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
Expand Up @@ -4,6 +4,7 @@
pythia8CommonSettings = cms.vstring(
'Main:timesAllowErrors = 10000',
'Check:epTolErr = 0.01',
'Beams:setProductionScalesFromLHEF = on',
'SLHA:keepSM = on',
'SLHA:minMassSM = 1000.',
'ParticleDecays:limitTau0 = on',
Expand Down
Expand Up @@ -74,7 +74,7 @@ bool LHAupLesHouches::setEvent(int inProcId, double mRecalculate)

//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
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_;

};
Expand Up @@ -414,6 +414,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 fc1a609

Please sign in to comment.