Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-06-17 22:53:47

0001 ###############################################################################
0002 # Way to use this:
0003 #   cmsRun testHGCalHGCalGeometry_cfg.py geometry=V17
0004 #
0005 #   Options for geometry V14, V15, V16, V17
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                  "V17",
0017                   VarParsing.VarParsing.multiplicity.singleton,
0018                   VarParsing.VarParsing.varType.string,
0019                   "geometry of operations: V14, V15, V16, V17")
0020 
0021 ### get and parse the command line arguments
0022 options.parseArguments()
0023 
0024 print(options)
0025 
0026 ####################################################################
0027 # Use the options
0028 
0029 if (options.geometry == "V15"):
0030     from Configuration.Eras.Era_Phase2C11M9_cff import Phase2C11M9
0031     process = cms.Process('HGCHGCalGeometry',Phase2C11M9)
0032     process.load("Geometry.HGCalCommonData.testHGCalV15XML_cfi")
0033     process.load("Geometry.HGCalCommonData.hgcalV15ParametersInitialization_cfi")
0034 elif (options.geometry == "V16"):
0035     from Configuration.Eras.Era_Phase2C11_cff import Phase2C11
0036     process = cms.Process('HGCHGCalGeometry',Phase2C11)
0037     process.load("Geometry.HGCalCommonData.testHGCalV16XML_cfi")
0038     process.load("Geometry.HGCalCommonData.hgcalV15ParametersInitialization_cfi")
0039 elif (options.geometry == "V14"):
0040     from Configuration.Eras.Era_Phase2C11_cff import Phase2C11
0041     process = cms.Process('HGCHGCalGeometry',Phase2C11)
0042     process.load("Geometry.HGCalCommonData.testHGCalV16XML_cfi")
0043     process.load("Geometry.HGCalCommonData.hgcalV15ParametersInitialization_cfi")
0044 else:
0045     from Configuration.Eras.Era_Phase2C11_cff import Phase2C11
0046     process = cms.Process('HGCHGCalGeometry',Phase2C11)
0047     process.load("Geometry.HGCalCommonData.testHGCalV17XML_cfi")
0048     process.load("Geometry.HGCalCommonData.hgcalV15ParametersInitialization_cfi")
0049 
0050 process.load("SimGeneral.HepPDTESSource.pdt_cfi")
0051 process.load("Geometry.HGCalCommonData.hgcalNumberingInitialization_cfi")
0052 process.load("Geometry.CaloEventSetup.HGCalV9Topology_cfi")
0053 process.load("Geometry.HGCalGeometry.HGCalGeometryESProducer_cfi")
0054 process.load('FWCore.MessageService.MessageLogger_cfi')
0055 
0056 if hasattr(process,'MessageLogger'):
0057     process.MessageLogger.HGCalGeom=dict()
0058     process.MessageLogger.HGCalGeomX=dict()
0059 
0060 process.load("IOMC.RandomEngine.IOMC_cff")
0061 process.RandomNumberGeneratorService.generator.initialSeed = 456789
0062 
0063 process.source = cms.Source("EmptySource")
0064 
0065 process.generator = cms.EDProducer("FlatRandomEGunProducer",
0066     PGunParameters = cms.PSet(
0067         PartID = cms.vint32(14),
0068         MinEta = cms.double(-3.5),
0069         MaxEta = cms.double(3.5),
0070         MinPhi = cms.double(-3.14159265359),
0071         MaxPhi = cms.double(3.14159265359),
0072         MinE   = cms.double(9.99),
0073         MaxE   = cms.double(10.01)
0074     ),
0075     AddAntiParticle = cms.bool(False),
0076     Verbosity       = cms.untracked.int32(0),
0077     firstRun        = cms.untracked.uint32(1)
0078 )
0079 
0080 process.maxEvents = cms.untracked.PSet(
0081     input = cms.untracked.int32(1)
0082 )
0083 
0084 process.load("Geometry.HGCalGeometry.hgcalGeometryTesterEE_cfi")
0085 
0086 process.hgcalGeometryTesterHEF = process.hgcalGeometryTesterEE.clone(
0087     Detector   = "HGCalHESiliconSensitive",
0088 )
0089 
0090 process.hgcalGeometryTesterHEB = process.hgcalGeometryTesterEE.clone(
0091     Detector   = "HGCalHEScintillatorSensitive",
0092 )
0093 
0094 #process.p1 = cms.Path(process.generator*process.hgcalGeometryTesterEE*process.hgcalGeometryTesterHEF*process.hgcalGeometryTesterHEB)
0095 process.p1 = cms.Path(process.generator*process.hgcalGeometryTesterEE*process.hgcalGeometryTesterHEF)
0096 #process.p1 = cms.Path(process.generator*process.hgcalGeometryTesterHEB)