File indexing completed on 2024-11-14 04:15:58
0001
0002
0003
0004
0005
0006
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
0015 options = VarParsing.VarParsing('standard')
0016 options.register('geometry',
0017 "D110",
0018 VarParsing.VarParsing.multiplicity.singleton,
0019 VarParsing.VarParsing.varType.string,
0020 "geometry of operations: D98, D99, D103, D104, D105, D106, D107, D108, D109, D110, D111, D112, D113, D114, D115")
0021
0022
0023 options.parseArguments()
0024
0025 print(options)
0026
0027
0028
0029
0030 if (options.geometry == "D115"):
0031 from Configuration.Eras.Era_Phase2C20I13M9_cff import Phase2C20I13M9
0032 process = cms.Process('Client',Phase2C20I13M9)
0033 elif (options.geometry == "D104"):
0034 from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0035 process = cms.Process('Client',PhaseC22I13M9)
0036 elif (options.geometry == "D106"):
0037 from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0038 process = cms.Process('Client',PhaseC22I13M9)
0039 elif (options.geometry == "D109"):
0040 from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0041 process = cms.Process('Client',PhaseC22I13M9)
0042 elif (options.geometry == "D111"):
0043 from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0044 process = cms.Process('Client',PhaseC22I13M9)
0045 elif (options.geometry == "D112"):
0046 from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0047 process = cms.Process('Client',PhaseC22I13M9)
0048 elif (options.geometry == "D113"):
0049 from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0050 process = cms.Process('Client',PhaseC22I13M9)
0051 else:
0052 from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
0053 process = cms.Process('DigiValidation',Phase2C17I13M9)
0054
0055 geomFile = "Configuration.Geometry.GeometryExtendedRun4" + options.geometry + "Reco_cff"
0056 fileName = "file:DigiVal" + options.geometry + ".root"
0057
0058 print("Geometry file: ", geomFile)
0059 print("Output file: ", fileName)
0060
0061
0062 process.load(geomFile)
0063 process.load('Configuration.StandardSequences.Services_cff')
0064 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0065 process.load('FWCore.MessageService.MessageLogger_cfi')
0066 process.load('Configuration.EventContent.EventContent_cff')
0067 process.load('FWCore.MessageService.MessageLogger_cfi')
0068 process.load('Configuration.EventContent.EventContent_cff')
0069 process.load('SimGeneral.MixingModule.mixNoPU_cfi')
0070 process.load('Configuration.StandardSequences.MagneticField_cff')
0071 process.load('Configuration.StandardSequences.Generator_cff')
0072 process.load('IOMC.EventVertexGenerators.VtxSmearedGauss_cfi')
0073 process.load('GeneratorInterface.Core.genFilterSummary_cff')
0074 process.load('Configuration.StandardSequences.SimIdeal_cff')
0075 process.load('Configuration.StandardSequences.Digi_cff')
0076 process.load('Configuration.StandardSequences.SimL1Emulator_cff')
0077 process.load('Configuration.StandardSequences.DigiToRaw_cff')
0078 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0079 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0080 from Configuration.AlCa.GlobalTag import GlobalTag
0081 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T21', '')
0082
0083 process.maxEvents = cms.untracked.PSet(
0084 input = cms.untracked.int32(10)
0085 )
0086
0087
0088 process.source = cms.Source("EmptySource")
0089
0090 process.options = cms.untracked.PSet()
0091
0092
0093 process.configurationMetadata = cms.untracked.PSet(
0094 version = cms.untracked.string('$Revision: 1.20 $'),
0095 annotation = cms.untracked.string('SingleMuonPt10_cfi nevts:10'),
0096 name = cms.untracked.string('Applications')
0097 )
0098
0099
0100
0101 process.FEVTDEBUGHLToutput = cms.OutputModule("PoolOutputModule",
0102 splitLevel = cms.untracked.int32(0),
0103 eventAutoFlushCompressedSize = cms.untracked.int32(5242880),
0104 outputCommands = process.FEVTDEBUGHLTEventContent.outputCommands,
0105 fileName = cms.untracked.string(fileName),
0106 dataset = cms.untracked.PSet(
0107 filterName = cms.untracked.string(''),
0108 dataTier = cms.untracked.string('GEN-SIM-DIGI-RAW')
0109 ),
0110 SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('generation_step'))
0111 )
0112
0113
0114
0115
0116 process.genstepfilter.triggerConditions=cms.vstring("generation_step")
0117
0118 process.generator = cms.EDProducer("FlatRandomPtGunProducer",
0119 PGunParameters = cms.PSet(
0120 MaxPt = cms.double(10.01),
0121 MinPt = cms.double(9.99),
0122 PartID = cms.vint32(13),
0123 MaxEta = cms.double(2.50),
0124 MaxPhi = cms.double(3.14159265359),
0125 MinEta = cms.double(1.75),
0126 MinPhi = cms.double(-3.14159265359)
0127 ),
0128 Verbosity = cms.untracked.int32(0),
0129 psethack = cms.string('single electron pt 10'),
0130 AddAntiParticle = cms.bool(True),
0131 firstRun = cms.untracked.uint32(1)
0132 )
0133
0134 process.mix.digitizers = cms.PSet(process.theDigitizersValid)
0135
0136
0137 process.generation_step = cms.Path(process.pgen)
0138 process.simulation_step = cms.Path(process.psim)
0139 process.genfiltersummary_step = cms.EndPath(process.genFilterSummary)
0140 process.digitisation_step = cms.Path(process.pdigi_valid)
0141 process.L1simulation_step = cms.Path(process.SimL1Emulator)
0142 process.digi2raw_step = cms.Path(process.DigiToRaw)
0143 process.endjob_step = cms.EndPath(process.endOfProcess)
0144 process.FEVTDEBUGHLToutput_step = cms.EndPath(process.FEVTDEBUGHLToutput)
0145
0146
0147 process.ValidationOutput = cms.OutputModule("PoolOutputModule",
0148 outputCommands = cms.untracked.vstring('drop *', 'keep *_MEtoEDMConverter_*_*'),
0149 fileName = cms.untracked.string('file:output_digiVal_test.root'),
0150 )
0151
0152 process.load("DQMServices.Core.DQM_cfg")
0153 process.load("DQMServices.Components.MEtoEDMConverter_cfi")
0154
0155 process.load("Validation.HGCalValidation.digiValidation_cff")
0156
0157
0158 process.p1 = cms.Path(process.hgcalDigiValidationEE+
0159 process.hgcalDigiValidationHEF+
0160 process.hgcalDigiValidationHEB)
0161 process.p2 = cms.Path(process.MEtoEDMConverter)
0162 process.output_step = cms.EndPath(process.ValidationOutput)
0163
0164
0165 process.schedule = cms.Schedule(process.generation_step,process.genfiltersummary_step,
0166 process.simulation_step,process.digitisation_step,
0167 process.L1simulation_step,process.digi2raw_step,
0168 process.endjob_step,process.p1,process.p2,process.output_step)
0169
0170
0171 for path in process.paths:
0172 getattr(process,path)._seq = process.generator * getattr(process,path)._seq
0173
0174 for label, prod in process.producers_().items():
0175 if prod.type_() == "OscarMTProducer":
0176
0177 prod.__dict__['_TypedParameterizable__type'] = "OscarProducer"