Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 10:04:03

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from Configuration.Eras.Era_Run2_2018_cff import Run2_2018
0004 process = cms.Process('SIM',Run2_2018)
0005 
0006 # import of standard configurations
0007 process.load('Configuration.StandardSequences.Services_cff')
0008 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0009 process.load('FWCore.MessageService.MessageLogger_cfi')
0010 process.load('Configuration.EventContent.EventContent_cff')
0011 process.load('SimGeneral.MixingModule.mixNoPU_cfi')
0012 process.load('Configuration.Geometry.GeometryExtended2018Reco_cff')
0013 process.load('Configuration.StandardSequences.MagneticField_cff')
0014 process.load('Configuration.StandardSequences.Generator_cff')
0015 process.load('IOMC.EventVertexGenerators.VtxSmearedRealistic25ns13TeVEarly2018Collision_cfi')
0016 process.load('GeneratorInterface.Core.genFilterSummary_cff')
0017 process.load('Configuration.StandardSequences.SimIdeal_cff')
0018 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0019 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0020 
0021 process.maxEvents = cms.untracked.PSet(
0022         input = cms.untracked.int32(100),
0023     output = cms.optional.untracked.allowed(cms.int32,cms.PSet)
0024 )
0025 
0026 if 'MessageLogger' in process.__dict__:
0027     process.MessageLogger.G4cout=dict()
0028     process.MessageLogger.G4cerr=dict()
0029     process.MessageLogger.ParticleGun=dict()
0030 
0031 # Input source
0032 process.source = cms.Source("EmptySource")
0033 
0034 process.options = cms.untracked.PSet(
0035     IgnoreCompletely = cms.untracked.vstring(),
0036     Rethrow = cms.untracked.vstring(),
0037     TryToContinue = cms.untracked.vstring(),
0038     allowUnscheduled = cms.obsolete.untracked.bool,
0039     canDeleteEarly = cms.untracked.vstring(),
0040     emptyRunLumiMode = cms.obsolete.untracked.string,
0041     eventSetup = cms.untracked.PSet(
0042         forceNumberOfConcurrentIOVs = cms.untracked.PSet(
0043 
0044         ),
0045         numberOfConcurrentIOVs = cms.untracked.uint32(1)
0046     ),
0047     fileMode = cms.untracked.string('FULLMERGE'),
0048     forceEventSetupCacheClearOnNewRun = cms.untracked.bool(False),
0049     makeTriggerResults = cms.obsolete.untracked.bool,
0050     numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(1),
0051     numberOfConcurrentRuns = cms.untracked.uint32(1),
0052     numberOfStreams = cms.untracked.uint32(0),
0053     numberOfThreads = cms.untracked.uint32(1),
0054     printDependencies = cms.untracked.bool(False),
0055     sizeOfStackForThreadsInKB = cms.optional.untracked.uint32,
0056     throwIfIllegalParameter = cms.untracked.bool(True),
0057     wantSummary = cms.untracked.bool(False)
0058 )
0059 
0060 # Production Info
0061 process.configurationMetadata = cms.untracked.PSet(
0062     annotation = cms.untracked.string('MultiParticlePGun nevts:1000'),
0063     name = cms.untracked.string('Applications'),
0064     version = cms.untracked.string('$Revision: 1.19 $')
0065 )
0066 
0067 # Output definition
0068 
0069 process.FEVTDEBUGoutput = cms.OutputModule("PoolOutputModule",
0070     SelectEvents = cms.untracked.PSet(
0071         SelectEvents = cms.vstring('generation_step')
0072     ),
0073     dataset = cms.untracked.PSet(
0074         dataTier = cms.untracked.string('GEN-SIM'),
0075         filterName = cms.untracked.string('')
0076     ),
0077     fileName = cms.untracked.string('file:step1.root'),
0078     outputCommands = process.FEVTDEBUGEventContent.outputCommands,
0079     splitLevel = cms.untracked.int32(0)
0080 )
0081 
0082 # Additional output definition
0083 
0084 # Other statements
0085 process.genstepfilter.triggerConditions=cms.vstring("generation_step")
0086 from Configuration.AlCa.GlobalTag import GlobalTag
0087 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2018_realistic', '')
0088 
0089 process.generator = cms.EDProducer("FileRandomMultiParticlePGunProducer",
0090     PGunParameters = cms.PSet(
0091         FileName = cms.FileInPath('SimG4CMS/Calo/data/tableProb2018.txt'),
0092         PartID    = cms.vint32(211,-211,321,-321,2212,-2212),
0093         MinEta    = cms.double(-2.3),
0094         MaxEta    = cms.double(2.3),
0095         MinPhi    = cms.double(-3.1415926),
0096         MaxPhi    = cms.double(3.1415926),
0097         MinP      = cms.double(1.0),
0098         MaxP      = cms.double(40.0)
0099     ),
0100     Verbosity       = cms.untracked.int32(1),
0101     AddAntiParticle = cms.bool(False),
0102     firstRun        = cms.untracked.uint32(1)
0103 )
0104 
0105 process.g4SimHits.Physics.type = 'SimG4Core/Physics/FTFP_BERT_EMM'
0106 process.ProductionFilterSequence = cms.Sequence(process.generator)
0107 
0108 # Path and EndPath definitions
0109 process.generation_step = cms.Path(process.pgen)
0110 process.simulation_step = cms.Path(process.psim)
0111 process.genfiltersummary_step = cms.EndPath(process.genFilterSummary)
0112 process.endjob_step = cms.EndPath(process.endOfProcess)
0113 process.FEVTDEBUGoutput_step = cms.EndPath(process.FEVTDEBUGoutput)
0114 
0115 # Schedule definition
0116 process.schedule = cms.Schedule(process.generation_step,process.genfiltersummary_step,process.simulation_step,process.endjob_step,process.FEVTDEBUGoutput_step)
0117 from PhysicsTools.PatAlgos.tools.helpers import associatePatAlgosToolsTask
0118 associatePatAlgosToolsTask(process)
0119 # filter all path with the production filter sequence
0120 for path in process.paths:
0121     getattr(process,path).insert(0, process.ProductionFilterSequence)
0122 
0123 
0124 
0125 # Customisation from command line
0126 
0127 # Add early deletion of temporary data products to reduce peak memory need
0128 from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete
0129 process = customiseEarlyDelete(process)
0130 # End adding early deletion