Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-07-29 22:56:47

0001 ###############################################################################
0002 # Way to use this:
0003 #   cmsRun testHGCalGeomLocatorSc_cfg.py geometry=D88
0004 #
0005 #   Options for type D88, D92, D93
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('geometry',
0016                  "D92",
0017                   VarParsing.VarParsing.multiplicity.singleton,
0018                   VarParsing.VarParsing.varType.string,
0019                   "type of operations: D88, D92, D93")
0020 
0021 ### get and parse the command line arguments
0022 options.parseArguments()
0023 print(options)
0024 
0025 from Configuration.Eras.Era_Phase2C11I13M9_cff import Phase2C11I13M9
0026 process = cms.Process("HGCalGeomLocatorSc",Phase2C11I13M9)
0027 
0028 ####################################################################
0029 # Use the options
0030 if (options.geometry == "D88"):
0031     process.load('Configuration.Geometry.GeometryExtended2026D88Reco_cff')
0032 elif (options.geometry == "D93"):
0033     process.load('Configuration.Geometry.GeometryExtended2026D93Reco_cff')
0034 else:
0035     process.load('Configuration.Geometry.GeometryExtended2026D92Reco_cff')
0036 
0037 process.load("SimGeneral.HepPDTESSource.pdt_cfi")
0038 process.load('FWCore.MessageService.MessageLogger_cfi')
0039 
0040 if hasattr(process,'MessageLogger'):
0041     process.MessageLogger.HGCalGeom = dict()
0042 
0043 process.load("IOMC.RandomEngine.IOMC_cff")
0044 process.RandomNumberGeneratorService.generator.initialSeed = 456789
0045 
0046 process.source = cms.Source("EmptySource")
0047 
0048 process.generator = cms.EDProducer("FlatRandomEGunProducer",
0049     PGunParameters = cms.PSet(
0050         PartID = cms.vint32(14),
0051         MinEta = cms.double(-3.5),
0052         MaxEta = cms.double(3.5),
0053         MinPhi = cms.double(-3.14159265359),
0054         MaxPhi = cms.double(3.14159265359),
0055         MinE   = cms.double(9.99),
0056         MaxE   = cms.double(10.01)
0057     ),
0058     AddAntiParticle = cms.bool(False),
0059     Verbosity       = cms.untracked.int32(0),
0060     firstRun        = cms.untracked.uint32(1)
0061 )
0062 
0063 process.maxEvents = cms.untracked.PSet(
0064     input = cms.untracked.int32(1)
0065 )
0066 
0067 process.prodHEB = cms.EDAnalyzer("HGCalGeomLocaterTester",
0068                                  Detector   = cms.string("HGCalHEScintillatorSensitive"),
0069                                 )
0070 
0071 process.p1 = cms.Path(process.generator*process.prodHEB)