Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 import FWCore.ParameterSet.Config as cms
0002 import FWCore.ParameterSet.VarParsing as VarParsing
0003 import os, sys, imp, re
0004 
0005 from Configuration.Eras.Era_Run3_cff import Run3
0006 process = cms.Process('SIM',Run3)
0007 
0008 ############################################################
0009 ### SETUP OPTIONS
0010 options = VarParsing.VarParsing('standard')
0011 options.register('geometry',
0012                  "Minus05",
0013                   VarParsing.VarParsing.multiplicity.singleton,
0014                   VarParsing.VarParsing.varType.string,
0015                   "geometry of operations: Minus05, Minus10, Plus05, Plus10")
0016 ### get and parse the command line arguments
0017 options.parseArguments()
0018 
0019 print(options)
0020 ############################################################
0021 # Use the options
0022 if (options.geometry == "Plus05"):
0023     process.load('Geometry.TrackerCommonData.cmsExtendedGeometry2021FlatPlus05PercentXML_cfi')
0024 elif (options.geometry == "Plus10"):
0025     process.load('Geometry.TrackerCommonData.cmsExtendedGeometry2021FlatPlus10PercentXML_cfi')
0026 elif (options.geometry == "Minus10"):
0027     process.load('Geometry.TrackerCommonData.cmsExtendedGeometry2021FlatMinus10PercentXML_cfi')
0028 else:
0029     process.load('Geometry.TrackerCommonData.cmsExtendedGeometry2021FlatMinus05PercentXML_cfi')
0030 
0031 # import of standard configurations
0032 process.load('Configuration.StandardSequences.Services_cff')
0033 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0034 process.load('FWCore.MessageService.MessageLogger_cfi')
0035 process.load('Configuration.EventContent.EventContent_cff')
0036 process.load('SimGeneral.MixingModule.mixNoPU_cfi')
0037 process.load('Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cfi')
0038 process.load('Geometry.EcalCommonData.ecalSimulationParameters_cff')
0039 process.load('Geometry.HcalCommonData.hcalDDDSimConstants_cff')
0040 process.load('Geometry.HcalCommonData.hcalDDDRecConstants_cfi')
0041 process.load('Geometry.MuonNumbering.muonGeometryConstants_cff')
0042 process.load('Configuration.StandardSequences.MagneticField_cff')
0043 process.load('Configuration.StandardSequences.Generator_cff')
0044 process.load('IOMC.EventVertexGenerators.VtxSmearedRun3RoundOptics25ns13TeVLowSigmaZ_cfi')
0045 process.load('GeneratorInterface.Core.genFilterSummary_cff')
0046 process.load('Configuration.StandardSequences.SimIdeal_cff')
0047 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0048 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0049 
0050 process.maxEvents = cms.untracked.PSet(
0051     input = cms.untracked.int32(10),
0052     output = cms.optional.untracked.allowed(cms.int32,cms.PSet)
0053 )
0054 
0055 #if hasattr(process,'MessageLogger'):
0056 #    process.MessageLogger.SimG4CoreGeometry=dict()
0057 
0058 # Input source
0059 process.source = cms.Source("EmptySource")
0060 
0061 process.options = cms.untracked.PSet(
0062     FailPath = cms.untracked.vstring(),
0063     IgnoreCompletely = cms.untracked.vstring(),
0064     Rethrow = cms.untracked.vstring(),
0065     SkipEvent = cms.untracked.vstring(),
0066     allowUnscheduled = cms.obsolete.untracked.bool,
0067     canDeleteEarly = cms.untracked.vstring(),
0068     emptyRunLumiMode = cms.obsolete.untracked.string,
0069     eventSetup = cms.untracked.PSet(
0070         forceNumberOfConcurrentIOVs = cms.untracked.PSet(
0071 
0072         ),
0073         numberOfConcurrentIOVs = cms.untracked.uint32(1)
0074     ),
0075     fileMode = cms.untracked.string('FULLMERGE'),
0076     forceEventSetupCacheClearOnNewRun = cms.untracked.bool(False),
0077     makeTriggerResults = cms.obsolete.untracked.bool,
0078     numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(1),
0079     numberOfConcurrentRuns = cms.untracked.uint32(1),
0080     numberOfStreams = cms.untracked.uint32(0),
0081     numberOfThreads = cms.untracked.uint32(1),
0082     printDependencies = cms.untracked.bool(False),
0083     sizeOfStackForThreadsInKB = cms.optional.untracked.uint32,
0084     throwIfIllegalParameter = cms.untracked.bool(True),
0085     wantSummary = cms.untracked.bool(False)
0086 )
0087 
0088 # Production Info
0089 process.configurationMetadata = cms.untracked.PSet(
0090     annotation = cms.untracked.string('TTbar_14TeV_TuneCP5_cfi nevts:10'),
0091     name = cms.untracked.string('Applications'),
0092     version = cms.untracked.string('$Revision: 1.19 $')
0093 )
0094 
0095 # Output definition
0096 
0097 process.FEVTDEBUGoutput = cms.OutputModule("PoolOutputModule",
0098     SelectEvents = cms.untracked.PSet(
0099         SelectEvents = cms.vstring('generation_step')
0100     ),
0101     dataset = cms.untracked.PSet(
0102         dataTier = cms.untracked.string('GEN-SIM'),
0103         filterName = cms.untracked.string('')
0104     ),
0105     fileName = cms.untracked.string('file:ttbar21.root'),
0106     outputCommands = process.FEVTDEBUGEventContent.outputCommands,
0107     splitLevel = cms.untracked.int32(0)
0108 )
0109 
0110 # Additional output definition
0111 
0112 # Other statements
0113 process.genstepfilter.triggerConditions=cms.vstring("generation_step")
0114 from Configuration.AlCa.GlobalTag import GlobalTag
0115 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2022_realistic', '')
0116 
0117 process.load('Configuration.Generator.TTbar_14TeV_TuneCP5_cfi')
0118 process.ProductionFilterSequence = cms.Sequence(process.generator)
0119 
0120 # Path and EndPath definitions
0121 process.generation_step = cms.Path(process.pgen)
0122 process.simulation_step = cms.Path(process.psim)
0123 process.genfiltersummary_step = cms.EndPath(process.genFilterSummary)
0124 process.endjob_step = cms.EndPath(process.endOfProcess)
0125 process.FEVTDEBUGoutput_step = cms.EndPath(process.FEVTDEBUGoutput)
0126 
0127 # Schedule definition
0128 process.schedule = cms.Schedule(process.generation_step,process.genfiltersummary_step,process.simulation_step,process.endjob_step,process.FEVTDEBUGoutput_step)
0129 from PhysicsTools.PatAlgos.tools.helpers import associatePatAlgosToolsTask
0130 associatePatAlgosToolsTask(process)
0131 # filter all path with the production filter sequence
0132 for path in process.paths:
0133     getattr(process,path).insert(0, process.ProductionFilterSequence)
0134 
0135 
0136 
0137 # Customisation from command line
0138 
0139 # Add early deletion of temporary data products to reduce peak memory need
0140 from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete
0141 process = customiseEarlyDelete(process)
0142 # End adding early deletion