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 testHGCalParametersDDD_cfg.py type=V17
0004 #
0005 #   Options for type V16, V17, V17n, V17Shift, V18
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                  "V17",
0017                   VarParsing.VarParsing.multiplicity.singleton,
0018                   VarParsing.VarParsing.varType.string,
0019                   "type of operations: V16, V17, V17n, V17Shift, V18")
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 
0027 process = cms.Process("HGCalParametersTest",Phase2C17I13M9)
0028 
0029 geomFile = "Geometry.HGCalCommonData.testHGCal" + options.type + "XML_cfi"
0030 
0031 print("Geometry file: ", geomFile)
0032 
0033 process.load(geomFile)
0034 process.load("SimGeneral.HepPDTESSource.pdt_cfi")
0035 process.load("Geometry.HGCalCommonData.hgcalParametersInitialization_cfi")
0036 process.load('FWCore.MessageService.MessageLogger_cfi')
0037 
0038 if hasattr(process,'MessageLogger'):
0039     process.MessageLogger.HGCalGeom=dict()
0040 
0041 process.load("IOMC.RandomEngine.IOMC_cff")
0042 process.RandomNumberGeneratorService.generator.initialSeed = 456789
0043 
0044 process.source = cms.Source("EmptySource")
0045 
0046 process.maxEvents = cms.untracked.PSet(
0047     input = cms.untracked.int32(1)
0048 )
0049 
0050 process.generator = cms.EDProducer("FlatRandomEGunProducer",
0051     PGunParameters = cms.PSet(
0052         PartID = cms.vint32(14),
0053         MinEta = cms.double(-3.5),
0054         MaxEta = cms.double(3.5),
0055         MinPhi = cms.double(-3.14159265359),
0056         MaxPhi = cms.double(3.14159265359),
0057         MinE   = cms.double(9.99),
0058         MaxE   = cms.double(10.01)
0059     ),
0060     AddAntiParticle = cms.bool(False),
0061     Verbosity       = cms.untracked.int32(0),
0062     firstRun        = cms.untracked.uint32(1)
0063 )
0064  
0065 process.load("Geometry.HGCalCommonData.hgcParameterTesterEE_cfi")
0066 
0067 process.hgcParameterTesterHESil = process.hgcParameterTesterEE.clone(
0068     Name = cms.string("HGCalHESiliconSensitive")
0069 )
0070 
0071 process.hgcParameterTesterHESci = process.hgcParameterTesterEE.clone(
0072     Name = cms.string("HGCalHEScintillatorSensitive"),
0073     Mode = cms.int32(2)
0074 )
0075  
0076 process.p1 = cms.Path(process.generator*process.hgcParameterTesterEE*process.hgcParameterTesterHESil*process.hgcParameterTesterHESci)