Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 import FWCore.ParameterSet.Config as cms
0002 import math
0003 
0004 process = cms.Process("RPDigiProducerTest")
0005 
0006 # Specify the maximum events to simulate
0007 process.maxEvents = cms.untracked.PSet(
0008     input = cms.untracked.int32(10)
0009 )
0010 
0011 # Configure the output module (save the result in a file)
0012 # Configure the output module
0013 process.o1 = cms.OutputModule("PoolOutputModule",
0014     fileName = cms.untracked.string('file:RPDigiProducerTest_output.root')
0015 )
0016 
0017 
0018 process.load("SimGeneral.HepPDTESSource.pdt_cfi")
0019 
0020 
0021 ################## STEP 1
0022 process.source = cms.Source("EmptySource")
0023 
0024 ################## STEP 2 - process.generator
0025 process.load('Configuration.StandardSequences.Generator_cff')
0026 process.load('GeneratorInterface.Core.genFilterSummary_cff')
0027 process.load("IOMC.RandomEngine.IOMC_cff")
0028 process.RandomNumberGeneratorService.generator.initialSeed = 456789
0029 process.RandomNumberGeneratorService.g4SimHits.initialSeed = 9876
0030 process.RandomNumberGeneratorService.VtxSmeared.initialSeed = 123456789
0031 process.RandomNumberGeneratorService.LHCTransport.engineName   = cms.untracked.string('TRandom3')
0032 phi_min = -math.pi
0033 phi_max = math.pi
0034 t_min = 0.
0035 t_max = 2.0
0036 xi_min = 0.01
0037 xi_max = 0.2
0038 ecms = 13000.
0039 process.generator = cms.EDProducer("RandomtXiGunProducer",
0040         PGunParameters = cms.PSet(
0041             PartID = cms.vint32(2212),
0042             MinPhi = cms.double(phi_min),
0043             MaxPhi = cms.double(phi_max),
0044             ECMS   = cms.double(ecms),
0045             Mint   = cms.double(t_min),
0046             Maxt   = cms.double(t_max),
0047             MinXi  = cms.double(xi_min),
0048             MaxXi  = cms.double(xi_max)
0049             ),
0050         Verbosity = cms.untracked.int32(0),
0051         psethack = cms.string('single protons'),
0052         FireBackward = cms.bool(True),
0053         FireForward  = cms.bool(True),
0054         firstRun = cms.untracked.uint32(1),
0055         )
0056 
0057 process.ProductionFilterSequence = cms.Sequence(process.generator)
0058 
0059 ################## STEP 3 process.SmearingGenerator
0060 
0061 # declare optics parameters
0062 
0063 # Smearing
0064 process.load('IOMC.EventVertexGenerators.VtxSmearedRealistic25ns13TeVEarly2017Collision_cfi')
0065 
0066 ################## STEP 4 process.OptInfo
0067 
0068 
0069 ################## STEP 5 process.*process.g4SimHits
0070 
0071 # Magnetic Field, by default we have 3.8T
0072 process.load('Configuration.StandardSequences.SimIdeal_cff')
0073 process.load("Configuration.StandardSequences.MagneticField_cff")
0074 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0075 from Configuration.AlCa.GlobalTag import GlobalTag
0076 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2017_realistic', '')
0077 process.load('PhysicsTools.HepMCCandAlgos.genParticles_cfi')
0078 
0079 # G4 simulation & proton transport
0080 
0081 from Geometry.VeryForwardGeometry.geometryPPS_CMSxz_fromDD_2017_cfi import XMLIdealGeometryESSource_CTPPS
0082 process.XMLIdealGeometryESSource = XMLIdealGeometryESSource_CTPPS.clone()
0083 
0084 process.load("SimG4Core.Application.g4SimHits_cfi")
0085 
0086 process.g4SimHits.Generator.HepMCProductLabel = 'LHCTransport'    # The input source for G4 module is connected to "process.source".
0087 
0088 ################## STEP 6 process.mix*process.RPSiDetDigitizer 
0089 
0090 # No pile up for the mixing module
0091 process.load("SimGeneral.MixingModule.mixNoPU_cfi")
0092 
0093 ########################### DIGI+RECO RP ##########################################
0094 
0095 # process.load("SimPPS.RPDigiProducer.RPSiDetConf_cfi")
0096 process.generation_step = cms.Path(process.pgen)
0097 process.simulation_step = cms.Path(process.psim)
0098 process.g4Simhits_step = cms.Path(process.g4SimHits)
0099 
0100 
0101 process.simulation_step = cms.Path(process.psim)
0102 process.g4Simhits_step = cms.Path(process.g4SimHits)
0103 process.genfiltersummary_step = cms.EndPath(process.genFilterSummary)
0104 
0105 process.outpath = cms.EndPath(process.o1)
0106 
0107 process.schedule = cms.Schedule(process.generation_step,process.genfiltersummary_step,process.g4Simhits_step,process.outpath)
0108 
0109 # filter all path with the production filter sequence
0110 for path in process.paths:
0111     getattr(process,path)._seq = process.ProductionFilterSequence * getattr(process,path)._seq
0112 
0113 
0114 # print process.dumpConfig()
0115 from SimPPS.PPSSimTrackProducer.SimTrackProducerForFullSim_cff import customise
0116 process = customise(process)
0117