From b04428ba000ae3ae495caa7fe4094368d15610c2 Mon Sep 17 00:00:00 2001 From: Sunanda Date: Fri, 20 Aug 2021 17:06:29 +0200 Subject: [PATCH 1/3] Add tools to study big xml file which goes in the D --- .../data/dd4hep/cmsExtendedGeometry2021.xml | 11 +++ .../data/dd4hep/hcalRecNumbering.xml | 33 +++++++ .../data/dd4hep/hcalSimNumbering.xml | 91 +++++++++++++++++++ .../test/python/runDD4HepBigXML_cfg.py | 47 ++++++++++ .../test/runMaterialBudgetVolumeBigXML_cfg.py | 49 ++++++++++ 5 files changed, 231 insertions(+) create mode 100644 SimG4Core/PrintGeomInfo/data/dd4hep/cmsExtendedGeometry2021.xml create mode 100644 SimG4Core/PrintGeomInfo/data/dd4hep/hcalRecNumbering.xml create mode 100644 SimG4Core/PrintGeomInfo/data/dd4hep/hcalSimNumbering.xml create mode 100644 SimG4Core/PrintGeomInfo/test/python/runDD4HepBigXML_cfg.py create mode 100644 Validation/Geometry/test/runMaterialBudgetVolumeBigXML_cfg.py diff --git a/SimG4Core/PrintGeomInfo/data/dd4hep/cmsExtendedGeometry2021.xml b/SimG4Core/PrintGeomInfo/data/dd4hep/cmsExtendedGeometry2021.xml new file mode 100644 index 0000000000000..0ca0d68473e83 --- /dev/null +++ b/SimG4Core/PrintGeomInfo/data/dd4hep/cmsExtendedGeometry2021.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/SimG4Core/PrintGeomInfo/data/dd4hep/hcalRecNumbering.xml b/SimG4Core/PrintGeomInfo/data/dd4hep/hcalRecNumbering.xml new file mode 100644 index 0000000000000..da8eb8002a5d4 --- /dev/null +++ b/SimG4Core/PrintGeomInfo/data/dd4hep/hcalRecNumbering.xml @@ -0,0 +1,33 @@ + + + + + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 + + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 + + + 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4 + + + 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 + + + 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 + + + 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 + + + 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6 + + + 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7 + + + + diff --git a/SimG4Core/PrintGeomInfo/data/dd4hep/hcalSimNumbering.xml b/SimG4Core/PrintGeomInfo/data/dd4hep/hcalSimNumbering.xml new file mode 100644 index 0000000000000..4145c1e4fb8c1 --- /dev/null +++ b/SimG4Core/PrintGeomInfo/data/dd4hep/hcalSimNumbering.xml @@ -0,0 +1,91 @@ + + + + + + 0.0*deg, 0.0*deg, 0.0*deg, 10.0*deg, 10.0*deg + + + 0.000, 0.087, 0.174, 0.261, 0.348, 0.435, 0.522, 0.609, 0.696, + 0.783, 0.870, 0.957, 1.044, 1.131, 1.218, 1.305, 1.392, 1.479, + 1.566, 1.653, 1.740, 1.830, 1.930, 2.043, 2.172, 2.322, 2.500, + 2.650, 2.868, 3.000 + + + 12.50*cm, 16.90*cm, 20.10*cm, 24.00*cm, 28.60*cm, 34.00*cm, + 40.60*cm, 48.30*cm, 57.60*cm, 68.60*cm, 81.80*cm, 97.50*cm, + 116.20*cm, 130.00*cm + + + 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, + 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, + 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, 10.0*deg, + 10.0*deg, 10.0*deg, 10.0*deg, 10.0*deg, 10.0*deg, 10.0*deg, + 10.0*deg, 10.0*deg + + + 10.0*deg, 10.0*deg, 10.0*deg, 10.0*deg, 10.0*deg, 10.0*deg, + 10.0*deg, 10.0*deg, 10.0*deg, 10.0*deg, 10.0*deg, 20.0*deg, + 20.0*deg + + + 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4 + + + 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 + + + 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 + + + 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 + + + 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6 + + + 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7 + + + 1, 16, 29, 1 + + + 16, 29, 41, 15 + + + 4, 7, 4, 4 + + + 1.392, 3.000, 5.500, 1.305 + + + 22.0*cm, 165.0*cm, 30.0*cm, 0.0*cm, 1115.0*cm, 0.375*cm, + 1137.0*cm + + + 15, 29, 4, 10, 5, 2, 4, 18, 19, 11, 12, 13, 14, 3, 4, 3, 1, 0 + + + 0.5, 1.2 + + + 117.0, 117.0, 117.0, 217.0 + + + 0, 0, 0, 0 + + + 178.0, 178.0, 178.0, 178.0, 178.0, 178.0, 178.0 + + + 0, 0, 0, 0, 0, 0, 0 + + + 2.840, 2.090, 2.840, 2.090 + + + 0, 0, 0, 0 + + + + diff --git a/SimG4Core/PrintGeomInfo/test/python/runDD4HepBigXML_cfg.py b/SimG4Core/PrintGeomInfo/test/python/runDD4HepBigXML_cfg.py new file mode 100644 index 0000000000000..564193e4fd96b --- /dev/null +++ b/SimG4Core/PrintGeomInfo/test/python/runDD4HepBigXML_cfg.py @@ -0,0 +1,47 @@ +import FWCore.ParameterSet.Config as cms + +from Configuration.Eras.Era_Run3_dd4hep_cff import Run3_dd4hep +process = cms.Process('G4PrintGeometry',Run3_dd4hep) +process.load("Configuration.Geometry.GeometryDD4hep_cff") +process.load("Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cff") +process.load("Geometry.EcalCommonData.ecalSimulationParameters_cff") +process.load("Geometry.HcalCommonData.hcalDDDSimConstants_cff") +process.load("Geometry.HcalCommonData.hcalDDDRecConstants_cfi") +process.load("Geometry.MuonNumbering.muonGeometryConstants_cff") +process.load("Geometry.MuonNumbering.muonOffsetESProducer_cff") +process.load('FWCore.MessageService.MessageLogger_cfi') + +from SimG4Core.PrintGeomInfo.g4PrintGeomInfo_cfi import * + +process = printGeomInfo(process) + +if hasattr(process,'MessageLogger'): + process.MessageLogger.G4cerr=dict() + process.MessageLogger.G4cout=dict() + +process.DDDetectorESProducer.confGeomXMLFiles = cms.FileInPath("SimG4Core/PrintGeomInfo/data/dd4hep/cmsExtendedGeometry2021.xml") + +process.g4SimHits.Watchers = cms.VPSet(cms.PSet( + DumpSummary = cms.untracked.bool(True), + DumpLVTree = cms.untracked.bool(False), + DumpMaterial = cms.untracked.bool(False), + DumpLVList = cms.untracked.bool(False), + DumpLV = cms.untracked.bool(False), + DumpSolid = cms.untracked.bool(False), + DumpAttributes = cms.untracked.bool(False), + DumpPV = cms.untracked.bool(False), + DumpRotation = cms.untracked.bool(False), + DumpReplica = cms.untracked.bool(False), + DumpTouch = cms.untracked.bool(False), + DumpSense = cms.untracked.bool(False), + DD4Hep = cms.untracked.bool(True), + Name = cms.untracked.string(''), + Names = cms.untracked.vstring(''), + MaterialFileName = cms.untracked.string('matfileBigDD4Hep.txt'), + SolidFileName = cms.untracked.string('solidfileBigDD4Hep.txt'), + LVFileName = cms.untracked.string('lvfileBigDD4Hep.txt'), + PVFileName = cms.untracked.string('pvfileBigDD4Hep.txt'), + TouchFileName = cms.untracked.string('touchfileBigDD4Hep.txt'), + FileDetail = cms.untracked.bool(True), + type = cms.string('PrintGeomInfoAction') +)) diff --git a/Validation/Geometry/test/runMaterialBudgetVolumeBigXML_cfg.py b/Validation/Geometry/test/runMaterialBudgetVolumeBigXML_cfg.py new file mode 100644 index 0000000000000..741178c68e48f --- /dev/null +++ b/Validation/Geometry/test/runMaterialBudgetVolumeBigXML_cfg.py @@ -0,0 +1,49 @@ +import FWCore.ParameterSet.Config as cms + +from Configuration.Eras.Era_Run3_dd4hep_cff import Run3_dd4hep +process = cms.Process('PROD',Run3_dd4hep) +process.load("Configuration.Geometry.GeometryDD4hepExtended2021Reco_cff") +process.load("Configuration.Geometry.GeometryDD4hep_cff") +process.load("Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cff") +process.load("Geometry.EcalCommonData.ecalSimulationParameters_cff") +process.load("Geometry.HcalCommonData.hcalDDDSimConstants_cff") +process.load("Geometry.HcalCommonData.hcalDDDRecConstants_cfi") +process.load("Geometry.MuonNumbering.muonGeometryConstants_cff") +process.load("Geometry.MuonNumbering.muonOffsetESProducer_cff") + +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('matbdgRun3dd4hepBigXML.root') +) + +process.DDDetectorESProducer.confGeomXMLFiles = cms.FileInPath("SimG4Core/PrintGeomInfo/data/dd4hep/cmsExtendedGeometry2021.xml") +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) From 076def72d5ed387490aaa2cba1f179dbd745b890 Mon Sep 17 00:00:00 2001 From: Sunanda Date: Sat, 21 Aug 2021 00:54:08 +0200 Subject: [PATCH 2/3] Some changes made for testing big xml from DDD --- .../data/dd4hep/cmsExtendedGeometry2021.xml | 6 +++--- .../PrintGeomInfo/data/{dd4hep => }/hcalRecNumbering.xml | 0 .../PrintGeomInfo/data/{dd4hep => }/hcalSimNumbering.xml | 0 .../PrintGeomInfo/python/cmsExtendedGeometry2021_cfi.py | 9 +++++++++ 4 files changed, 12 insertions(+), 3 deletions(-) rename SimG4Core/PrintGeomInfo/data/{dd4hep => }/hcalRecNumbering.xml (100%) rename SimG4Core/PrintGeomInfo/data/{dd4hep => }/hcalSimNumbering.xml (100%) create mode 100644 SimG4Core/PrintGeomInfo/python/cmsExtendedGeometry2021_cfi.py diff --git a/SimG4Core/PrintGeomInfo/data/dd4hep/cmsExtendedGeometry2021.xml b/SimG4Core/PrintGeomInfo/data/dd4hep/cmsExtendedGeometry2021.xml index 0ca0d68473e83..1f8964f5f589f 100644 --- a/SimG4Core/PrintGeomInfo/data/dd4hep/cmsExtendedGeometry2021.xml +++ b/SimG4Core/PrintGeomInfo/data/dd4hep/cmsExtendedGeometry2021.xml @@ -4,8 +4,8 @@ - - - + + + diff --git a/SimG4Core/PrintGeomInfo/data/dd4hep/hcalRecNumbering.xml b/SimG4Core/PrintGeomInfo/data/hcalRecNumbering.xml similarity index 100% rename from SimG4Core/PrintGeomInfo/data/dd4hep/hcalRecNumbering.xml rename to SimG4Core/PrintGeomInfo/data/hcalRecNumbering.xml diff --git a/SimG4Core/PrintGeomInfo/data/dd4hep/hcalSimNumbering.xml b/SimG4Core/PrintGeomInfo/data/hcalSimNumbering.xml similarity index 100% rename from SimG4Core/PrintGeomInfo/data/dd4hep/hcalSimNumbering.xml rename to SimG4Core/PrintGeomInfo/data/hcalSimNumbering.xml diff --git a/SimG4Core/PrintGeomInfo/python/cmsExtendedGeometry2021_cfi.py b/SimG4Core/PrintGeomInfo/python/cmsExtendedGeometry2021_cfi.py new file mode 100644 index 0000000000000..60e686a9dea8f --- /dev/null +++ b/SimG4Core/PrintGeomInfo/python/cmsExtendedGeometry2021_cfi.py @@ -0,0 +1,9 @@ +import FWCore.ParameterSet.Config as cms + +XMLIdealGeometryESSource = cms.ESSource("XMLIdealGeometryESSource", + geomXMLFiles = cms.vstring( + 'SimG4Core/PrintGeomInfo/data/dddDBBigFile.xml', + 'SimG4Core/PrintGeomInfo/data/hcalSimNumbering.xml', + 'SimG4Core/PrintGeomInfo/data/hcalRecNumbering.xml'), + rootNodeName = cms.string('cms:OCMS') +) From ec08c83ccecdd3c3875e44bff8ffef7db4ee4be6 Mon Sep 17 00:00:00 2001 From: Sunanda Date: Sat, 21 Aug 2021 01:41:39 +0200 Subject: [PATCH 3/3] Add cfg's for DDD Big XML --- .../test/python/runDDDBigXML_cfg.py | 45 ++++++++++++++++++ ...unMaterialBudgetVolumeBigDD4HepXML_cfg.py} | 0 .../runMaterialBudgetVolumeBigDDDXML_cfg.py | 47 +++++++++++++++++++ 3 files changed, 92 insertions(+) create mode 100644 SimG4Core/PrintGeomInfo/test/python/runDDDBigXML_cfg.py rename Validation/Geometry/test/{runMaterialBudgetVolumeBigXML_cfg.py => runMaterialBudgetVolumeBigDD4HepXML_cfg.py} (100%) create mode 100644 Validation/Geometry/test/runMaterialBudgetVolumeBigDDDXML_cfg.py diff --git a/SimG4Core/PrintGeomInfo/test/python/runDDDBigXML_cfg.py b/SimG4Core/PrintGeomInfo/test/python/runDDDBigXML_cfg.py new file mode 100644 index 0000000000000..5a9280f668273 --- /dev/null +++ b/SimG4Core/PrintGeomInfo/test/python/runDDDBigXML_cfg.py @@ -0,0 +1,45 @@ +import FWCore.ParameterSet.Config as cms + +from Configuration.Eras.Era_Run3_cff import Run3 +process = cms.Process('G4PrintGeometry',Run3) +process.load('SimG4Core.PrintGeomInfo.cmsExtendedGeometry2021_cfi') +process.load("Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cff") +process.load("Geometry.EcalCommonData.ecalSimulationParameters_cff") +process.load("Geometry.HcalCommonData.hcalDDDSimConstants_cff") +process.load("Geometry.HcalCommonData.hcalDDDRecConstants_cfi") +process.load("Geometry.MuonNumbering.muonGeometryConstants_cff") +process.load("Geometry.MuonNumbering.muonOffsetESProducer_cff") +process.load('FWCore.MessageService.MessageLogger_cfi') + +from SimG4Core.PrintGeomInfo.g4PrintGeomInfo_cfi import * + +process = printGeomInfo(process) + +if hasattr(process,'MessageLogger'): + process.MessageLogger.G4cerr=dict() + process.MessageLogger.G4cout=dict() + +process.g4SimHits.Watchers = cms.VPSet(cms.PSet( + DumpSummary = cms.untracked.bool(True), + DumpLVTree = cms.untracked.bool(False), + DumpMaterial = cms.untracked.bool(False), + DumpLVList = cms.untracked.bool(False), + DumpLV = cms.untracked.bool(False), + DumpSolid = cms.untracked.bool(False), + DumpAttributes = cms.untracked.bool(False), + DumpPV = cms.untracked.bool(False), + DumpRotation = cms.untracked.bool(False), + DumpReplica = cms.untracked.bool(False), + DumpTouch = cms.untracked.bool(False), + DumpSense = cms.untracked.bool(False), + DD4Hep = cms.untracked.bool(False), + Name = cms.untracked.string(''), + Names = cms.untracked.vstring(''), + MaterialFileName = cms.untracked.string('matfileBigDDD.txt'), + SolidFileName = cms.untracked.string('solidfileBigDDD.txt'), + LVFileName = cms.untracked.string('lvfileBigDDD.txt'), + PVFileName = cms.untracked.string('pvfileBigDDD.txt'), + TouchFileName = cms.untracked.string('touchfileBigDDD.txt'), + FileDetail = cms.untracked.bool(True), + type = cms.string('PrintGeomInfoAction') +)) diff --git a/Validation/Geometry/test/runMaterialBudgetVolumeBigXML_cfg.py b/Validation/Geometry/test/runMaterialBudgetVolumeBigDD4HepXML_cfg.py similarity index 100% rename from Validation/Geometry/test/runMaterialBudgetVolumeBigXML_cfg.py rename to Validation/Geometry/test/runMaterialBudgetVolumeBigDD4HepXML_cfg.py diff --git a/Validation/Geometry/test/runMaterialBudgetVolumeBigDDDXML_cfg.py b/Validation/Geometry/test/runMaterialBudgetVolumeBigDDDXML_cfg.py new file mode 100644 index 0000000000000..5a5c14cdbaad7 --- /dev/null +++ b/Validation/Geometry/test/runMaterialBudgetVolumeBigDDDXML_cfg.py @@ -0,0 +1,47 @@ +import FWCore.ParameterSet.Config as cms + +from Configuration.Eras.Era_Run3_cff import Run3 +process = cms.Process('PROD',Run3) +process.load('SimG4Core.PrintGeomInfo.cmsExtendedGeometry2021_cfi') +process.load("Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cff") +process.load("Geometry.EcalCommonData.ecalSimulationParameters_cff") +process.load("Geometry.HcalCommonData.hcalDDDSimConstants_cff") +process.load("Geometry.HcalCommonData.hcalDDDRecConstants_cfi") +process.load("Geometry.MuonNumbering.muonGeometryConstants_cff") +process.load("Geometry.MuonNumbering.muonOffsetESProducer_cff") + +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('matbdgRun3dddBigXML.root') +) + +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)