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_2017)
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.VtxSmearedRealistic25ns13TeVEarly2017Collision_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 process.load('Configuration.Geometry.GeometryExtended2017_CTPPS_cff')
0023 
0024 process.RandomNumberGeneratorService.generator.initialSeed = cms.untracked.uint32(random.randint(0,900000000))
0025 
0026 nEvent_ = 1000
0027 process.maxEvents = cms.untracked.PSet(
0028         input = cms.untracked.int32(nEvent_)
0029         )
0030 
0031 process.source = cms.Source("EmptySource")
0032 """
0033 process.source = cms.Source("EmptySource",
0034                 firstRun = cms.untracked.uint32(297046),  # 2017B data
0035                 firstTime = cms.untracked.uint64(6432299367889108992)
0036                 #firstRun = cms.untracked.uint32(298653),  # 2017B data
0037                 #firstTime = cms.untracked.uint64(6440921708009357312)
0038                 #firstRun = cms.untracked.uint32(303719),  # 2017E data
0039                 #firstTime = cms.untracked.uint64(6468633270794846208)
0040                 #firstRun = cms.untracked.uint32(306896),  # 2017H data
0041                 #firstTime = cms.untracked.uint64(6490831126364422144)
0042 )
0043 """
0044 
0045 process.options = cms.untracked.PSet()
0046 
0047 
0048 from Configuration.AlCa.GlobalTag import GlobalTag
0049 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2017_realistic', '')
0050 
0051 # generator
0052 
0053 phi_min = -math.pi
0054 phi_max = math.pi
0055 t_min   = 0.
0056 t_max   = 2.
0057 xi_min  = 0.02
0058 xi_max  = 0.20
0059 ecms = 13000.
0060 
0061 process.generator = cms.EDProducer("RandomtXiGunProducer",
0062         PGunParameters = cms.PSet(
0063             PartID = cms.vint32(2212),
0064             MinPhi = cms.double(phi_min),
0065             MaxPhi = cms.double(phi_max),
0066             ECMS   = cms.double(ecms),
0067             Mint   = cms.double(t_min),
0068             Maxt   = cms.double(t_max),
0069             MinXi  = cms.double(xi_min),
0070             MaxXi  = cms.double(xi_max)
0071             ),
0072         Verbosity = cms.untracked.int32(0),
0073         psethack = cms.string('single protons'),
0074         FireBackward = cms.bool(True),
0075         FireForward  = cms.bool(True),
0076         firstRun = cms.untracked.uint32(1),
0077         )
0078 
0079 
0080 process.ProductionFilterSequence = cms.Sequence(process.generator)
0081 
0082 ############
0083 process.o1 = cms.OutputModule("PoolOutputModule",
0084         outputCommands = cms.untracked.vstring('keep *'),
0085         fileName = cms.untracked.string('step1_SIM2017.root')
0086         )
0087 
0088 process.generation_step = cms.Path(process.pgen)
0089 process.simulation_step = cms.Path(process.psim)
0090 process.genfiltersummary_step = cms.EndPath(process.genFilterSummary)
0091 process.outpath = cms.EndPath(process.o1)
0092 process.schedule = cms.Schedule(process.generation_step,process.genfiltersummary_step,process.simulation_step,process.outpath)
0093 
0094 # filter all path with the production filter sequence
0095 for path in process.paths:
0096     getattr(process,path)._seq = process.ProductionFilterSequence * getattr(process,path)._seq
0097