text: import FWCore.ParameterSet.Config as cms
  import FWCore.ParameterSet.VarParsing as VarParsing
  import os, sys, imp, re
  
  from Configuration.Eras.Era_Run3_cff import Run3
  process = cms.Process('SIM',Run3)
  
  ############################################################
  ### SETUP OPTIONS
  options = VarParsing.VarParsing('standard')
  options.register('geometry',
                   "Minus05",
                    VarParsing.VarParsing.multiplicity.singleton,
                    VarParsing.VarParsing.varType.string,
                    "geometry of operations: Minus05, Minus10, Plus05, Plus10")
  ### get and parse the command line arguments
  options.parseArguments()
  
  print(options)
  ############################################################
  # Use the options
  if (options.geometry == "Plus05"):
      process.load('Geometry.TrackerCommonData.cmsExtendedGeometry2021FlatPlus05PercentXML_cfi')
  elif (options.geometry == "Plus10"):
      process.load('Geometry.TrackerCommonData.cmsExtendedGeometry2021FlatPlus10PercentXML_cfi')
  elif (options.geometry == "Minus10"):
      process.load('Geometry.TrackerCommonData.cmsExtendedGeometry2021FlatMinus10PercentXML_cfi')
  else:
      process.load('Geometry.TrackerCommonData.cmsExtendedGeometry2021FlatMinus05PercentXML_cfi')
  
  # import of standard configurations
  process.load('Configuration.StandardSequences.Services_cff')
  process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
  process.load('FWCore.MessageService.MessageLogger_cfi')
  process.load('Configuration.EventContent.EventContent_cff')
  process.load('SimGeneral.MixingModule.mixNoPU_cfi')
  process.load('Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cfi')
  process.load('Geometry.EcalCommonData.ecalSimulationParameters_cff')
  process.load('Geometry.HcalCommonData.hcalDDDSimConstants_cff')
  process.load('Geometry.HcalCommonData.hcalDDDRecConstants_cfi')
  process.load('Geometry.MuonNumbering.muonGeometryConstants_cff')
  process.load('Configuration.StandardSequences.MagneticField_cff')
  process.load('Configuration.StandardSequences.Generator_cff')
  process.load('IOMC.EventVertexGenerators.VtxSmearedRun3RoundOptics25ns13TeVLowSigmaZ_cfi')
  process.load('GeneratorInterface.Core.genFilterSummary_cff')
  process.load('Configuration.StandardSequences.SimIdeal_cff')
  process.load('Configuration.StandardSequences.EndOfProcess_cff')
  process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
  
  process.maxEvents = cms.untracked.PSet(
      input = cms.untracked.int32(10),
      output = cms.optional.untracked.allowed(cms.int32,cms.PSet)
  )
  
  #if hasattr(process,'MessageLogger'):
  #    process.MessageLogger.SimG4CoreGeometry=dict()
  
  # Input source
  process.source = cms.Source("EmptySource")
  
  process.options = cms.untracked.PSet(
      FailPath = cms.untracked.vstring(),
      IgnoreCompletely = cms.untracked.vstring(),
      Rethrow = cms.untracked.vstring(),
      SkipEvent = cms.untracked.vstring(),
      allowUnscheduled = cms.obsolete.untracked.bool,
      canDeleteEarly = cms.untracked.vstring(),
      emptyRunLumiMode = cms.obsolete.untracked.string,
      eventSetup = cms.untracked.PSet(
          forceNumberOfConcurrentIOVs = cms.untracked.PSet(
  
          ),
          numberOfConcurrentIOVs = cms.untracked.uint32(1)
      ),
      fileMode = cms.untracked.string('FULLMERGE'),
      forceEventSetupCacheClearOnNewRun = cms.untracked.bool(False),
      makeTriggerResults = cms.obsolete.untracked.bool,
      numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(1),
      numberOfConcurrentRuns = cms.untracked.uint32(1),
      numberOfStreams = cms.untracked.uint32(0),
      numberOfThreads = cms.untracked.uint32(1),
      printDependencies = cms.untracked.bool(False),
      sizeOfStackForThreadsInKB = cms.optional.untracked.uint32,
      throwIfIllegalParameter = cms.untracked.bool(True),
      wantSummary = cms.untracked.bool(False)
  )
  
  # Production Info
  process.configurationMetadata = cms.untracked.PSet(
      annotation = cms.untracked.string('TTbar_14TeV_TuneCP5_cfi nevts:10'),
      name = cms.untracked.string('Applications'),
      version = cms.untracked.string('$Revision: 1.19 $')
  )
  
  # Output definition
  
  process.FEVTDEBUGoutput = cms.OutputModule("PoolOutputModule",
      SelectEvents = cms.untracked.PSet(
          SelectEvents = cms.vstring('generation_step')
      ),
      dataset = cms.untracked.PSet(
          dataTier = cms.untracked.string('GEN-SIM'),
          filterName = cms.untracked.string('')
      ),
      fileName = cms.untracked.string('file:ttbar21.root'),
      outputCommands = process.FEVTDEBUGEventContent.outputCommands,
      splitLevel = cms.untracked.int32(0)
  )
  
  # Additional output definition
  
  # Other statements
  process.genstepfilter.triggerConditions=cms.vstring("generation_step")
  from Configuration.AlCa.GlobalTag import GlobalTag
  process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2022_realistic', '')
  
  process.load('Configuration.Generator.TTbar_14TeV_TuneCP5_cfi')
  process.ProductionFilterSequence = cms.Sequence(process.generator)
  
  # Path and EndPath definitions
  process.generation_step = cms.Path(process.pgen)
  process.simulation_step = cms.Path(process.psim)
  process.genfiltersummary_step = cms.EndPath(process.genFilterSummary)
  process.endjob_step = cms.EndPath(process.endOfProcess)
  process.FEVTDEBUGoutput_step = cms.EndPath(process.FEVTDEBUGoutput)
  
  # Schedule definition
  process.schedule = cms.Schedule(process.generation_step,process.genfiltersummary_step,process.simulation_step,process.endjob_step,process.FEVTDEBUGoutput_step)
  from PhysicsTools.PatAlgos.tools.helpers import associatePatAlgosToolsTask
  associatePatAlgosToolsTask(process)
  # filter all path with the production filter sequence
  for path in process.paths:
  	getattr(process,path).insert(0, process.ProductionFilterSequence)
  
  
  
  # Customisation from command line
  
  # Add early deletion of temporary data products to reduce peak memory need
  from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete
  process = customiseEarlyDelete(process)
  # End adding early deletion
  