Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-14 04:15:36

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