Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:15:11

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