Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:07:27

0001 #example gen fragment that takes a gridapack which produces
0002 #ttH events with inclusive top decays and undecayed higgs at lhe level
0003 #and selects resonance decays such that events have at least four leptons (electrons, muons, taus)
0004 
0005 import FWCore.ParameterSet.Config as cms
0006 
0007 # link to cards:
0008 # https://github.com/cms-sw/genproductions/blob/0d4b4288fa053d9a8aef5c6e123b66bf94c3aee8/bin/Powheg/production/V2/13TeV/Higgs/ttH_inclusive_NNPDF30_13TeV_M125/ttH_inclusive_NNPDF30_13TeV_M125.input
0009 
0010 externalLHEProducer = cms.EDProducer("ExternalLHEProducer",
0011     args = cms.vstring('/cvmfs/cms.cern.ch/phys_generator/gridpacks/slc6_amd64_gcc481/13TeV/powheg/V2/ttH_inclusive_NNPDF30_13TeV_M125/v1/ttH_inclusive_NNPDF30_13TeV_M125_tarball.tar.gz'),
0012     nEvents = cms.untracked.uint32(5000),
0013     numberOfParameters = cms.uint32(1),
0014     outputFile = cms.string('cmsgrid_final.lhe'),
0015     scriptName = cms.FileInPath('GeneratorInterface/LHEInterface/data/run_generic_tarball_cvmfs.sh')
0016 )
0017 
0018 from Configuration.Generator.Pythia8CommonSettings_cfi import *
0019 from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import *
0020 from Configuration.Generator.Pythia8PowhegEmissionVetoSettings_cfi import *
0021 
0022 generator = cms.EDFilter("Pythia8HadronizerFilter",
0023                          maxEventsToPrint = cms.untracked.int32(1),
0024                          pythiaPylistVerbosity = cms.untracked.int32(1),
0025                          filterEfficiency = cms.untracked.double(1.0),
0026                          pythiaHepMCVerbosity = cms.untracked.bool(False),
0027                          comEnergy = cms.double(13000.),
0028                          PythiaParameters = cms.PSet(
0029         pythia8CommonSettingsBlock,
0030         pythia8CUEP8M1SettingsBlock,
0031         pythia8PowhegEmissionVetoSettingsBlock,
0032         processParameters = cms.vstring(
0033             'POWHEG:nFinal = 3',   ## Number of final state particles
0034                                    ## (BEFORE THE DECAYS) in the LHE
0035                                    ## other than emitted extra parton
0036             '25:m0 = 125.0',
0037             '25:onMode = off',
0038             '25:onIfMatch = 15 -15',
0039             '25:onIfMatch = 23 23',
0040             '25:onIfMatch = 24 -24',
0041             '24:mMin = 0.05',
0042             '23:mMin = 0.05',
0043             'ResonanceDecayFilter:filter = on',
0044             'ResonanceDecayFilter:exclusive = off', #off: require at least the specified number of daughters, on: require exactly the specified number of daughters
0045             'ResonanceDecayFilter:eMuAsEquivalent    = off', #on: treat electrons and muons as equivalent
0046             'ResonanceDecayFilter:eMuTauAsEquivalent = on',  #on: treat electrons, muons , and taus as equivalent
0047             'ResonanceDecayFilter:allNuAsEquivalent  = on',  #on: treat all three neutrino flavours as equivalent
0048             'ResonanceDecayFilter:udscAsEquivalent   = off', #on: treat u,d,s,c quarks as equivalent
0049             'ResonanceDecayFilter:udscbAsEquivalent  = off', #on: treat u,d,s,c,b quarks as equivalent
0050             #'ResonanceDecayFilter:mothers =', #list of mothers not specified -> count all particles in hard process+resonance decays (better to avoid specifying mothers when including leptons from the lhe in counting, since intermediate resonances are not gauranteed to appear in general
0051             'ResonanceDecayFilter:daughters = 11,11,11,11',
0052           ),
0053         parameterSets = cms.vstring('pythia8CommonSettings',
0054                                     'pythia8CUEP8M1Settings',
0055                                     'pythia8PowhegEmissionVetoSettings',
0056                                     'processParameters'
0057                                     )
0058         )
0059                          )
0060 
0061 ProductionFilterSequence = cms.Sequence(generator)
0062 
0063