Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-05-23 23:48:38

0001 
0002 ###############################################################################
0003 # Way to use this:
0004 #   cmsRun testHGCalWaferInFileTest_cfg.py geometry=V17
0005 #
0006 #   Options for geometry V16, V17, V18, V19
0007 #
0008 ###############################################################################
0009 import FWCore.ParameterSet.Config as cms
0010 import os, sys, importlib, re
0011 import FWCore.ParameterSet.VarParsing as VarParsing
0012 
0013 ####################################################################
0014 ### SETUP OPTIONS
0015 options = VarParsing.VarParsing('standard')
0016 options.register('geometry',
0017                  "V17",
0018                   VarParsing.VarParsing.multiplicity.singleton,
0019                   VarParsing.VarParsing.varType.string,
0020                   "geometry of operations: V16, V17, V18, V19")
0021 
0022 ### get and parse the command line arguments
0023 options.parseArguments()
0024 
0025 print(options)
0026 
0027 ####################################################################
0028 # Use the options
0029 
0030 from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
0031 process = cms.Process('HGCWaferInFileTes',Phase2C17I13M9)
0032 
0033 geomFile = "Geometry.HGCalCommonData.testHGCal" + options.geometry + "XML_cfi"
0034 print("Geometry file: ", geomFile)
0035 process.load(geomFile)
0036 process.load("Geometry.HGCalCommonData.hgcalParametersInitialization_cfi")
0037 process.load("SimGeneral.HepPDTESSource.pdt_cfi")
0038 process.load("Geometry.HGCalCommonData.hgcalNumberingInitialization_cfi")
0039 process.load("Geometry.CaloEventSetup.HGCalTopology_cfi")
0040 process.load("Geometry.HGCalGeometry.HGCalGeometryESProducer_cfi")
0041 process.load("Geometry.HGCalGeometry.hgcalEEWaferInFileTest_cfi")
0042 
0043 process.load('FWCore.MessageService.MessageLogger_cfi')
0044 if hasattr(process,'MessageLogger'):
0045     process.MessageLogger.HGCalGeom=dict()
0046 
0047 process.load("IOMC.RandomEngine.IOMC_cff")
0048 process.RandomNumberGeneratorService.generator.initialSeed = 456789
0049 
0050 process.source = cms.Source("EmptySource")
0051 
0052 process.generator = cms.EDProducer("FlatRandomEGunProducer",
0053                                    PGunParameters = cms.PSet(
0054                                        PartID = cms.vint32(14),
0055                                        MinEta = cms.double(-3.5),
0056                                        MaxEta = cms.double(3.5),
0057                                        MinPhi = cms.double(-3.14159265359),
0058                                        MaxPhi = cms.double(3.14159265359),
0059                                        MinE   = cms.double(9.99),
0060                                        MaxE   = cms.double(10.01)
0061                                    ),
0062                                    AddAntiParticle = cms.bool(False),
0063                                    Verbosity       = cms.untracked.int32(0),
0064                                    firstRun        = cms.untracked.uint32(1)
0065                                )
0066 
0067 process.maxEvents = cms.untracked.PSet(
0068     input = cms.untracked.int32(1)
0069 )
0070 
0071 #process.hgcalEEWaferInFileTest.Verbosity = 1
0072 
0073 process.hgcalHEWaferInFileTest = process.hgcalEEWaferInFileTest.clone(
0074     NameSense  = "HGCalHESiliconSensitive",
0075     NameDevice = "HGCal HE Silicon",
0076 )
0077 
0078 process.p1 = cms.Path(process.generator*process.hgcalEEWaferInFileTest*process.hgcalHEWaferInFileTest)