Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-06-07 22:22:57

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