Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-29 01:21:48

0001 import FWCore.ParameterSet.Config as cms
0002 from Configuration.Eras.Era_Run2_2016_cff import Run2_2016
0003 
0004 process = cms.Process("PROD",Run2_2016)
0005 process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
0006 process.load("IOMC.EventVertexGenerators.VtxSmearedFlat_cfi")
0007 process.load("Geometry.ForwardCommonData.totemTest2015_cff")
0008 process.load("Configuration.StandardSequences.MagneticField_cff")
0009 process.load("Configuration.EventContent.EventContent_cff")
0010 process.load('Configuration.StandardSequences.Generator_cff')
0011 process.load('Configuration.StandardSequences.SimIdeal_cff')
0012 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0013 from Configuration.AlCa.autoCond import autoCond
0014 process.GlobalTag.globaltag = autoCond['run2_mc']
0015 
0016 process.VtxSmeared.MinZ = -10.5
0017 process.VtxSmeared.MaxZ = -9.5
0018 
0019 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0020 if 'MessageLogger' in process.__dict__:
0021     process.MessageLogger.ForwardSim=dict()
0022     process.MessageLogger.SimG4FluxProducer=dict()
0023 
0024 process.load("IOMC.RandomEngine.IOMC_cff")
0025 process.RandomNumberGeneratorService.generator.initialSeed = 456789
0026 process.RandomNumberGeneratorService.g4SimHits.initialSeed = 9876
0027 process.RandomNumberGeneratorService.VtxSmeared.initialSeed = 123456789
0028 
0029 process.maxEvents = cms.untracked.PSet(
0030     input = cms.untracked.int32(500)
0031 )
0032 
0033 process.source = cms.Source("EmptySource",
0034     firstRun        = cms.untracked.uint32(1),
0035     firstEvent      = cms.untracked.uint32(1)
0036 )
0037 
0038 #process.generator = cms.EDProducer("FlatRandomPtGunProducer",
0039 #    PGunParameters = cms.PSet(
0040 #        PartID = cms.vint32(13),
0041 #        MinEta = cms.double(-6.5),
0042 #        MaxEta = cms.double(-2.5),
0043 #        MinPhi = cms.double(-3.14159265359),
0044 #        MaxPhi = cms.double(3.14159265359),
0045 #        MinPt  = cms.double(20.),
0046 #        MaxPt  = cms.double(20.)
0047 #    ),
0048 #    Verbosity       = cms.untracked.int32(0),
0049 #    AddAntiParticle = cms.bool(False)
0050 #)
0051 #process.load("SimG4CMS.Calo.PythiaMinBias_cfi")
0052 process.load("Configuration.Generator.MinBias_13TeV_pythia8_cff")
0053 
0054 process.output = cms.OutputModule("PoolOutputModule",
0055     process.FEVTSIMEventContent,
0056     fileName = cms.untracked.string('simevent.root')
0057 )
0058 
0059 process.TFileService = cms.Service("TFileService",
0060                                    fileName = cms.string('GenSim.root')
0061                                    )
0062 
0063 process.Timing = cms.Service("Timing")
0064 
0065 process.SimpleMemoryCheck = cms.Service("SimpleMemoryCheck",
0066     oncePerEventMode = cms.untracked.bool(True),
0067     showMallocInfo = cms.untracked.bool(True),
0068     dump = cms.untracked.bool(True),
0069     ignoreTotal = cms.untracked.int32(1)
0070 )
0071 
0072 process.load('SimG4CMS.Forward.SimG4FluxAnalyzer_cfi')
0073 
0074 process.generation_step = cms.Path(process.pgen)
0075 process.simulation_step = cms.Path(process.psim)
0076 process.analysis_step = cms.Path(process.SimG4FluxAnalyzer)
0077 #process.out_step = cms.EndPath(process.output)
0078 
0079 process.g4SimHits.Physics.type = 'SimG4Core/Physics/FTFP_BERT_EMM'
0080 process.g4SimHits.Watchers = cms.VPSet(cms.PSet(
0081                 SimG4FluxProducer = cms.PSet(
0082                         LVNames = cms.untracked.vstring('TotemT1Part1','TotemT1Part2','TotemT1Part3','TotemT2Part1','TotemT2Part2','TotemT2Part3'),
0083             LVTypes = cms.untracked.vint32(0,0,1,0,0,1)
0084                         ),
0085                 type = cms.string('SimG4FluxProducer'),
0086 ))
0087 
0088 # Schedule definition
0089 process.schedule = cms.Schedule(process.generation_step,
0090                                 process.simulation_step,
0091                 process.analysis_step,
0092 #                                process.out_step
0093                                 )
0094 
0095 # filter all path with the production filter sequence
0096 for path in process.paths:
0097         getattr(process,path)._seq = process.generator * getattr(process,path)._seq