Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-12-08 23:44:09

0001 ###############################################################################
0002 # Way to use this:
0003 #   cmsRun testHGCalNumbering_cfg.py type=V19
0004 #
0005 #   Options for type V16, V17, V17n, V18, V19
0006 #
0007 ###############################################################################
0008 import FWCore.ParameterSet.Config as cms
0009 import os, sys, importlib, re
0010 import FWCore.ParameterSet.VarParsing as VarParsing
0011 
0012 ####################################################################
0013 ### SETUP OPTIONS
0014 options = VarParsing.VarParsing('standard')
0015 options.register('type',
0016                  "V19",
0017                   VarParsing.VarParsing.multiplicity.singleton,
0018                   VarParsing.VarParsing.varType.string,
0019                   "type of operations: V16, V17, V17n, V18, V19")
0020 
0021 ### get and parse the command line arguments
0022 options.parseArguments()
0023 print(options)
0024 
0025 from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
0026 process = cms.Process("HGCalCellArea",Phase2C17I13M9)
0027 
0028 geomFile = "Geometry.HGCalCommonData.testHGCal" + options.type + "XML_cfi"
0029 print("Geometry file: ", geomFile)
0030 
0031 
0032 process.load(geomFile)
0033 process.load("Geometry.HGCalCommonData.hgcalParametersInitialization_cfi")
0034 process.load("Geometry.HGCalCommonData.hgcalNumberingInitialization_cfi")
0035 process.load("Geometry.EcalCommonData.ecalSimulationParameters_cff")
0036 process.load("Geometry.HcalCommonData.hcalDDDSimConstants_cff")
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     process.MessageLogger.HGCGeom=dict()
0043 
0044 process.load("IOMC.RandomEngine.IOMC_cff")
0045 process.RandomNumberGeneratorService.generator.initialSeed = 456789
0046 
0047 process.source = cms.Source("EmptySource")
0048 
0049 process.generator = cms.EDProducer("FlatRandomEGunProducer",
0050                                    PGunParameters = cms.PSet(
0051                                        PartID = cms.vint32(14),
0052                                        MinEta = cms.double(-3.5),
0053                                        MaxEta = cms.double(3.5),
0054                                        MinPhi = cms.double(-3.14159265359),
0055                                        MaxPhi = cms.double(3.14159265359),
0056                                        MinE   = cms.double(9.99),
0057                                        MaxE   = cms.double(10.01)
0058                                    ),
0059                                    AddAntiParticle = cms.bool(False),
0060                                    Verbosity       = cms.untracked.int32(0),
0061                                    firstRun        = cms.untracked.uint32(1)
0062                                )
0063 
0064 process.maxEvents = cms.untracked.PSet(
0065     input = cms.untracked.int32(1)
0066 )
0067 
0068 process.SimpleMemoryCheck = cms.Service("SimpleMemoryCheck",
0069                                         ignoreTotal = cms.untracked.int32(1),
0070                                         moduleMemorySummary = cms.untracked.bool(True)
0071 )
0072 
0073 process.load("Geometry.HGCalCommonData.hgcalTestCellArea_cfi")
0074 
0075  
0076 process.p1 = cms.Path(process.generator*process.hgcalTestCellArea)