Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-01-21 01:39:49

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from FWCore.ParameterSet.VarParsing import VarParsing
0004 options = VarParsing ('python')
0005 options.register('outFilename', 'particleLevel.root',  VarParsing.multiplicity.singleton, VarParsing.varType.string, "Output file name")
0006 #options.register('photos', 'off', VarParsing.multiplicity.singleton, VarParsing.varType.string, "ME corrections")
0007 options.register('lepton', 13, VarParsing.multiplicity.singleton, VarParsing.varType.int, "Lepton ID for Z decays")
0008 options.register('cutoff', 0.00011, VarParsing.multiplicity.singleton, VarParsing.varType.float, "IR cutoff")
0009 options.register('taufilter', 'off', VarParsing.multiplicity.singleton, VarParsing.varType.string, "Filter tau -> leptons")
0010 options.parseArguments()
0011 print(options)
0012 
0013 process = cms.Process("PROD")
0014 
0015 # import of standard configurations
0016 process.load('Configuration.StandardSequences.Services_cff')
0017 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0018 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0019 process.MessageLogger.cerr.FwkReport.reportEvery = int(options.maxEvents/100)
0020 
0021 process.RandomNumberGeneratorService = cms.Service("RandomNumberGeneratorService",
0022     generator = cms.PSet(
0023         initialSeed = cms.untracked.uint32(123456789),
0024     )
0025 )
0026 
0027 # set input to process
0028 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(100) )
0029 
0030 process.source = cms.Source("EmptySource")
0031 
0032 from Configuration.Generator.Pythia8CommonSettings_cfi import *
0033 from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import *
0034 
0035 process.generator = cms.EDFilter("Pythia8GeneratorFilter",
0036     maxEventsToPrint = cms.untracked.int32(1),
0037     pythiaPylistVerbosity = cms.untracked.int32(1),
0038     filterEfficiency = cms.untracked.double(1.0),
0039     pythiaHepMCVerbosity = cms.untracked.bool(False),
0040     comEnergy = cms.double(13000.),
0041     PythiaParameters = cms.PSet(
0042         pythia8CommonSettingsBlock,
0043         pythia8CUEP8M1SettingsBlock,
0044         processParameters = cms.vstring(
0045             'WeakSingleBoson:ffbar2gmZ = on',
0046             'PhaseSpace:mHatMin = 50.',
0047             '23:onMode = off',
0048             '23:onIfAny = 15',
0049             'TimeShower:mMaxGamma = 4.0',
0050             'TauDecays:externalMode = 0',
0051             'ParticleDecays:allowPhotonRadiation = on', # allow photons from hadron decays
0052             'TimeShower:QEDshowerByL = off', # no photons from leptons
0053             'TimeShower:QEDshowerByOther = off', # no photons from W bosons
0054             ),
0055         parameterSets = cms.vstring('pythia8CommonSettings',
0056                                     'pythia8CUEP8M1Settings',
0057                                     'processParameters')
0058     ),
0059         ExternalDecays = cms.PSet(
0060         Photospp = cms.untracked.PSet(
0061             parameterSets = cms.vstring("setExponentiation", "setInfraredCutOff", "setCorrectionWtForW", "setMeCorrectionWtForW",
0062                                         "setMeCorrectionWtForZ", "setMomentumConservationThreshold", "setPairEmission", "setPhotonEmission",
0063                                         "setStopAtCriticalError", "suppressAll", "forceBremForDecay"),
0064             setExponentiation = cms.bool(True),
0065             setCorrectionWtForW = cms.bool(False),
0066             setMeCorrectionWtForW = cms.bool(False),
0067             setMeCorrectionWtForZ = cms.bool(False),
0068             setInfraredCutOff = cms.double(0.0000001),
0069             setMomentumConservationThreshold = cms.double(0.1),
0070             setPairEmission = cms.bool(False), # retain pair emission in MiNNLO x NLOEW / this
0071             setPhotonEmission = cms.bool(True),
0072             setStopAtCriticalError = cms.bool(False),
0073             # Use Photos only for W/Z and tau decays
0074             suppressAll = cms.bool(True),
0075             forceBremForDecay = cms.PSet(
0076                 parameterSets = cms.vstring("Z", "Wp", "Wm", "tau", "atau"),
0077                 Z = cms.vint32(0, 23),
0078                 Wp = cms.vint32(0, 24),
0079                 Wm = cms.vint32(0, -24),
0080                 tau = cms.vint32(0, 15),
0081                 atau = cms.vint32(0, -15)
0082             ),
0083     ),
0084     parameterSets = cms.vstring("Photospp")
0085     )
0086 )
0087 
0088 ## configure process options
0089 process.options = cms.untracked.PSet(
0090     allowUnscheduled = cms.untracked.bool(True),
0091     wantSummary      = cms.untracked.bool(True)
0092 )
0093 
0094 process.genParticles = cms.EDProducer("GenParticleProducer",
0095     saveBarCodes = cms.untracked.bool(True),
0096     src = cms.InputTag("generator:unsmeared"),
0097     abortOnUnknownPDGCode = cms.untracked.bool(False)
0098 )
0099 process.printTree1 = cms.EDAnalyzer("ParticleListDrawer",
0100     src = cms.InputTag("genParticles"),
0101     maxEventsToPrint  = cms.untracked.int32(10)
0102 )
0103 
0104 process.path = cms.Path(process.generator)
0105