# -*- coding: utf-8 -*- #For use with W+2jets at NLO w/ FxFx merging #A. Wisecarver, 14.12.2017 #Produces LHE files that are then immediately hadronized/PS’d by Pythia to produce GEN output #(i.e. both externalLHEProducer then generator modules) #qCut parameters based on Apichart’s 2015 W+jets measurement import FWCore.ParameterSet.Config as cms externalLHEProducer = cms.EDProducer("ExternalLHEProducer", args = cms.vstring('/afs/cern.ch/work/a/awisecar/MadGraph5Gen/CMSSW_8_0_20/src/Gridpacks/wellnu2j_5f_NLO_FXFX_as_0108_slc6_amd64_gcc481_CMSSW_7_1_30_tarball.tar.xz'), nEvents = cms.untracked.uint32(5000), numberOfParameters = cms.uint32(1), outputFile = cms.string('cmsgrid_final.lhe'), scriptName = cms.FileInPath('GeneratorInterface/LHEInterface/data/run_generic_tarball_cvmfs.sh') ) #Link to datacards: #https://github.com/cms-sw/genproductions/tree/354d938586a1d54e8220f0b84629a81fa72e9b51/bin/MadGraph5_aMCatNLO/cards/production/13TeV/WJToLNu_NLO from Configuration.Generator.Pythia8CommonSettings_cfi import * from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import * from Configuration.Generator.Pythia8aMCatNLOSettings_cfi import * generator = cms.EDFilter("Pythia8HadronizerFilter", maxEventsToPrint = cms.untracked.int32(1), pythiaPylistVerbosity = cms.untracked.int32(1), filterEfficiency = cms.untracked.double(1.0), pythiaHepMCVerbosity = cms.untracked.bool(False), comEnergy = cms.double(13000.), PythiaParameters = cms.PSet( pythia8CommonSettingsBlock, pythia8CUEP8M1SettingsBlock, pythia8aMCatNLOSettingsBlock, processParameters = cms.vstring( 'JetMatching:setMad = off', 'JetMatching:scheme = 1', 'JetMatching:merge = on', 'JetMatching:jetAlgorithm = 2', 'JetMatching:etaJetMax = 999.', 'JetMatching:coneRadius = 1.', 'JetMatching:slowJetPower = 1', 'JetMatching:qCut = 30.', #this is the actual merging scale '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 'JetMatching:nJetMax = 2', #number of partons in born matrix element for highest multiplicity 'TimeShower:mMaxGamma = 4.0', ), parameterSets = cms.vstring('pythia8CommonSettings', 'pythia8CUEP8M1Settings', 'pythia8aMCatNLOSettings', 'processParameters', ) ) )