Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-05-28 01:33:55

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