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

make setting of shower scales from lhe input configurable for pythia8 #7154

Merged
merged 1 commit into from Jan 13, 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 @@ -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