Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-05-02 02:40:41

0001 ###############################################################################
0002 # Way to use this:
0003 #   cmsRun testHGCalWaferInFileCheck_cfg.py geometry=D110
0004 #
0005 #   Options for geometry D95, D96, D98, D99, D100, D101, D102, D103, D104,
0006 #                        D105, D106, D107, D108, D109, D110, D111, D112, D113,
0007 #                        D114, D115, D116, D120
0008 #
0009 ###############################################################################
0010 import FWCore.ParameterSet.Config as cms
0011 import os, sys, imp, re
0012 import FWCore.ParameterSet.VarParsing as VarParsing
0013 
0014 ####################################################################
0015 ### SETUP OPTIONS
0016 options = VarParsing.VarParsing('standard')
0017 options.register('geometry',
0018                  "D110",
0019                   VarParsing.VarParsing.multiplicity.singleton,
0020                   VarParsing.VarParsing.varType.string,
0021                   "geometry of operations: D95, D96, D98, D99, D100, D101, D102, D103, D104, D105, D106, D107, D108, D109, D110, D111, D112, D113, D114, D115, D116, D120")
0022 
0023 ### get and parse the command line arguments
0024 options.parseArguments()
0025 print(options)
0026 
0027 ####################################################################
0028 # Use the options
0029 
0030 geomName = "Run4" + options.geometry
0031 geomFile = "Configuration.Geometry.GeometryExtended" + geomName + "Reco_cff"
0032 import Configuration.Geometry.defaultPhase2ConditionsEra_cff as _settings
0033 GLOBAL_TAG, ERA = _settings.get_era_and_conditions(geomName)
0034 
0035 print("Geometry Name:   ", geomName)
0036 print("Geom file Name:  ", geomFile)
0037 print("Global Tag Name: ", GLOBAL_TAG)
0038 print("Era Name:        ", ERA)
0039 
0040 process = cms.Process('PROD',ERA)
0041 
0042 process.load(geomFile)
0043 process.load("SimGeneral.HepPDTESSource.pdt_cfi")
0044 process.load("Geometry.HGCalGeometry.hgcalEEWaferInFileCheck_cfi")
0045 process.load('FWCore.MessageService.MessageLogger_cfi')
0046 
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.hgcalHEWaferInFileCheck = process.hgcalEEWaferInFileCheck.clone(
0075     NameSense  = "HGCalHESiliconSensitive",
0076     NameDevice = "HGCal HE Silicon",
0077 )
0078 
0079 process.p1 = cms.Path(process.generator*process.hgcalEEWaferInFileCheck*process.hgcalHEWaferInFileCheck)