Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phase2-gex27 First step to use dd4hep for a phase2 scenario #31902

Merged
merged 1 commit into from Oct 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -0,0 +1,60 @@
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

from Configuration.Geometry.GeometryDD4hepExtended2026D49_cff import *

# tracker
from Geometry.CommonTopologies.globalTrackingGeometry_cfi import *
from RecoTracker.GeometryESProducer.TrackerRecoGeometryESProducer_cfi import *
from Geometry.TrackerGeometryBuilder.trackerParameters_cff import *
from Geometry.TrackerNumberingBuilder.trackerTopology_cfi import *
from Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff import *
trackerGeometry.applyAlignment = cms.bool(False)

# calo
from Geometry.CaloEventSetup.HGCalV9Topology_cfi import *
from Geometry.HGCalGeometry.HGCalGeometryESProducer_cfi import *
from Geometry.CaloEventSetup.CaloTopology_cfi import *
from Geometry.CaloEventSetup.CaloGeometryBuilder_cfi import *
CaloGeometryBuilder = cms.ESProducer("CaloGeometryBuilder",
SelectedCalos = cms.vstring("HCAL",
"ZDC",
"EcalBarrel",
"TOWER",
"HGCalEESensitive",
"HGCalHESiliconSensitive",
"HGCalHEScintillatorSensitive"
)
)
from Geometry.EcalAlgo.EcalBarrelGeometry_cfi import *
from Geometry.HcalEventSetup.HcalGeometry_cfi import *
from Geometry.HcalEventSetup.CaloTowerGeometry_cfi import *
from Geometry.HcalEventSetup.CaloTowerTopology_cfi import *
from Geometry.HcalCommonData.hcalDDDRecConstants_cfi import *
from Geometry.HcalEventSetup.hcalTopologyIdeal_cfi import *
from Geometry.CaloEventSetup.EcalTrigTowerConstituents_cfi import *
from Geometry.EcalMapping.EcalMapping_cfi import *
from Geometry.EcalMapping.EcalMappingRecord_cfi import *

# muon
from Geometry.MuonNumbering.muonNumberingInitialization_cfi import *
from RecoMuon.DetLayers.muonDetLayerGeometry_cfi import *
from Geometry.GEMGeometryBuilder.gemGeometry_cfi import *
from Geometry.GEMGeometryBuilder.me0Geometry_cfi import *
from Geometry.CSCGeometryBuilder.idealForDigiCscGeometry_cff import *
from Geometry.DTGeometryBuilder.idealForDigiDtGeometry_cff import *

# forward
from Geometry.ForwardGeometry.ForwardGeometry_cfi import *

# timing
from RecoMTD.DetLayers.mtdDetLayerGeometry_cfi import *
from Geometry.MTDGeometryBuilder.mtdParameters_cfi import *
from Geometry.MTDNumberingBuilder.mtdNumberingGeometry_cfi import *
from Geometry.MTDNumberingBuilder.mtdTopology_cfi import *
from Geometry.MTDGeometryBuilder.mtdGeometry_cfi import *
from Geometry.MTDGeometryBuilder.idealForDigiMTDGeometry_cff import *
mtdGeometry.applyAlignment = cms.bool(False)

30 changes: 30 additions & 0 deletions Configuration/Geometry/python/GeometryDD4hepExtended2026D49_cff.py
@@ -0,0 +1,30 @@
import FWCore.ParameterSet.Config as cms

#
# Geometry master configuration
#
# Ideal geometry, needed for simulation
DDDetectorESProducer = cms.ESSource("DDDetectorESProducer",
confGeomXMLFiles = cms.FileInPath('Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2026D49.xml'),
appendToDataLabel = cms.string('')
)

DDSpecParRegistryESProducer = cms.ESProducer("DDSpecParRegistryESProducer",
appendToDataLabel = cms.string('')
)

DDVectorRegistryESProducer = cms.ESProducer("DDVectorRegistryESProducer",
appendToDataLabel = cms.string(''))

DDCompactViewESProducer = cms.ESProducer("DDCompactViewESProducer",
appendToDataLabel = cms.string('')
)
Comment on lines +6 to +21
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be the main difference vs. the DDD setup, replacing the line:

from Geometry.CMSCommonData.cmsExtendedGeometry2026D49XML_cfi import *

Should we standardize to put all of this in a corresponding file like Geometry.CMSCommonData.cmsExtendedGeometry2026D49XMLDD4hep_cfi?

It would be even better if there were some way to do this with Eras... then the same XML_cfi file could be used for both (with the DD4hep special workflow already defined in the upgrade matrix).

@ianna @makortel any thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should wait a while before things stabilizer. We are in the process of getting the Phase2 workflow to start working - it is not there yet. We are still struggling for the Run3 scenario.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be even better if there were some way to do this with Eras...

The way to customize the set of ESProducers with Modifiers is to put the ESProducers into a Task and customize the Task with the Modifier.

Admittedly that would imply a larger change in how geometry ESProducers are loaded in configurations (the geometry Task would have to be added to the Schedule/Path/EndPath via the usual means).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was looking at the possibility to have Phase2 test workflows, and geometry configurations automatically built bu the generator script, and I had a similar idea as @kpedro88 , at least for the 3 latest items in this comment it would make sense to have a single _cff fragment to include, as they are common everywhere.


from Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cfi import *
from Geometry.EcalCommonData.ecalSimulationParameters_cff import *
from Geometry.HcalCommonData.hcalDDDSimConstants_cff import *
from Geometry.HGCalCommonData.hgcalParametersInitialization_cfi import *
from Geometry.HGCalCommonData.hgcalNumberingInitialization_cfi import *
from Geometry.MuonNumbering.muonGeometryConstants_cff import *
from Geometry.MuonNumbering.muonOffsetESProducer_cff import *
from Geometry.MTDNumberingBuilder.mtdNumberingGeometry_cfi import *
63 changes: 63 additions & 0 deletions Geometry/MuonNumbering/python/muonOffsetESProducer_cff.py
Expand Up @@ -7,3 +7,66 @@
dd4hep.toModify(muonOffsetESProducer,
fromDD4Hep = cms.bool(True)
)

from Configuration.Eras.Modifier_phase2_common_cff import phase2_common

phase2_common.toModify(muonOffsetESProducer,
names = cms.vstring(
"MuonCommonNumbering",
"MuonBarrel",
"MuonEndcap",
"MuonBarrelWheels",
"MuonBarrelStation1",
"MuonBarrelStation2",
"MuonBarrelStation3",
"MuonBarrelStation4",
"MuonBarrelSuperLayer",
"MuonBarrelLayer",
"MuonBarrelWire",
"MuonRpcPlane1I",
"MuonRpcPlane1O",
"MuonRpcPlane2I",
"MuonRpcPlane2O",
"MuonRpcPlane3S",
"MuonRpcPlane4",
"MuonRpcChamberLeft",
"MuonRpcChamberMiddle",
"MuonRpcChamberRight",
"MuonRpcEndcap1",
"MuonRpcEndcap2",
"MuonRpcEndcap3",
"MuonRpcEndcap4",
"MuonRpcEndcapSector",
"MuonRpcEndcapChamberB1",
"MuonRpcEndcapChamberB2",
"MuonRpcEndcapChamberB3",
"MuonRpcEndcapChamberC1",
"MuonRpcEndcapChamberC2",
"MuonRpcEndcapChamberC3",
"MuonRpcEndcapChamberE1",
"MuonRpcEndcapChamberE2",
"MuonRpcEndcapChamberE3",
"MuonRpcEndcapChamberF1",
"MuonRpcEndcapChamberF2",
"MuonRpcEndcapChamberF3",
"MuonRpcEndcapChamberG1",
"MuonRpcEndcapChamberH1",
"MuonEndcapStation1",
"MuonEndcapStation2",
"MuonEndcapStation3",
"MuonEndcapStation4",
"MuonEndcapSubrings",
"MuonEndcapSectors",
"MuonEndcapLayers",
"MuonEndcapRing1",
"MuonEndcapRing2",
"MuonEndcapRing3",
"MuonEndcapRingA",
"MuonGEMEndcap",
"MuonGEMEndcap2",
"MuonGEMSector",
"MuonGEMChamber",
"MuonGE0Sector",
"MuonGE0Layer",
"MuonGE0Chamber")
)
Expand Up @@ -81,7 +81,7 @@
# Other statements
process.genstepfilter.triggerConditions=cms.vstring("generation_step")
from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T14', '')
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T15', '')

process.generator = cms.EDFilter("Pythia8GeneratorFilter",
PythiaParameters = cms.PSet(
Expand Down