diff --git a/Validation/Geometry/test/runMaterialBudgetVolume2026DD4hep_cfg.py b/Validation/Geometry/test/runMaterialBudgetVolume2026DD4hep_cfg.py new file mode 100644 index 0000000000000..a0b4ddc141ea8 --- /dev/null +++ b/Validation/Geometry/test/runMaterialBudgetVolume2026DD4hep_cfg.py @@ -0,0 +1,77 @@ +############################################################################### +# Way to use this: +# cmsRun runMaterialBudgetVolume2026DD4hep_cfg.py geometry=D92 +# +# Options for geometry D86, D88, D91, D92, D93, D94, D95, D96, D98, D99 +# +############################################################################### +import FWCore.ParameterSet.Config as cms +import os, sys, imp, re +import FWCore.ParameterSet.VarParsing as VarParsing + +#################################################################### +### SETUP OPTIONS +options = VarParsing.VarParsing('standard') +options.register('geometry', + "D88", + VarParsing.VarParsing.multiplicity.singleton, + VarParsing.VarParsing.varType.string, + "geometry of operations: D86, D88, D91, D92, D93, D94, D95, D96, D98, D99") +### get and parse the command line arguments +options.parseArguments() + +print(options) + +#################################################################### +# Use the options + +from Configuration.ProcessModifiers.dd4hep_cff import dd4hep +if (options.geometry == "D94"): + from Configuration.Eras.Era_Phase2C20I13M9_cff import Phase2C20I13M9 + process = cms.Process('MaterialBudgetVolume',Phase2C20I13M9,dd4hep) +else: + from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9 + process = cms.Process('MaterialBudgetVolume',Phase2C17I13M9,dd4hep) + +geomFile = "Configuration.Geometry.GeometryDD4hepExtended2026" + options.geometry + "Reco_cff" +fileName = "matbdg" + options.geometry + "DD4hep" + ".root" + +print("Geometry file Name: ", geomFile) +print("Root file Name: ", fileName) + +process.load(geomFile) +process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi") +process.load("Configuration.StandardSequences.MagneticField_cff") +process.load("SimG4Core.Application.g4SimHits_cfi") +process.load("Validation.Geometry.materialBudgetVolume_cfi") + +process.load("IOMC.RandomEngine.IOMC_cff") +process.RandomNumberGeneratorService.g4SimHits.initialSeed = 9876 + +process.load('FWCore.MessageService.MessageLogger_cfi') +process.MessageLogger.cerr.FwkReport.reportEvery = cms.untracked.int32(1000) +if hasattr(process,'MessageLogger'): + process.MessageLogger.MaterialBudget=dict() + +process.source = cms.Source("PoolSource", + noEventSort = cms.untracked.bool(True), + duplicateCheckMode = cms.untracked.string("noDuplicateCheck"), + fileNames = cms.untracked.vstring('file:single_neutrino_random.root') +) + +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(-1) +) + +process.TFileService = cms.Service("TFileService", + fileName = cms.string(fileName) +) + +process.g4SimHits.UseMagneticField = False +process.g4SimHits.Physics.type = 'SimG4Core/Physics/DummyPhysics' +process.g4SimHits.StackingAction.TrackNeutrino = True +process.g4SimHits.Physics.DummyEMPhysics = True +process.g4SimHits.Physics.CutsPerRegion = False + +process.load("Validation.Geometry.materialBudgetVolumeAnalysis_cfi") +process.p1 = cms.Path(process.g4SimHits+process.materialBudgetVolumeAnalysis) diff --git a/Validation/Geometry/test/runMaterialBudgetVolume2026DDD_cfg.py b/Validation/Geometry/test/runMaterialBudgetVolume2026DDD_cfg.py new file mode 100644 index 0000000000000..20e808afd8bc7 --- /dev/null +++ b/Validation/Geometry/test/runMaterialBudgetVolume2026DDD_cfg.py @@ -0,0 +1,76 @@ +############################################################################### +# Way to use this: +# cmsRun runMaterialBudgetVolume2026DDD_cfg.py geometry=D92 +# +# Options for geometry D86, D88, D91, D92, D93, D94, D95, D96, D98, D99 +# +############################################################################### +import FWCore.ParameterSet.Config as cms +import os, sys, imp, re +import FWCore.ParameterSet.VarParsing as VarParsing + +#################################################################### +### SETUP OPTIONS +options = VarParsing.VarParsing('standard') +options.register('geometry', + "D88", + VarParsing.VarParsing.multiplicity.singleton, + VarParsing.VarParsing.varType.string, + "geometry of operations: D86, D88, D91, D92, D93, D94, D95, D96, D98, D99") +### get and parse the command line arguments +options.parseArguments() + +print(options) + +#################################################################### +# Use the options + +if (options.geometry == "D94"): + from Configuration.Eras.Era_Phase2C20I13M9_cff import Phase2C20I13M9 + process = cms.Process('MaterialBudgetVolume',Phase2C20I13M9) +else: + from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9 + process = cms.Process('MaterialBudgetVolume',Phase2C17I13M9) + +geomFile = "Configuration.Geometry.GeometryExtended2026" + options.geometry + "Reco_cff" +fileName = "matbdg" + options.geometry + "DDD" + ".root" + +print("Geometry file Name: ", geomFile) +print("Root file Name: ", fileName) + +process.load(geomFile) +process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi") +process.load("Configuration.StandardSequences.MagneticField_cff") +process.load("SimG4Core.Application.g4SimHits_cfi") +process.load("Validation.Geometry.materialBudgetVolume_cfi") + +process.load("IOMC.RandomEngine.IOMC_cff") +process.RandomNumberGeneratorService.g4SimHits.initialSeed = 9876 + +process.load('FWCore.MessageService.MessageLogger_cfi') +process.MessageLogger.cerr.FwkReport.reportEvery = cms.untracked.int32(1000) +if hasattr(process,'MessageLogger'): + process.MessageLogger.MaterialBudget=dict() + +process.source = cms.Source("PoolSource", + noEventSort = cms.untracked.bool(True), + duplicateCheckMode = cms.untracked.string("noDuplicateCheck"), + fileNames = cms.untracked.vstring('file:single_neutrino_random.root') +) + +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(-1) +) + +process.TFileService = cms.Service("TFileService", + fileName = cms.string(fileName) +) + +process.g4SimHits.UseMagneticField = False +process.g4SimHits.Physics.type = 'SimG4Core/Physics/DummyPhysics' +process.g4SimHits.StackingAction.TrackNeutrino = True +process.g4SimHits.Physics.DummyEMPhysics = True +process.g4SimHits.Physics.CutsPerRegion = False + +process.load("Validation.Geometry.materialBudgetVolumeAnalysis_cfi") +process.p1 = cms.Path(process.g4SimHits+process.materialBudgetVolumeAnalysis) diff --git a/Validation/Geometry/test/runMaterialBudgetVolumeDB_cfg.py b/Validation/Geometry/test/runMaterialBudgetVolumeDB_cfg.py index 13bc9b2c8a0d1..15bbc9d3ccba9 100644 --- a/Validation/Geometry/test/runMaterialBudgetVolumeDB_cfg.py +++ b/Validation/Geometry/test/runMaterialBudgetVolumeDB_cfg.py @@ -1,15 +1,51 @@ +############################################################################### +# Way to use this: +# cmsRun runMaterialBudgetVolumeDB_cfg.py type=DDD +# +# Options for type DDD, DD4hep +# +############################################################################### import FWCore.ParameterSet.Config as cms +import os, sys, imp, re +import FWCore.ParameterSet.VarParsing as VarParsing + +#################################################################### +### SETUP OPTIONS +options = VarParsing.VarParsing('standard') +options.register('type', + "DDD", + VarParsing.VarParsing.multiplicity.singleton, + VarParsing.VarParsing.varType.string, + "geometry of operations: DDD, DD4hep") +### get and parse the command line arguments +options.parseArguments() + +print(options) + +#################################################################### +# Use the options + +import FWCore.ParameterSet.Config as cms + +if (options.type == "DDD"): + from Configuration.Eras.Era_Run3_DDD_cff import Run3_DDD + process = cms.Process('PROD',Run3_DDD) + fileName = "matbdgRun3dddDB.root" +else: + from Configuration.Eras.Era_Run3_dd4hep_cff import Run3_dd4hep + process = cms.Process('PROD',Run3_dd4hep) + fileName = "matbdgRun3ddhepDB.root" + +print("Root file Name: ", fileName) -from Configuration.Eras.Era_Run3_cff import Run3 -process = cms.Process('PROD',Run3) -#from Configuration.Eras.Era_Run3_dd4hep_cff import Run3_dd4hep -#process = cms.Process('PROD',Run3_dd4hep) process.load('Configuration.StandardSequences.GeometryRecoDB_cff') process.load('Configuration.StandardSequences.GeometrySimDB_cff') process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') from Configuration.AlCa.GlobalTag import GlobalTag -process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2022_realistic', '') -#process.GlobalTag = GlobalTag(process.GlobalTag, '120X_mcRun3_2021_realistic_dd4hep_v1', '') +if (options.type == "DDD"): + process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2022_realistic', '') +else: + process.GlobalTag = GlobalTag(process.GlobalTag, '120X_mcRun3_2021_realistic_dd4hep_v1', '') process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi") process.load("Configuration.StandardSequences.MagneticField_cff") @@ -35,8 +71,7 @@ ) process.TFileService = cms.Service("TFileService", - fileName = cms.string('matbdgRun3dddDB.root') -# fileName = cms.string('matbdgRun3dd4hepDB.root') + fileName = cms.string(fileName) ) process.g4SimHits.UseMagneticField = False diff --git a/Validation/Geometry/test/runMaterialBudgetVolumeXML_cfg.py b/Validation/Geometry/test/runMaterialBudgetVolumeXML_cfg.py index 17e361c7901f1..5b4cd169ed252 100644 --- a/Validation/Geometry/test/runMaterialBudgetVolumeXML_cfg.py +++ b/Validation/Geometry/test/runMaterialBudgetVolumeXML_cfg.py @@ -1,15 +1,47 @@ +############################################################################### +# Way to use this: +# cmsRun runMaterialBudgetVolumeXML_cfg.py type=DDD +# +# Options for type DDD, DD4hep +# +############################################################################### import FWCore.ParameterSet.Config as cms +import os, sys, imp, re +import FWCore.ParameterSet.VarParsing as VarParsing -from Configuration.Eras.Era_Run3_DDD_cff import Run3_DDD -process = cms.Process('PROD',Run3_DDD) -process.load("Configuration.Geometry.GeometryExtended2021Reco_cff") -#from Configuration.Eras.Era_Run3_dd4hep_cff import Run3_dd4hep -#process = cms.Process('PROD',Run3_dd4hep) -#process.load("Configuration.Geometry.GeometryDD4hepExtended2021Reco_cff") -#from Configuration.Eras.Era_Phase2C11_cff import Phase2C11 -#process = cms.Process('PROD',Phase2C11) -#process.load("Configuration.Geometry.GeometryExtended2026D77Reco_cff") +#################################################################### +### SETUP OPTIONS +options = VarParsing.VarParsing('standard') +options.register('type', + "DDD", + VarParsing.VarParsing.multiplicity.singleton, + VarParsing.VarParsing.varType.string, + "geometry of operations: DDD, DD4hep") +### get and parse the command line arguments +options.parseArguments() +print(options) + +#################################################################### +# Use the options + +import FWCore.ParameterSet.Config as cms + +if (options.type == "DDD"): + from Configuration.Eras.Era_Run3_DDD_cff import Run3_DDD + process = cms.Process('PROD',Run3_DDD) + geomFile = "Configuration.Geometry.GeometryExtended2021Reco_cff" + fileName = "matbdgRun3dddXML.root" +else: + from Configuration.Eras.Era_Run3_dd4hep_cff import Run3_dd4hep + process = cms.Process('PROD',Run3_dd4hep) + geomFile = "Configuration.Geometry.GeometryDD4hepExtended2021Reco_cff" + fileName = "matbdgRun3ddhepXML.root" + +print("Geometry file Name: ", geomFile) +print("Root file Name: ", fileName) + +process.load(geomFile) process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi") process.load("Configuration.StandardSequences.MagneticField_cff") process.load("SimG4Core.Application.g4SimHits_cfi") @@ -34,10 +66,7 @@ ) process.TFileService = cms.Service("TFileService", - fileName = cms.string('matbdgRun3dddXML.root') -# fileName = cms.string('matbdgRun3dd4hepXML.root') -# fileName = cms.string('matbdgPhase2XML.root') -) + fileName = cms.string(fileName)) process.g4SimHits.UseMagneticField = False process.g4SimHits.Physics.type = 'SimG4Core/Physics/DummyPhysics' diff --git a/Validation/Geometry/test/single_neutrino_cfg.py b/Validation/Geometry/test/single_neutrino_cfg.py index e0adb63ae2545..e7a2a3eea3788 100644 --- a/Validation/Geometry/test/single_neutrino_cfg.py +++ b/Validation/Geometry/test/single_neutrino_cfg.py @@ -1,4 +1,4 @@ -# cmsRun single_neutrino_cfg.py nEvents=1000 +# cmsRun single_neutrino_cfg.py nEvents=100000 import FWCore.ParameterSet.Config as cms from FWCore.ParameterSet.VarParsing import VarParsing