# Auto generated configuration file
# using: 
# Revision: 1.19 
# Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v 
# with command line options: Configuration/GenProduction/python/EXO-RunIISummer20UL16GEN-01608-fragment.py --python_filename EXO-RunIISummer20UL16GEN-01608_1_cfg.py --eventcontent RAWSIM --customise Configuration/DataProcessing/Utils.addMonitoring --datatier GEN --fileout file:EXO-RunIISummer20UL16GEN-01608.root --conditions 106X_mcRun2_asymptotic_v13 --beamspot Realistic25ns13TeV2016Collision --step GEN --geometry DB:Extended --era Run2_2016 --no_exec --mc -n 5021
import FWCore.ParameterSet.Config as cms

from Configuration.Eras.Era_Run2_2016_cff import Run2_2016

process = cms.Process('GEN',Run2_2016)

# import of standard configurations
process.load('Configuration.StandardSequences.Services_cff')
process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
process.load('FWCore.MessageService.MessageLogger_cfi')
process.load('Configuration.EventContent.EventContent_cff')
process.load('SimGeneral.MixingModule.mixNoPU_cfi')
process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
process.load('Configuration.StandardSequences.MagneticField_cff')
process.load('Configuration.StandardSequences.Generator_cff')
process.load('IOMC.EventVertexGenerators.VtxSmearedRealistic25ns13TeV2016Collision_cfi')
process.load('GeneratorInterface.Core.genFilterSummary_cff')
process.load('Configuration.StandardSequences.EndOfProcess_cff')
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')

process.maxEvents = cms.untracked.PSet(
    input = cms.untracked.int32(5021)
)

# Input source
process.source = cms.Source("EmptySource")

process.options = cms.untracked.PSet(

)

# Production Info
process.configurationMetadata = cms.untracked.PSet(
    annotation = cms.untracked.string('Configuration/GenProduction/python/EXO-RunIISummer20UL16GEN-01608-fragment.py nevts:5021'),
    name = cms.untracked.string('Applications'),
    version = cms.untracked.string('$Revision: 1.19 $')
)

# Output definition

process.RAWSIMoutput = cms.OutputModule("PoolOutputModule",
    SelectEvents = cms.untracked.PSet(
        SelectEvents = cms.vstring('generation_step')
    ),
    compressionAlgorithm = cms.untracked.string('LZMA'),
    compressionLevel = cms.untracked.int32(1),
    dataset = cms.untracked.PSet(
        dataTier = cms.untracked.string('GEN'),
        filterName = cms.untracked.string('')
    ),
    eventAutoFlushCompressedSize = cms.untracked.int32(20971520),
    fileName = cms.untracked.string('file:EXO-RunIISummer20UL16GEN-01608.root'),
    outputCommands = process.RAWSIMEventContent.outputCommands,
    splitLevel = cms.untracked.int32(0)
)

# Additional output definition

# Other statements
process.genstepfilter.triggerConditions=cms.vstring("generation_step")
from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag(process.GlobalTag, '106X_mcRun2_asymptotic_v13', '')

process.generator = cms.EDFilter("Pythia8ConcurrentGeneratorFilter",
    PythiaParameters = cms.PSet(
        parameterSets = cms.vstring(
            'pythia8CommonSettings', 
            'pythia8CP5Settings', 
            'pythia8PSweightsSettings', 
            'processParameters'
        ),
        processParameters = cms.vstring(
            'HiggsSM:all = on', 
            '25:onMode = off', 
            '25:m0 = 1000', 
            '25:addChannel = 1 0.0 0 4900001 -4900001', 
            '25:76:bRatio = 1.0', 
            '25:76:meMode = 100', 
            '25:onIfAny = 4900001', 
            '25:mMin = 1000', 
            '25:mWidth = 10', 
            '4900001:oneChannel = 1 1.0 100 4900022 4900004', 
            '4900003:oneChannel = 1 1.0 100 4900022 4900022', 
            '4900001:m0 = 50.0', 
            '4900002:m0 = 0.1', 
            '4900003:m0 = 4.5', 
            '4900004:m0 = 2.0', 
            '4900001:spinType = 2', 
            '4900002:spinType = 1', 
            '4900003:spinType = 1', 
            '4900004:spinType = 2', 
            '4900001:chargeType = 0', 
            '4900002:chargeType = 0', 
            '4900003:chargeType = 0', 
            '4900004:chargeType = 0', 
            '4900001:colType = 0', 
            '4900002:colType = 0', 
            '4900003:colType = 0', 
            '4900004:colType = 0', 
            '4900001:name = darkPseudoScalar', 
            '4900002:name = darkLightHiggs', 
            '4900003:name = darkHeavyHiggs', 
            '4900004:name = darkFermion', 
            '4900001:antiname = darkPseudoScalarBar', 
            '4900002:antiname = darkLightHiggsBar', 
            '4900003:antiname = darkHeavyHiggsBar', 
            '4900004:antiname = darkFermionBar', 
            '4900005:m0 = 1000000', 
            '4900006:m0 = 1000000', 
            '4900011:m0 = 1000000', 
            '4900012:m0 = 1000000', 
            '4900013:m0 = 1000000', 
            '4900014:m0 = 1000000', 
            '4900015:m0 = 1000000', 
            '4900016:m0 = 1000000', 
            '4900021:m0 = 1000000', 
            '4900023:m0 = 1000000', 
            '4900101:m0 = 1000000', 
            '4900111:m0 = 1000000', 
            '4900113:m0 = 1000000', 
            '4900211:m0 = 1000000', 
            '4900213:m0 = 1000000', 
            '4900991:m0 = 1000000', 
            '4900022:mayDecay = true', 
            '4900001:mayDecay = true', 
            '4900002:mayDecay = off', 
            '4900004:mayDecay = off', 
            '4900022:m0 = 0.25', 
            '4900022:mWidth = 1.0', 
            '4900022:isResonance = true', 
            '4900022:tau0 = 1.97327e-13', 
            '4900004:isResonance = false', 
            '4900004:mWidth = 0.0', 
            '4900004:mMin = 0.0', 
            '4900004:mMax = 0.0', 
            '4900004:tau0 = 1.97327e-3', 
            'HiddenValley:Ngauge = 1', 
            'HiddenValley:doKinMix = on', 
            'HiddenValley:FSR = on', 
            'HiddenValley:alphaFSR = 0', 
            '4900022:oneChannel = 1 0.579822 103 11 -11', 
            '4900022:addChannel = 1 0.420178 103 13 -13', 
            '4900022:addChannel = 1 0 103 15 -15', 
            '4900022:addChannel = 1 0 103 211 -211', 
            '4900022:addChannel = 1 0 103 321 -321', 
            '4900022:addChannel = 1 0 103 311 -311', 
            '4900022:addChannel = 1 0 103 111 22', 
            '4900022:addChannel = 1 0 103 221 22', 
            '4900022:addChannel = 1 0 103 111 111 22', 
            '4900022:addChannel = 1 0 103 211 -211 111', 
            '4900022:addChannel = 1 0 103 111 321 -321', 
            '4900022:addChannel = 1 0 103 310 -321 211', 
            '4900022:addChannel = 1 0 103 310 321 -211', 
            '4900022:addChannel = 1 0 103 211 -211 111 111', 
            '4900022:addChannel = 1 0 103 211 -211 211 -211', 
            '4900022:addChannel = 1 0 103 321 -321 211 -211', 
            '4900022:addChannel = 1 0 103 22 22 211 -211', 
            '4900022:addChannel = 1 0 103 211 -211 211 -211 111', 
            '4900022:addChannel = 1 0 103 211 -211 111 111 111', 
            '4900022:addChannel = 1 0 103 211 -211 211 -211 211 -211', 
            '4900022:addChannel = 1 0 103 211 -211 211 -211 111 111', 
            '4900022:addChannel = 1 0 103 1 -1', 
            '4900022:addChannel = 1 0 103 2 -2', 
            '4900022:addChannel = 1 0 103 3 -3', 
            '4900022:addChannel = 1 0 103 4 -4', 
            '4900022:addChannel = 1 0 103 5 -5'
        ),
        pythia8CP5Settings = cms.vstring(
            'Tune:pp 14', 
            'Tune:ee 7', 
            'MultipartonInteractions:ecmPow=0.03344', 
            'MultipartonInteractions:bProfile=2', 
            'MultipartonInteractions:pT0Ref=1.41', 
            'MultipartonInteractions:coreRadius=0.7634', 
            'MultipartonInteractions:coreFraction=0.63', 
            'ColourReconnection:range=5.176', 
            'SigmaTotal:zeroAXB=off', 
            'SpaceShower:alphaSorder=2', 
            'SpaceShower:alphaSvalue=0.118', 
            'SigmaProcess:alphaSvalue=0.118', 
            'SigmaProcess:alphaSorder=2', 
            'MultipartonInteractions:alphaSvalue=0.118', 
            'MultipartonInteractions:alphaSorder=2', 
            'TimeShower:alphaSorder=2', 
            'TimeShower:alphaSvalue=0.118', 
            'SigmaTotal:mode = 0', 
            'SigmaTotal:sigmaEl = 21.89', 
            'SigmaTotal:sigmaTot = 100.309', 
            'PDF:pSet=LHAPDF6:NNPDF31_nnlo_as_0118'
        ),
        pythia8CommonSettings = cms.vstring(
            'Tune:preferLHAPDF = 2', 
            'Main:timesAllowErrors = 10000', 
            'Check:epTolErr = 0.01', 
            'Beams:setProductionScalesFromLHEF = off', 
            'SLHA:keepSM = on', 
            'SLHA:minMassSM = 1000.', 
            'ParticleDecays:limitTau0 = on', 
            'ParticleDecays:tau0Max = 10', 
            'ParticleDecays:allowPhotonRadiation = on'
        ),
        pythia8PSweightsSettings = cms.vstring(
            'UncertaintyBands:doVariations = on', 
            'UncertaintyBands:List = {isrRedHi isr:muRfac=0.707,fsrRedHi fsr:muRfac=0.707,isrRedLo isr:muRfac=1.414,fsrRedLo fsr:muRfac=1.414,isrDefHi isr:muRfac=0.5,fsrDefHi fsr:muRfac=0.5,isrDefLo isr:muRfac=2.0,fsrDefLo fsr:muRfac=2.0,isrConHi isr:muRfac=0.25,fsrConHi fsr:muRfac=0.25,isrConLo isr:muRfac=4.0,fsrConLo fsr:muRfac=4.0,fsr_G2GG_muR_dn fsr:G2GG:muRfac=0.5,fsr_G2GG_muR_up fsr:G2GG:muRfac=2.0,fsr_G2QQ_muR_dn fsr:G2QQ:muRfac=0.5,fsr_G2QQ_muR_up fsr:G2QQ:muRfac=2.0,fsr_Q2QG_muR_dn fsr:Q2QG:muRfac=0.5,fsr_Q2QG_muR_up fsr:Q2QG:muRfac=2.0,fsr_X2XG_muR_dn fsr:X2XG:muRfac=0.5,fsr_X2XG_muR_up fsr:X2XG:muRfac=2.0,fsr_G2GG_cNS_dn fsr:G2GG:cNS=-2.0,fsr_G2GG_cNS_up fsr:G2GG:cNS=2.0,fsr_G2QQ_cNS_dn fsr:G2QQ:cNS=-2.0,fsr_G2QQ_cNS_up fsr:G2QQ:cNS=2.0,fsr_Q2QG_cNS_dn fsr:Q2QG:cNS=-2.0,fsr_Q2QG_cNS_up fsr:Q2QG:cNS=2.0,fsr_X2XG_cNS_dn fsr:X2XG:cNS=-2.0,fsr_X2XG_cNS_up fsr:X2XG:cNS=2.0,isr_G2GG_muR_dn isr:G2GG:muRfac=0.5,isr_G2GG_muR_up isr:G2GG:muRfac=2.0,isr_G2QQ_muR_dn isr:G2QQ:muRfac=0.5,isr_G2QQ_muR_up isr:G2QQ:muRfac=2.0,isr_Q2QG_muR_dn isr:Q2QG:muRfac=0.5,isr_Q2QG_muR_up isr:Q2QG:muRfac=2.0,isr_X2XG_muR_dn isr:X2XG:muRfac=0.5,isr_X2XG_muR_up isr:X2XG:muRfac=2.0,isr_G2GG_cNS_dn isr:G2GG:cNS=-2.0,isr_G2GG_cNS_up isr:G2GG:cNS=2.0,isr_G2QQ_cNS_dn isr:G2QQ:cNS=-2.0,isr_G2QQ_cNS_up isr:G2QQ:cNS=2.0,isr_Q2QG_cNS_dn isr:Q2QG:cNS=-2.0,isr_Q2QG_cNS_up isr:Q2QG:cNS=2.0,isr_X2XG_cNS_dn isr:X2XG:cNS=-2.0,isr_X2XG_cNS_up isr:X2XG:cNS=2.0}', 
            'UncertaintyBands:nFlavQ = 4', 
            'UncertaintyBands:MPIshowers = on', 
            'UncertaintyBands:overSampleFSR = 10.0', 
            'UncertaintyBands:overSampleISR = 10.0', 
            'UncertaintyBands:FSRpTmin2Fac = 20', 
            'UncertaintyBands:ISRpTmin2Fac = 1'
        )
    ),
    comEnergy = cms.double(13000),
    filterEfficiency = cms.untracked.double(1.0),
    maxEventsToPrint = cms.untracked.int32(1),
    pythiaHepMCVerbosity = cms.untracked.bool(False),
    pythiaPylistVerbosity = cms.untracked.int32(1)
)


# Path and EndPath definitions
process.generation_step = cms.Path(process.pgen)
process.genfiltersummary_step = cms.EndPath(process.genFilterSummary)
process.endjob_step = cms.EndPath(process.endOfProcess)
process.RAWSIMoutput_step = cms.EndPath(process.RAWSIMoutput)

# Schedule definition
process.schedule = cms.Schedule(process.generation_step,process.genfiltersummary_step,process.endjob_step,process.RAWSIMoutput_step)
from PhysicsTools.PatAlgos.tools.helpers import associatePatAlgosToolsTask
associatePatAlgosToolsTask(process)
# filter all path with the production filter sequence
for path in process.paths:
	getattr(process,path).insert(0, process.generator)

# customisation of the process.

# Automatic addition of the customisation function from Configuration.DataProcessing.Utils
from Configuration.DataProcessing.Utils import addMonitoring 

#call to customisation function addMonitoring imported from Configuration.DataProcessing.Utils
process = addMonitoring(process)

# End of customisation functions

# Customisation from command line

# Add early deletion of temporary data products to reduce peak memory need
from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete
process = customiseEarlyDelete(process)
# End adding early deletion
