Created
March 26, 2018 14:07
-
-
Save clelange/07d93ecd4e47de6b44e934b25160268d to your computer and use it in GitHub Desktop.
TT semileptonic W pT filter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Based on https://cms-pdmv.cern.ch/mcm/public/restapi/requests/get_fragment/HIG-RunIIFall17wmLHEGS-00304 | |
import FWCore.ParameterSet.Config as cms | |
externalLHEProducer = cms.EDProducer("ExternalLHEProducer", | |
args = cms.vstring('/afs/cern.ch/work/a/adewit/private/genproductions/bin/MadGraph5_aMCatNLO/dyellell1j_5f_NLO_FXFX_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') | |
) | |
#GS fragment | |
from Configuration.Generator.Pythia8CommonSettings_cfi import * | |
from Configuration.Generator.MCTunes2017.PythiaCP5Settings_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, | |
pythia8CP5SettingsBlock, | |
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 = 1', #number of partons in born matrix element for highest multiplicity | |
'TimeShower:mMaxGamma = 4.0', | |
), | |
parameterSets = cms.vstring('pythia8CommonSettings', | |
'pythia8CP5Settings', | |
'pythia8aMCatNLOSettings', | |
'processParameters', | |
) | |
) | |
) | |
tmpGenParticles = cms.EDProducer("GenParticleProducer", | |
saveBarCodes = cms.untracked.bool(True), | |
src = cms.InputTag("generator","unsmeared"), | |
abortOnUnknownPDGCode = cms.untracked.bool(False) | |
) | |
selectedLeptons = cms.EDFilter("GenParticleSelector", | |
src = cms.InputTag("tmpGenParticles"), | |
cut = cms.string('(isHardProcess() && (abs(pdgId)==13||abs(pdgId)==11||abs(pdgId)==15))'), | |
) | |
selectedNeutrinos = cms.EDFilter("GenParticleSelector", | |
src = cms.InputTag("tmpGenParticles"), | |
cut = cms.string('((abs(pdgId)==12||abs(pdgId)==14||abs(pdgId)==16)&&isHardProcess())'), | |
) | |
lepWCands = cms.EDProducer("CandViewShallowCloneCombiner", | |
cut = cms.string('pt > 150'), | |
checkCharge = cms.bool(False), | |
decay = cms.string('selectedLeptons selectedNeutrinos') | |
) | |
selectedQuarks = cms.EDFilter("GenParticleSelector", | |
src = cms.InputTag("tmpGenParticles"), | |
cut = cms.string('(isHardProcess() && (abs(pdgId)==1||abs(pdgId)==2||abs(pdgId)==3||abs(pdgId)==4))'), | |
) | |
hadWCands = cms.EDProducer("CandViewShallowCloneCombiner", | |
cut = cms.string('pt > 150'), | |
checkCharge = cms.bool(False), | |
decay = cms.string('selectedQuarks') | |
) | |
lepWFilter = cms.EDFilter("CandViewCountFilter", | |
src = cms.InputTag("lepWCands"), | |
minNumber = cms.uint32(1), | |
) | |
hadWFilter = cms.EDFilter("CandViewCountFilter", | |
src = cms.InputTag("hadWCands"), | |
minNumber = cms.uint32(1), | |
) | |
ProductionFilterSequence = cms.Sequence(generator*tmpGenParticles*selectedLeptons*selectedNeutrinos*lepWCands*lepWFilter*selectedQuarks*hadWCands*hadWFilter) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment