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 if (options.geometry == "D115"):
0030 from Configuration.Eras.Era_Phase2C20I13M9_cff import Phase2C20I13M9
0031 process = cms.Process('BHValid',Phase2C20I13M9)
0032 elif (options.geometry == "D104"):
0033 from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0034 process = cms.Process('BHValid',PhaseC22I13M9)
0035 elif (options.geometry == "D106"):
0036 from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0037 process = cms.Process('BHValid',PhaseC22I13M9)
0038 elif (options.geometry == "D109"):
0039 from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0040 process = cms.Process('BHValid',PhaseC22I13M9)
0041 elif (options.geometry == "D111"):
0042 from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0043 process = cms.Process('BHValid',PhaseC22I13M9)
0044 elif (options.geometry == "D112"):
0045 from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0046 process = cms.Process('BHValid',PhaseC22I13M9)
0047 elif (options.geometry == "D113"):
0048 from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
0049 process = cms.Process('BHValid',PhaseC22I13M9)
0050 else:
0051 from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
0052 process = cms.Process('BHValid',Phase2C17I13M9)
0053
0054 geomFile = "Configuration.Geometry.GeometryExtendedRun4" + options.geometry + "Reco_cff"
0055 fileName = "hgcBHValid" + options.geometry + ".root"
0056
0057 print("Geometry file: ", geomFile)
0058 print("Output file: ", fileName)
0059
0060
0061 process.load(geomFile)
0062 process.load('Configuration.StandardSequences.Services_cff')
0063 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0064 process.load('FWCore.MessageService.MessageLogger_cfi')
0065 process.load('Configuration.EventContent.EventContent_cff')
0066 process.load('SimGeneral.MixingModule.mixNoPU_cfi')
0067 process.load('Configuration.StandardSequences.MagneticField_cff')
0068 process.load('Configuration.StandardSequences.Generator_cff')
0069 process.load('IOMC.EventVertexGenerators.VtxSmearedRealistic50ns13TeVCollision_cfi')
0070 process.load('GeneratorInterface.Core.genFilterSummary_cff')
0071 process.load('Configuration.StandardSequences.SimIdeal_cff')
0072 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0073 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0074 process.load('Configuration.StandardSequences.Digi_cff')
0075 process.load('Configuration.StandardSequences.SimL1Emulator_cff')
0076 process.load('Configuration.StandardSequences.L1TrackTrigger_cff')
0077 process.load('Configuration.StandardSequences.DigiToRaw_cff')
0078 process.load('HLTrigger.Configuration.HLT_Fake2_cff')
0079 process.load('Configuration.StandardSequences.RawToDigi_cff')
0080 process.load('Configuration.StandardSequences.L1Reco_cff')
0081 process.load('Configuration.StandardSequences.Reconstruction_cff')
0082 process.load('Configuration.StandardSequences.RecoSim_cff')
0083 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0084
0085 process.maxEvents = cms.untracked.PSet(
0086 input = cms.untracked.int32(2000)
0087 )
0088
0089 process.MessageLogger.cerr.FwkReport.reportEvery = 5
0090
0091 process.source = cms.Source("EmptySource")
0092
0093 process.options = cms.untracked.PSet(
0094 wantSummary = cms.untracked.bool(True)
0095 )
0096
0097
0098 process.configurationMetadata = cms.untracked.PSet(
0099 version = cms.untracked.string(''),
0100 annotation = cms.untracked.string(''),
0101 name = cms.untracked.string('Applications')
0102 )
0103
0104 if hasattr(process,'MessageLogger'):
0105 process.MessageLogger.ValidHGCal=dict()
0106 process.MessageLogger.HcalSim=dict()
0107
0108
0109 process.load('Validation.HGCalValidation.hgcalBHValidation_cfi')
0110
0111 process.TFileService = cms.Service("TFileService",
0112 fileName = cms.string(fileName),
0113 closeFileFast = cms.untracked.bool(True)
0114 )
0115
0116
0117
0118 process.genstepfilter.triggerConditions=cms.vstring("generation_step")
0119 from Configuration.AlCa.GlobalTag import GlobalTag
0120 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T21', '')
0121
0122 process.generator = cms.EDProducer("FlatRandomPtGunProducer",
0123 PGunParameters = cms.PSet(
0124 MaxPt = cms.double(35.0),
0125 MinPt = cms.double(35.0),
0126 PartID = cms.vint32(13),
0127 MinPhi = cms.double(-3.14159265359),
0128 MaxPhi = cms.double(3.14159265359),
0129 MinEta = cms.double(1.2),
0130 MaxEta = cms.double(3.0)
0131 ),
0132 Verbosity = cms.untracked.int32(0),
0133 psethack = cms.string('single muon pt 35'),
0134 AddAntiParticle = cms.bool(True),
0135 firstRun = cms.untracked.uint32(1)
0136 )
0137
0138
0139
0140 process.mix.digitizers = cms.PSet(process.theDigitizersValid)
0141 process.ProductionFilterSequence = cms.Sequence(process.generator)
0142
0143
0144 process.g4SimHits.UseMagneticField = False
0145 process.g4SimHits.Physics.bField = cms.double(0.0)
0146
0147
0148
0149 process.generation_step = cms.Path(process.pgen)
0150 process.simulation_step = cms.Path(process.psim)
0151 process.genfiltersummary_step = cms.EndPath(process.genFilterSummary)
0152 process.digitisation_step = cms.Path(process.pdigi_valid)
0153 process.L1simulation_step = cms.Path(process.SimL1Emulator)
0154 process.L1TrackTrigger_step = cms.Path(process.L1TrackTrigger)
0155 process.digi2raw_step = cms.Path(process.DigiToRaw)
0156 process.raw2digi_step = cms.Path(process.RawToDigi)
0157 process.L1Reco_step = cms.Path(process.L1Reco)
0158 process.reconstruction_step = cms.Path(process.localreco)
0159 process.recosim_step = cms.Path(process.recosim)
0160 process.analysis_step = cms.Path(process.hgcalBHAnalysis)
0161
0162
0163 process.schedule = cms.Schedule(process.generation_step,
0164 process.simulation_step,
0165 process.digitisation_step,
0166 process.L1simulation_step,
0167 process.L1TrackTrigger_step,
0168 process.digi2raw_step,
0169 process.raw2digi_step,
0170 process.L1Reco_step,
0171 process.reconstruction_step,
0172 process.recosim_step,
0173 process.analysis_step,
0174 )
0175
0176
0177 for path in process.paths:
0178 if getattr(process,path)._seq is not None: getattr(process,path)._seq = process.ProductionFilterSequence * getattr(process,path)._seq