From 5e6c0de221133beb1efa0c90137639e8234c3ad5 Mon Sep 17 00:00:00 2001 From: Sunanda Date: Thu, 5 Sep 2019 18:37:49 +0200 Subject: [PATCH 1/2] Make changes to conform G4/GV Comparison --- Geometry/CMSCommonData/data/cmsProdCuts.xml | 13 ++ .../cmsExtendedGeometry2018NoSDXML_cfi.py | 1 + .../cmsExtendedGeometry2026D45NoSDXML_cfi.py | 114 ++++++++++++++++++ SimG4Core/Application/interface/RunManager.h | 1 + .../Application/interface/RunManagerMT.h | 1 + SimG4Core/Application/python/g4SimHits_cfi.py | 1 + SimG4Core/Application/src/RunManager.cc | 4 +- SimG4Core/Application/src/RunManagerMT.cc | 4 +- 8 files changed, 137 insertions(+), 2 deletions(-) create mode 100644 Geometry/CMSCommonData/data/cmsProdCuts.xml create mode 100644 Geometry/CMSCommonData/python/cmsExtendedGeometry2026D45NoSDXML_cfi.py diff --git a/Geometry/CMSCommonData/data/cmsProdCuts.xml b/Geometry/CMSCommonData/data/cmsProdCuts.xml new file mode 100644 index 0000000000000..4625c22d65e32 --- /dev/null +++ b/Geometry/CMSCommonData/data/cmsProdCuts.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/Geometry/CMSCommonData/python/cmsExtendedGeometry2018NoSDXML_cfi.py b/Geometry/CMSCommonData/python/cmsExtendedGeometry2018NoSDXML_cfi.py index 416389c9b90c2..9c30a8aa3aebf 100644 --- a/Geometry/CMSCommonData/python/cmsExtendedGeometry2018NoSDXML_cfi.py +++ b/Geometry/CMSCommonData/python/cmsExtendedGeometry2018NoSDXML_cfi.py @@ -262,6 +262,7 @@ 'Geometry/RPCGeometryBuilder/data/RPCSpecs.xml', 'Geometry/GEMGeometryBuilder/data/GEMSpecsFilter17.xml', 'Geometry/GEMGeometryBuilder/data/v4/GEMSpecs.xml', + 'Geometry/CMSCommonData/data/cmsProdCuts.xml', 'Geometry/CMSCommonData/data/FieldParameters.xml'), rootNodeName = cms.string('cms:OCMS') ) diff --git a/Geometry/CMSCommonData/python/cmsExtendedGeometry2026D45NoSDXML_cfi.py b/Geometry/CMSCommonData/python/cmsExtendedGeometry2026D45NoSDXML_cfi.py new file mode 100644 index 0000000000000..e91487e6c8135 --- /dev/null +++ b/Geometry/CMSCommonData/python/cmsExtendedGeometry2026D45NoSDXML_cfi.py @@ -0,0 +1,114 @@ +import FWCore.ParameterSet.Config as cms + +# This config was generated automatically using generate2026Geometry.py +# If you notice a mistake, please update the generating script, not just this config + +XMLIdealGeometryESSource = cms.ESSource("XMLIdealGeometryESSource", + geomXMLFiles = cms.vstring( + 'Geometry/CMSCommonData/data/materials.xml', + 'Geometry/CMSCommonData/data/rotations.xml', + 'Geometry/CMSCommonData/data/extend/v2/cmsextent.xml', + 'Geometry/CMSCommonData/data/cms/2026/v2/cms.xml', + 'Geometry/CMSCommonData/data/eta3/etaMax.xml', + 'Geometry/CMSCommonData/data/cmsMother.xml', + 'Geometry/CMSCommonData/data/cmsTracker.xml', + 'Geometry/CMSCommonData/data/caloBase/2026/v2/caloBase.xml', + 'Geometry/CMSCommonData/data/cmsCalo.xml', + 'Geometry/CMSCommonData/data/muonBase/2026/v2/muonBase.xml', + 'Geometry/CMSCommonData/data/cmsMuon.xml', + 'Geometry/CMSCommonData/data/mgnt.xml', + 'Geometry/CMSCommonData/data/beampipe/2026/v1/beampipe.xml', + 'Geometry/CMSCommonData/data/cmsBeam/2026/v1/cmsBeam.xml', + 'Geometry/CMSCommonData/data/muonMB.xml', + 'Geometry/CMSCommonData/data/muonMagnet.xml', + 'Geometry/CMSCommonData/data/cavern/2017/v2/cavern.xml', + 'Geometry/CMSCommonData/data/cavernData/2017/v1/cavernData.xml', + 'Geometry/CMSCommonData/data/cavernFloor/2017/v1/cavernFloor.xml', + 'Geometry/TrackerCommonData/data/PhaseII/trackerParameters.xml', + 'Geometry/TrackerCommonData/data/pixfwdCommon.xml', + 'Geometry/TrackerCommonData/data/PhaseII/TiltedTracker613_MB_2019_04/pixfwd.xml', + 'Geometry/TrackerCommonData/data/PhaseII/TiltedTracker613_MB_2019_04/pixbar.xml', + 'Geometry/TrackerCommonData/data/trackermaterial.xml', + 'Geometry/TrackerCommonData/data/PhaseII/TiltedTracker404/otst.xml', + 'Geometry/TrackerCommonData/data/PhaseII/TiltedTracker613_MB_2019_04/tracker.xml', + 'Geometry/TrackerCommonData/data/PhaseII/TiltedTracker613_MB_2019_04/pixel.xml', + 'Geometry/TrackerCommonData/data/PhaseII/TiltedTracker404/trackerbar.xml', + 'Geometry/TrackerCommonData/data/PhaseII/TiltedTracker404/trackerfwd.xml', + 'Geometry/TrackerCommonData/data/PhaseII/TiltedTracker404/trackerStructureTopology.xml', + 'Geometry/TrackerCommonData/data/PhaseII/TiltedTracker613/pixelStructureTopology.xml', + 'Geometry/TrackerSimData/data/PhaseII/TiltedTracker404/trackersens.xml', + 'Geometry/TrackerSimData/data/PhaseII/TiltedTracker404/pixelsens.xml', + 'Geometry/TrackerRecoData/data/PhaseII/TiltedTracker613_MB_2019_04/trackerRecoMaterial.xml', + 'Geometry/TrackerSimData/data/PhaseII/TiltedTracker404/trackerProdCuts.xml', + 'Geometry/TrackerSimData/data/PhaseII/TiltedTracker404/pixelProdCuts.xml', + 'Geometry/TrackerSimData/data/trackerProdCutsBEAM.xml', + 'Geometry/EcalCommonData/data/eregalgo/2026/v2/eregalgo.xml', + 'Geometry/EcalCommonData/data/ectkcable/2026/v1/ectkcable.xml', + 'Geometry/EcalCommonData/data/ectkcablemat/2026/v1/ectkcablemat.xml', + 'Geometry/EcalCommonData/data/ebalgo.xml', + 'Geometry/EcalCommonData/data/ebcon.xml', + 'Geometry/EcalCommonData/data/ebrot.xml', + 'Geometry/HcalCommonData/data/hcalrotations.xml', + 'Geometry/HcalCommonData/data/hcal/v2/hcalalgo.xml', + 'Geometry/HcalCommonData/data/hcalbarrelalgo.xml', + 'Geometry/HcalCommonData/data/hcalcablealgo/v2/hcalcablealgo.xml', + 'Geometry/HcalCommonData/data/hcalouteralgo.xml', + 'Geometry/HcalCommonData/data/hcalforwardalgo.xml', + 'Geometry/HcalCommonData/data/hcalSimNumbering/NoHE/hcalSimNumbering.xml', + 'Geometry/HcalCommonData/data/hcalRecNumbering/NoHE/hcalRecNumbering.xml', + 'Geometry/HcalCommonData/data/average/hcalforwardmaterial.xml', + 'Geometry/HGCalCommonData/data/hgcalMaterial/v1/hgcalMaterial.xml', + 'Geometry/HGCalCommonData/data/hgcal/v10/hgcal.xml', + 'Geometry/HGCalCommonData/data/hgcalEE/v10/hgcalEE.xml', + 'Geometry/HGCalCommonData/data/hgcalHEsil/v10/hgcalHEsil.xml', + 'Geometry/HGCalCommonData/data/hgcalHEmix/v10/hgcalHEmix.xml', + 'Geometry/HGCalCommonData/data/hgcalwafer/v9/hgcalwafer.xml', + 'Geometry/HGCalCommonData/data/hgcalcell/v9/hgcalcell.xml', + 'Geometry/HGCalCommonData/data/hgcalCons/v10/hgcalCons.xml', + 'Geometry/MuonCommonData/data/mbCommon/2017/v2/mbCommon.xml', + 'Geometry/MuonCommonData/data/mb1/2015/v1/mb1.xml', + 'Geometry/MuonCommonData/data/mb2/2015/v1/mb2.xml', + 'Geometry/MuonCommonData/data/mb3/2015/v1/mb3.xml', + 'Geometry/MuonCommonData/data/mb4/2015/v1/mb4.xml', + 'Geometry/MuonCommonData/data/muonYoke/2021/v2/muonYoke.xml', + 'Geometry/MuonCommonData/data/mf/2026/v2/mf.xml', + 'Geometry/MuonCommonData/data/rpcf/2026/v1/rpcf.xml', + 'Geometry/MuonCommonData/data/gemf/TDR_BaseLine/gemf.xml', + 'Geometry/MuonCommonData/data/gem11/TDR_BaseLine/gem11.xml', + 'Geometry/MuonCommonData/data/gem21/TDR_Dev/gem21.xml', + 'Geometry/MuonCommonData/data/csc/2015/v1/csc.xml', + 'Geometry/MuonCommonData/data/mfshield/2026/v1/mfshield.xml', + 'Geometry/MuonCommonData/data/me0/TDR_Dev/me0.xml', + 'Geometry/ForwardCommonData/data/forwardshield/2017/v1/forwardshield.xml', + 'Geometry/ForwardCommonData/data/brmrotations.xml', + 'Geometry/ForwardCommonData/data/PostLS2/brm.xml', + 'Geometry/ForwardCommonData/data/zdcmaterials.xml', + 'Geometry/ForwardCommonData/data/lumimaterials.xml', + 'Geometry/ForwardCommonData/data/zdcrotations.xml', + 'Geometry/ForwardCommonData/data/lumirotations.xml', + 'Geometry/ForwardCommonData/data/zdc.xml', + 'Geometry/ForwardCommonData/data/zdclumi.xml', + 'Geometry/ForwardCommonData/data/cmszdc.xml', + 'Geometry/MTDCommonData/data/btl.xml', + 'Geometry/MTDCommonData/data/etl/v2/etl.xml', + 'Geometry/MTDCommonData/data/CrystalBarPhiFlat/v3/mtd.xml', + 'Geometry/MTDCommonData/data/CrystalBarPhiFlat/mtdStructureTopology.xml', + 'Geometry/MTDCommonData/data/CrystalBarPhiFlat/mtdParameters.xml', + )+ + cms.vstring( + 'Geometry/MuonCommonData/data/muonNumbering/TDR_DeV/muonNumbering.xml', + 'Geometry/HcalSimData/data/hf.xml', + 'Geometry/HcalSimData/data/hfpmt.xml', + 'Geometry/HcalSimData/data/hffibrebundle.xml', + 'Geometry/HcalSimData/data/CaloUtil.xml', + 'Geometry/DTGeometryBuilder/data/dtSpecsFilter.xml', + 'Geometry/CSCGeometryBuilder/data/cscSpecsFilter.xml', + 'Geometry/CSCGeometryBuilder/data/cscSpecs.xml', + 'Geometry/RPCGeometryBuilder/data/2026/v1/RPCSpecs.xml', + 'Geometry/GEMGeometryBuilder/data/v7/GEMSpecsFilter.xml', + 'Geometry/GEMGeometryBuilder/data/v7/GEMSpecs.xml', + 'Geometry/CMSCommonData/data/cmsProdCuts.xml', + 'Geometry/CMSCommonData/data/FieldParameters.xml', + ), + rootNodeName = cms.string('cms:OCMS') +) diff --git a/SimG4Core/Application/interface/RunManager.h b/SimG4Core/Application/interface/RunManager.h index a621ff3640d40..6953f15b7096e 100644 --- a/SimG4Core/Application/interface/RunManager.h +++ b/SimG4Core/Application/interface/RunManager.h @@ -114,6 +114,7 @@ class RunManager { std::string m_PhysicsTablesDir; bool m_StorePhysicsTables; bool m_RestorePhysicsTables; + bool m_UseParametrisedEMPhysics; int m_EvtMgrVerbosity; bool m_check; edm::ParameterSet m_pField; diff --git a/SimG4Core/Application/interface/RunManagerMT.h b/SimG4Core/Application/interface/RunManagerMT.h index 3307a66445ce7..2371301df72b8 100644 --- a/SimG4Core/Application/interface/RunManagerMT.h +++ b/SimG4Core/Application/interface/RunManagerMT.h @@ -102,6 +102,7 @@ class RunManagerMT { const std::string m_PhysicsTablesDir; bool m_StorePhysicsTables; bool m_RestorePhysicsTables; + bool m_UseParametrisedEMPhysics; bool m_check; edm::ParameterSet m_pPhysics; edm::ParameterSet m_pRunAction; diff --git a/SimG4Core/Application/python/g4SimHits_cfi.py b/SimG4Core/Application/python/g4SimHits_cfi.py index 3318b16457a87..247c3baf9cdd7 100644 --- a/SimG4Core/Application/python/g4SimHits_cfi.py +++ b/SimG4Core/Application/python/g4SimHits_cfi.py @@ -50,6 +50,7 @@ PhysicsTablesDirectory = cms.untracked.string('PhysicsTables'), StorePhysicsTables = cms.untracked.bool(False), RestorePhysicsTables = cms.untracked.bool(False), + UseParametrisedEMPhysics = cms.untracked.bool(False), CheckGeometry = cms.untracked.bool(False), G4CheckOverlap = cms.untracked.PSet( OutputBaseName = cms.string('2017'), diff --git a/SimG4Core/Application/src/RunManager.cc b/SimG4Core/Application/src/RunManager.cc index 4c0afa32723f7..d3054c036db9b 100644 --- a/SimG4Core/Application/src/RunManager.cc +++ b/SimG4Core/Application/src/RunManager.cc @@ -130,6 +130,7 @@ RunManager::RunManager(edm::ParameterSet const& p, edm::ConsumesCollector&& iC) m_PhysicsTablesDir(p.getUntrackedParameter("PhysicsTablesDirectory", "")), m_StorePhysicsTables(p.getUntrackedParameter("StorePhysicsTables", false)), m_RestorePhysicsTables(p.getUntrackedParameter("RestorePhysicsTables", false)), + m_UseParametrisedEMPhysics(p.getUntrackedParameter("UseParametrisedEMPhysics")), m_EvtMgrVerbosity(p.getUntrackedParameter("G4EventManagerVerbosity", 0)), m_pField(p.getParameter("MagneticField")), m_pGenerator(p.getParameter("Generator")), @@ -303,7 +304,8 @@ void RunManager::initG4(const edm::EventSetup& es) { // adding GFlash, Russian Roulette for eletrons and gamma, // step limiters on top of any Physics Lists - phys->RegisterPhysics(new ParametrisedEMPhysics("EMoptions", m_pPhysics)); + if (m_UseParametrisedEMPhysics) + phys->RegisterPhysics(new ParametrisedEMPhysics("EMoptions", m_pPhysics)); std::string tableDir = m_PhysicsTablesDir; if (m_RestorePhysicsTables) { diff --git a/SimG4Core/Application/src/RunManagerMT.cc b/SimG4Core/Application/src/RunManagerMT.cc index 2f3a312cee5f5..5283dbf8ad42a 100644 --- a/SimG4Core/Application/src/RunManagerMT.cc +++ b/SimG4Core/Application/src/RunManagerMT.cc @@ -64,6 +64,7 @@ RunManagerMT::RunManagerMT(edm::ParameterSet const& p) m_PhysicsTablesDir(p.getUntrackedParameter("PhysicsTablesDirectory", "")), m_StorePhysicsTables(p.getUntrackedParameter("StorePhysicsTables", false)), m_RestorePhysicsTables(p.getUntrackedParameter("RestorePhysicsTables", false)), + m_UseParametrisedEMPhysics(p.getUntrackedParameter("UseParametrisedEMPhysics")), m_pPhysics(p.getParameter("Physics")), m_pRunAction(p.getParameter("RunAction")), m_g4overlap(p.getUntrackedParameter("G4CheckOverlap")), @@ -154,7 +155,8 @@ void RunManagerMT::initG4(const DDCompactView* pDD, // adding GFlash, Russian Roulette for eletrons and gamma, // step limiters on top of any Physics Lists - phys->RegisterPhysics(new ParametrisedEMPhysics("EMoptions", m_pPhysics)); + if (m_UseParametrisedEMPhysics) + phys->RegisterPhysics(new ParametrisedEMPhysics("EMoptions", m_pPhysics)); if (m_RestorePhysicsTables) { m_physicsList->SetPhysicsTableRetrieved(m_PhysicsTablesDir); From 09bff108f99614029778a060bdf54ad461875ae1 Mon Sep 17 00:00:00 2001 From: Sunanda Date: Thu, 5 Sep 2019 19:42:25 +0200 Subject: [PATCH 2/2] Correct the flag --- SimG4Core/Application/python/g4SimHits_cfi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SimG4Core/Application/python/g4SimHits_cfi.py b/SimG4Core/Application/python/g4SimHits_cfi.py index 247c3baf9cdd7..2f3d7964d1a01 100644 --- a/SimG4Core/Application/python/g4SimHits_cfi.py +++ b/SimG4Core/Application/python/g4SimHits_cfi.py @@ -50,7 +50,7 @@ PhysicsTablesDirectory = cms.untracked.string('PhysicsTables'), StorePhysicsTables = cms.untracked.bool(False), RestorePhysicsTables = cms.untracked.bool(False), - UseParametrisedEMPhysics = cms.untracked.bool(False), + UseParametrisedEMPhysics = cms.untracked.bool(True), CheckGeometry = cms.untracked.bool(False), G4CheckOverlap = cms.untracked.PSet( OutputBaseName = cms.string('2017'),