Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:30:25

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_2018)
0008 
0009 # import of standard configurations
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.VtxSmearedRealistic50ns13TeVCollision_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.GeometryExtended2018_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(315252),                # 2018A
0036                 firstTime = cms.untracked.uint64(6548822380385402880)
0037                 #firstRun = cms.untracked.uint32(319337),               # 2018C
0038                 #firstTime = cms.untracked.uint64(6575656846424539136)
0039                 #firstRun = cms.untracked.uint32(323363),               # 2018D
0040                 #firstTime = cms.untracked.uint64(6604361306864615424)  
0041                 #firstRun = cms.untracked.uint32(324612),               #2018D
0042                 #firstTime = cms.untracked.uint64(6612348794983940096)  
0043 )
0044 """
0045 
0046 
0047 process.options = cms.untracked.PSet()
0048 
0049 from Configuration.AlCa.GlobalTag import GlobalTag
0050 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2018_realistic', '')
0051 
0052 
0053 # generator
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_SIM2018.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 # filter all path with the production filter sequence
0099 for path in process.paths:
0100     getattr(process,path)._seq = process.ProductionFilterSequence * getattr(process,path)._seq
0101