Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-07-13 22:41:17

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