Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 13:03:40

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