Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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("Pythia8HepMC3GeneratorFilter",
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             'ParticleDecays:allowPhotonRadiation = on',
0050             'TimeShower:QEDshowerByL = off',
0051             ),
0052         parameterSets = cms.vstring('pythia8CommonSettings',
0053                                     'pythia8CUEP8M1Settings',
0054                                     'processParameters')
0055     ),
0056         ExternalDecays = cms.PSet(
0057         Photospp = cms.untracked.PSet(
0058             parameterSets = cms.vstring("setExponentiation", "setInfraredCutOff", "setCorrectionWtForW", "setMeCorrectionWtForW",
0059                                         "setMeCorrectionWtForZ", "setMomentumConservationThreshold", "setPairEmission", "setPhotonEmission",
0060                                         "setStopAtCriticalError", "suppressAll", "forceBremForDecay"),
0061             setExponentiation = cms.bool(True),
0062             setCorrectionWtForW = cms.bool(False),
0063             setMeCorrectionWtForW = cms.bool(False),
0064             setMeCorrectionWtForZ = cms.bool(False),
0065             setInfraredCutOff = cms.double(0.0000001),
0066             setMomentumConservationThreshold = cms.double(0.1),
0067             setPairEmission = cms.bool(False), # retain pair emission in MiNNLO x NLOEW / this
0068             setPhotonEmission = cms.bool(True),
0069             setStopAtCriticalError = cms.bool(False),
0070             # Use Photos only for W/Z and tau decays
0071             suppressAll = cms.bool(True),
0072             forceBremForDecay = cms.PSet(
0073                 parameterSets = cms.vstring("Z", "Wp", "Wm", "tau", "atau"),
0074                 Z = cms.vint32(0, 23),
0075                 Wp = cms.vint32(0, 24),
0076                 Wm = cms.vint32(0, -24),
0077                 tau = cms.vint32(0, 15),
0078                 atau = cms.vint32(0, -15)
0079             ),
0080     ),
0081     parameterSets = cms.vstring("Photospp")
0082     )
0083 )
0084 
0085 ## configure process options
0086 process.options = cms.untracked.PSet(
0087     allowUnscheduled = cms.untracked.bool(True),
0088     wantSummary      = cms.untracked.bool(True)
0089 )
0090 
0091 process.genParticles = cms.EDProducer("GenParticleProducer",
0092     saveBarCodes = cms.untracked.bool(True),
0093     src = cms.InputTag("generator:unsmeared"),
0094     abortOnUnknownPDGCode = cms.untracked.bool(False)
0095 )
0096 process.printTree1 = cms.EDAnalyzer("ParticleListDrawer",
0097     src = cms.InputTag("genParticles"),
0098     maxEventsToPrint  = cms.untracked.int32(10)
0099 )
0100 
0101 process.path = cms.Path(process.generator)
0102