Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:15:26

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.VtxSmearedRealistic25ns13p6TeVEarly2022Collision_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     IgnoreCompletely = cms.untracked.vstring(),
0063     Rethrow = cms.untracked.vstring(),
0064     TryToContinue = cms.untracked.vstring(),
0065     allowUnscheduled = cms.obsolete.untracked.bool,
0066     canDeleteEarly = cms.untracked.vstring(),
0067     emptyRunLumiMode = cms.obsolete.untracked.string,
0068     eventSetup = cms.untracked.PSet(
0069         forceNumberOfConcurrentIOVs = cms.untracked.PSet(
0070 
0071         ),
0072         numberOfConcurrentIOVs = cms.untracked.uint32(1)
0073     ),
0074     fileMode = cms.untracked.string('FULLMERGE'),
0075     forceEventSetupCacheClearOnNewRun = cms.untracked.bool(False),
0076     makeTriggerResults = cms.obsolete.untracked.bool,
0077     numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(1),
0078     numberOfConcurrentRuns = cms.untracked.uint32(1),
0079     numberOfStreams = cms.untracked.uint32(0),
0080     numberOfThreads = cms.untracked.uint32(1),
0081     printDependencies = cms.untracked.bool(False),
0082     sizeOfStackForThreadsInKB = cms.optional.untracked.uint32,
0083     throwIfIllegalParameter = cms.untracked.bool(True),
0084     wantSummary = cms.untracked.bool(False)
0085 )
0086 
0087 # Production Info
0088 process.configurationMetadata = cms.untracked.PSet(
0089     annotation = cms.untracked.string('TTbar_14TeV_TuneCP5_cfi nevts:10'),
0090     name = cms.untracked.string('Applications'),
0091     version = cms.untracked.string('$Revision: 1.19 $')
0092 )
0093 
0094 # Output definition
0095 
0096 process.FEVTDEBUGoutput = cms.OutputModule("PoolOutputModule",
0097     SelectEvents = cms.untracked.PSet(
0098         SelectEvents = cms.vstring('generation_step')
0099     ),
0100     dataset = cms.untracked.PSet(
0101         dataTier = cms.untracked.string('GEN-SIM'),
0102         filterName = cms.untracked.string('')
0103     ),
0104     fileName = cms.untracked.string('file:ttbar21.root'),
0105     outputCommands = process.FEVTDEBUGEventContent.outputCommands,
0106     splitLevel = cms.untracked.int32(0)
0107 )
0108 
0109 # Additional output definition
0110 
0111 # Other statements
0112 process.genstepfilter.triggerConditions=cms.vstring("generation_step")
0113 from Configuration.AlCa.GlobalTag import GlobalTag
0114 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2022_realistic', '')
0115 
0116 process.load('Configuration.Generator.TTbar_14TeV_TuneCP5_cfi')
0117 process.ProductionFilterSequence = cms.Sequence(process.generator)
0118 
0119 # Path and EndPath definitions
0120 process.generation_step = cms.Path(process.pgen)
0121 process.simulation_step = cms.Path(process.psim)
0122 process.genfiltersummary_step = cms.EndPath(process.genFilterSummary)
0123 process.endjob_step = cms.EndPath(process.endOfProcess)
0124 process.FEVTDEBUGoutput_step = cms.EndPath(process.FEVTDEBUGoutput)
0125 
0126 # Schedule definition
0127 process.schedule = cms.Schedule(process.generation_step,process.genfiltersummary_step,process.simulation_step,process.endjob_step,process.FEVTDEBUGoutput_step)
0128 from PhysicsTools.PatAlgos.tools.helpers import associatePatAlgosToolsTask
0129 associatePatAlgosToolsTask(process)
0130 # filter all path with the production filter sequence
0131 for path in process.paths:
0132     getattr(process,path).insert(0, process.ProductionFilterSequence)
0133 
0134 
0135 
0136 # Customisation from command line
0137 
0138 # Add early deletion of temporary data products to reduce peak memory need
0139 from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete
0140 process = customiseEarlyDelete(process)
0141 # End adding early deletion