File indexing completed on 2023-03-17 11:25:31
0001 import FWCore.ParameterSet.Config as cms
0002
0003 import random
0004 import math
0005
0006 from Configuration.StandardSequences.Eras import eras
0007 process = cms.Process('SIM',eras.Run2_2016)
0008
0009
0010 process.load("CondCore.CondDB.CondDB_cfi")
0011 process.load('Configuration.StandardSequences.Services_cff')
0012 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0013 process.load('FWCore.MessageService.MessageLogger_cfi')
0014 process.load('Configuration.EventContent.EventContent_cff')
0015 process.load('Configuration.StandardSequences.MagneticField_cff')
0016 process.load('Configuration.StandardSequences.Generator_cff')
0017 process.load('IOMC.EventVertexGenerators.VtxSmearedRealistic25ns13TeV2016Collision_cfi')
0018 process.load('GeneratorInterface.Core.genFilterSummary_cff')
0019 process.load('Configuration.StandardSequences.SimIdeal_cff')
0020 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0021 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0022
0023 process.load('Configuration.Geometry.GeometryExtended2016_CTPPS_cff')
0024
0025 process.RandomNumberGeneratorService.generator.initialSeed = cms.untracked.uint32(random.randint(0,900000000))
0026
0027 nEvent_ = 1000
0028 process.maxEvents = cms.untracked.PSet(
0029 input = cms.untracked.int32(nEvent_)
0030 )
0031
0032 process.source = cms.Source("EmptySource")
0033 """
0034 process.source = cms.Source("EmptySource",
0035 #firstRun = cms.untracked.uint32(306572), # 2016H data
0036 #firstTime = cms.untracked.uint64(6487615523004612608) # this is needed because it lacks the MC tag, run based
0037 #firstRun = cms.untracked.uint32(273730), # 2016H data
0038 #firstTime = cms.untracked.uint64(6286859745043152896) # this is needed because it lacks the MC tag, run based
0039 firstRun = cms.untracked.uint32(282730), # 2016H data
0040 firstTime = cms.untracked.uint64(6339435345951588352) # this is needed because it lacks the MC tag, run based
0041 )
0042 """
0043
0044 process.options = cms.untracked.PSet()
0045
0046
0047 from Configuration.AlCa.GlobalTag import GlobalTag
0048 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc', '')
0049
0050
0051
0052
0053
0054
0055 phi_min = -math.pi
0056 phi_max = math.pi
0057 t_min = 0.
0058 t_max = 2.
0059 xi_min = 0.02
0060 xi_max = 0.2
0061 ecms = 13000.
0062
0063 process.generator = cms.EDProducer("RandomtXiGunProducer",
0064 PGunParameters = cms.PSet(
0065 PartID = cms.vint32(2212),
0066 MinPhi = cms.double(phi_min),
0067 MaxPhi = cms.double(phi_max),
0068 ECMS = cms.double(ecms),
0069 Mint = cms.double(t_min),
0070 Maxt = cms.double(t_max),
0071 MinXi = cms.double(xi_min),
0072 MaxXi = cms.double(xi_max)
0073 ),
0074 Verbosity = cms.untracked.int32(0),
0075 psethack = cms.string('single protons'),
0076 FireBackward = cms.bool(True),
0077 FireForward = cms.bool(True),
0078 firstRun = cms.untracked.uint32(1),
0079 )
0080
0081
0082 process.ProductionFilterSequence = cms.Sequence(process.generator)
0083
0084
0085 process.o1 = cms.OutputModule("PoolOutputModule",
0086 outputCommands = cms.untracked.vstring('keep *'),
0087 fileName = cms.untracked.string('step1_SIM2016.root')
0088 )
0089
0090 process.generation_step = cms.Path(process.pgen)
0091 process.simulation_step = cms.Path(process.psim)
0092
0093
0094 process.genfiltersummary_step = cms.EndPath(process.genFilterSummary)
0095 process.outpath = cms.EndPath(process.o1)
0096 process.schedule = cms.Schedule(process.generation_step,process.genfiltersummary_step,process.simulation_step,process.outpath)
0097
0098
0099 for path in process.paths:
0100 getattr(process,path)._seq = process.ProductionFilterSequence * getattr(process,path)._seq
0101