Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 ###############################################################################
0002 # Way to use this:
0003 #   cmsRun runHGCalTestDDD_cfg.py type=V17
0004 #
0005 #   Options for type V16, V17, V17n, V17ng, V18, V18n, V18ng
0006 #
0007 ###############################################################################
0008 import FWCore.ParameterSet.Config as cms
0009 import os, sys, imp, re
0010 import FWCore.ParameterSet.VarParsing as VarParsing
0011 
0012 ####################################################################
0013 ### SETUP OPTIONS
0014 options = VarParsing.VarParsing('standard')
0015 options.register('type',
0016                  "V17",
0017                   VarParsing.VarParsing.multiplicity.singleton,
0018                   VarParsing.VarParsing.varType.string,
0019                   "type of operations: V16, V17, V17n, V17ng, V18, V18n, V18ng")
0020 
0021 ### get and parse the command line arguments
0022 options.parseArguments()
0023 print(options)
0024 
0025 if (options.type === "V18"):
0026     from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0027     process = cms.Process("HGCalTest",Phase2C22I13M9)
0028 elif (options.type === "V18n"):
0029     from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0030     process = cms.Process("HGCalTest",Phase2C22I13M9)
0031 elif (options.type === "V18ng"):
0032     from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0033     process = cms.Process("HGCalTest",Phase2C22I13M9)
0034 else:
0035     from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
0036     process = cms.Process("HGCalTest",Phase2C17I13M9)
0037 
0038 geomFile = "Geometry.HGCalCommonData.testHGCal" + options.type + "XML_cfi"
0039 outFile = "file:step1" + options.type + "DDD.root"
0040 print("Geometry file: ", geomFile)
0041 print("Output file: ", outFile)
0042 
0043 # import of standard configurations
0044 process.load(geomFile)
0045 process.load('Configuration.StandardSequences.Services_cff')
0046 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0047 process.load('FWCore.MessageService.MessageLogger_cfi')
0048 process.load('Configuration.EventContent.EventContent_cff')
0049 process.load('SimGeneral.MixingModule.mixNoPU_cfi')
0050 process.load('Geometry.EcalCommonData.ecalSimulationParameters_cff')
0051 process.load('Geometry.HcalCommonData.hcalDDDSimConstants_cff')
0052 process.load('Geometry.HGCalCommonData.hgcalParametersInitialization_cfi')
0053 process.load('Geometry.HGCalCommonData.hgcalNumberingInitialization_cfi')
0054 process.load('Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cff')
0055 process.load('SLHCUpgradeSimulations.Geometry.fakePhase2OuterTrackerConditions_cff')
0056 process.load('Geometry.MuonNumbering.muonGeometryConstants_cff')
0057 process.load('Geometry.MuonNumbering.muonOffsetESProducer_cff')
0058 process.load('Geometry.MTDNumberingBuilder.mtdNumberingGeometry_cff')
0059 process.load('Configuration.StandardSequences.MagneticField_cff')
0060 process.load('Configuration.StandardSequences.Generator_cff')
0061 process.load('IOMC.EventVertexGenerators.VtxSmearedHLLHC14TeV_cfi')
0062 process.load('GeneratorInterface.Core.genFilterSummary_cff')
0063 process.load('Configuration.StandardSequences.SimIdeal_cff')
0064 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0065 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0066 
0067 if 'MessageLogger' in process.__dict__:
0068     process.MessageLogger.HGCSim=dict()
0069 #   process.MessageLogger.CaloSim=dict()
0070 
0071 process.maxEvents = cms.untracked.PSet(
0072     input = cms.untracked.int32(100),
0073     output = cms.optional.untracked.allowed(cms.int32,cms.PSet)
0074 )
0075 
0076 process.Timing = cms.Service("Timing")
0077 
0078 # Input source
0079 process.source = cms.Source("EmptySource")
0080 
0081 process.options = cms.untracked.PSet(
0082     IgnoreCompletely = cms.untracked.vstring(),
0083     Rethrow = cms.untracked.vstring(),
0084     TryToContinue = cms.untracked.vstring(),
0085     allowUnscheduled = cms.obsolete.untracked.bool,
0086     canDeleteEarly = cms.untracked.vstring(),
0087     deleteNonConsumedUnscheduledModules = cms.untracked.bool(True),
0088     emptyRunLumiMode = cms.obsolete.untracked.string,
0089     eventSetup = cms.untracked.PSet(
0090         forceNumberOfConcurrentIOVs = cms.untracked.PSet(
0091             allowAnyLabel_=cms.required.untracked.uint32
0092         ),
0093         numberOfConcurrentIOVs = cms.untracked.uint32(1)
0094     ),
0095     fileMode = cms.untracked.string('FULLMERGE'),
0096     forceEventSetupCacheClearOnNewRun = cms.untracked.bool(False),
0097     makeTriggerResults = cms.obsolete.untracked.bool,
0098     numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(1),
0099     numberOfConcurrentRuns = cms.untracked.uint32(1),
0100     numberOfStreams = cms.untracked.uint32(0),
0101     numberOfThreads = cms.untracked.uint32(1),
0102     printDependencies = cms.untracked.bool(False),
0103     sizeOfStackForThreadsInKB = cms.optional.untracked.uint32,
0104     throwIfIllegalParameter = cms.untracked.bool(True),
0105     wantSummary = cms.untracked.bool(False)
0106 )
0107 
0108 # Production Info
0109 process.configurationMetadata = cms.untracked.PSet(
0110     annotation = cms.untracked.string('single pi E 1000'),
0111     name = cms.untracked.string('Applications'),
0112     version = cms.untracked.string('$Revision: 1.19 $')
0113 )
0114 
0115 # Output definition
0116 
0117 process.FEVTDEBUGoutput = cms.OutputModule("PoolOutputModule",
0118     SelectEvents = cms.untracked.PSet(
0119         SelectEvents = cms.vstring('generation_step')
0120     ),
0121     dataset = cms.untracked.PSet(
0122         dataTier = cms.untracked.string('GEN-SIM'),
0123         filterName = cms.untracked.string('')
0124     ),
0125     fileName = cms.untracked.string(outFile),
0126     outputCommands = process.FEVTDEBUGEventContent.outputCommands,
0127     splitLevel = cms.untracked.int32(0)
0128 )
0129 
0130 # Additional output definition
0131 
0132 # Other statements
0133 process.genstepfilter.triggerConditions=cms.vstring("generation_step")
0134 from Configuration.AlCa.GlobalTag import GlobalTag
0135 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T21', '')
0136 
0137 process.generator = cms.EDProducer("FlatRandomEGunProducer",
0138     PGunParameters = cms.PSet(
0139         PartID = cms.vint32(211),
0140         MinEta = cms.double(1.48),
0141         MaxEta = cms.double(3.01),
0142         MinPhi = cms.double(-3.14159265359),
0143         MaxPhi = cms.double(3.14159265359),
0144         MinE = cms.double(999.99),
0145         MaxE = cms.double(1000.01)
0146     ),
0147     Verbosity = cms.untracked.int32(0), ## set to 1 (or greater)  for printouts
0148     psethack = cms.string('single pi E 1000'),
0149     AddAntiParticle = cms.bool(True),
0150     firstRun = cms.untracked.uint32(1)
0151 )
0152 
0153 process.ProductionFilterSequence = cms.Sequence(process.generator)
0154 
0155 # Path and EndPath definitions
0156 process.generation_step = cms.Path(process.pgen)
0157 process.simulation_step = cms.Path(process.psim)
0158 process.genfiltersummary_step = cms.EndPath(process.genFilterSummary)
0159 process.endjob_step = cms.EndPath(process.endOfProcess)
0160 process.FEVTDEBUGoutput_step = cms.EndPath(process.FEVTDEBUGoutput)
0161 
0162 # Schedule definition
0163 process.schedule = cms.Schedule(process.generation_step,process.genfiltersummary_step,process.simulation_step,process.endjob_step,process.FEVTDEBUGoutput_step)
0164 from PhysicsTools.PatAlgos.tools.helpers import associatePatAlgosToolsTask
0165 associatePatAlgosToolsTask(process)
0166 # filter all path with the production filter sequence
0167 for path in process.paths:
0168     getattr(process,path).insert(0, process.ProductionFilterSequence)
0169 
0170 
0171 
0172 # Customisation from command line
0173 
0174 # Add early deletion of temporary data products to reduce peak memory need
0175 from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete
0176 process = customiseEarlyDelete(process)
0177 # End adding early deletion