File indexing completed on 2024-07-18 00:48:12
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 "2021",
0018 VarParsing.VarParsing.multiplicity.singleton,
0019 VarParsing.VarParsing.varType.string,
0020 "geometry of operations: 2021, 2023, 2024")
0021 options.register('type',
0022 "DDD",
0023 VarParsing.VarParsing.multiplicity.singleton,
0024 VarParsing.VarParsing.varType.string,
0025 "geometry of operations: DDD, DD4hep")
0026
0027 options.parseArguments()
0028
0029 print(options)
0030
0031
0032
0033
0034 import FWCore.ParameterSet.Config as cms
0035
0036 if (options.type == "DDD"):
0037 from Configuration.Eras.Era_Run3_DDD_cff import Run3_DDD
0038 process = cms.Process('PROD',Run3_DDD)
0039 geomFile = "Configuration.Geometry.GeometryExtended" + options.geometry + "Reco_cff"
0040 fileName = "matbdg" + options.geometry + "dddXML.root"
0041 else:
0042 from Configuration.Eras.Era_Run3_dd4hep_cff import Run3_dd4hep
0043 process = cms.Process('PROD',Run3_dd4hep)
0044 geomFile = "Configuration.Geometry.GeometryDD4hepExtended" + options.geometry + "Reco_cff"
0045 fileName = "matbdg" + options.geometry + "ddhepXML.root"
0046
0047 print("Geometry file Name: ", geomFile)
0048 print("Root file Name: ", fileName)
0049
0050 process.load(geomFile)
0051 process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
0052 process.load("Configuration.StandardSequences.MagneticField_cff")
0053 process.load("SimG4Core.Application.g4SimHits_cfi")
0054 process.load("Validation.Geometry.materialBudgetVolume_cfi")
0055
0056 process.load("IOMC.RandomEngine.IOMC_cff")
0057 process.RandomNumberGeneratorService.g4SimHits.initialSeed = 9876
0058
0059 process.load('FWCore.MessageService.MessageLogger_cfi')
0060 process.MessageLogger.cerr.FwkReport.reportEvery = cms.untracked.int32(1000)
0061 if hasattr(process,'MessageLogger'):
0062 process.MessageLogger.MaterialBudget=dict()
0063
0064 process.source = cms.Source("PoolSource",
0065 noEventSort = cms.untracked.bool(True),
0066 duplicateCheckMode = cms.untracked.string("noDuplicateCheck"),
0067 fileNames = cms.untracked.vstring('file:single_neutrino_random.root')
0068 )
0069
0070 process.maxEvents = cms.untracked.PSet(
0071 input = cms.untracked.int32(-1)
0072 )
0073
0074 process.TFileService = cms.Service("TFileService",
0075 fileName = cms.string(fileName))
0076
0077 process.g4SimHits.UseMagneticField = False
0078 process.g4SimHits.Physics.type = 'SimG4Core/Physics/DummyPhysics'
0079 process.g4SimHits.StackingAction.TrackNeutrino = True
0080 process.g4SimHits.Physics.DummyEMPhysics = True
0081 process.g4SimHits.Physics.CutsPerRegion = False
0082
0083 process.load("Validation.Geometry.materialBudgetVolumeAnalysis_cfi")
0084 process.p1 = cms.Path(process.g4SimHits+process.materialBudgetVolumeAnalysis)