Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-10-14 10:08:27

0001 ###############################################################################
0002 # Way to use this:
0003 #   cmsRun testHcalTopology_cfg.py type=2018
0004 #
0005 #   Options for type 2015, 2016, 2017, 2018, 2019, 2021, 2022, 2023, 2024
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                  "2018",
0017                   VarParsing.VarParsing.multiplicity.singleton,
0018                   VarParsing.VarParsing.varType.string,
0019                   "type of operations: 2015, 2016, 2017, 2018, 2019, 2021, 2022, 2023, 2024")
0020 
0021 ### get and parse the command line arguments
0022 options.parseArguments()
0023 
0024 geomFile = "Configuration.Geometry.GeometryExtended" + options.type + "Reco_cff"
0025 
0026 print(options)
0027 print("Geometry file: ", geomFile)
0028 
0029 ####################################################################
0030 # Use the options
0031 
0032 if (options.type == "2015"):
0033     from Configuration.Eras.Era_Run2_25ns_cff import Run2_25ns
0034     process = cms.Process('TestHcalTopology',Run2_25ns)
0035 elif (options.type == "2016"):
0036     from Configuration.Eras.Era_Run2_2016_cff import Run2_2016
0037     process = cms.Process('TestHcalTopology',Run2_2016)
0038 elif (options.type == "2017"):
0039     from Configuration.Eras.Era_Run2_2017_cff import Run2_2017
0040     process = cms.Process('TestHcalTopology',Run2_2017)
0041 elif (options.type == "2018"):
0042     from Configuration.Eras.Era_Run2_2018_cff import Run2_2018
0043     process = cms.Process('TestHcalTopology',Run2_2018)
0044 else:
0045     from Configuration.Eras.Era_Run3_DDD_cff import Run3_DDD
0046     process = cms.Process('TestHcalTopology',Run3_DDD)
0047 
0048 process.load("SimGeneral.HepPDTESSource.pdt_cfi")
0049 process.load(geomFile)
0050 process.load("Geometry.CaloTopology.hcalTopologyTester_cfi")
0051 process.load('FWCore.MessageService.MessageLogger_cfi')
0052 
0053 if hasattr(process,'MessageLogger'):
0054     process.MessageLogger.HCalGeom=dict()
0055 
0056 process.load("IOMC.RandomEngine.IOMC_cff")
0057 process.RandomNumberGeneratorService.generator.initialSeed = 456789
0058 
0059 process.source = cms.Source("EmptySource")
0060 
0061 process.generator = cms.EDProducer("FlatRandomEGunProducer",
0062     PGunParameters = cms.PSet(
0063         PartID = cms.vint32(14),
0064         MinEta = cms.double(-3.5),
0065         MaxEta = cms.double(3.5),
0066         MinPhi = cms.double(-3.14159265359),
0067         MaxPhi = cms.double(3.14159265359),
0068         MinE   = cms.double(9.99),
0069         MaxE   = cms.double(10.01)
0070     ),
0071     AddAntiParticle = cms.bool(False),
0072     Verbosity       = cms.untracked.int32(0),
0073     firstRun        = cms.untracked.uint32(1)
0074 )
0075 
0076 process.maxEvents = cms.untracked.PSet(
0077     input = cms.untracked.int32(1)
0078 )
0079 
0080 process.p1 = cms.Path(process.generator*process.hcalTopologyTester)