Skip to content
Snippets Groups Projects

Define GeometryBackend for DD4Hep and DetDesc and use DataType=2024/Run3 when DetDesc is picked up from Run2Support

Merged Menglin Xu requested to merge mexu_backend_for_geometry into master
Files
3
@@ -24,11 +24,6 @@ from datetime import datetime, timedelta
from DDDB.CheckDD4Hep import UseDD4Hep
from Gaudi.Configuration import *
if not UseDD4Hep:
from DetCond.Configuration import CondDB
from Configurables import (XmlCnvSvc, XmlParserSvc,
EntityResolverDispatcher, GitEntityResolver)
GIT_CONDDBS = {}
@@ -95,6 +90,8 @@ class DDDBConf(ConfigurableUser):
"run3/trunk",
"GeometryMain":
"LHCb.xml",
"GeometryBackend":
"DD4Hep" if UseDD4Hep else "DetDesc",
"ConditionsLocation":
"",
"DD4HepDetectorList": [
@@ -108,7 +105,7 @@ class DDDBConf(ConfigurableUser):
'DbRoot':
""" Root file of the detector description """,
'DataType':
""" Symbolic name for the data type. Allowed values: ["2023", "2022", "2018", "2017", "2016", "2015", "2013", "2012", "2011", "2010", "2009","2008","Upgrade"] """,
""" Symbolic name for the data type. Allowed values: ["2024", "2023", "2022", "2018", "2017", "2016", "2015", "2013", "2012", "2011", "2010", "2009", "2008", "Run3", "Upgrade"] """,
'Simulation':
""" Boolean flag to select the simulation or real-data configuration """,
'InitialTime':
@@ -125,23 +122,34 @@ class DDDBConf(ConfigurableUser):
""" Version of the DD4hep geometry that should be used """,
'GeometryMain':
""" Main compact file to be loaded """,
'GeometryBackend':
""" Backend to be used for the geometry, must be DD4Hep or DetDesc """,
'ConditionsLocation':
"Location of the conditions repository (lookup from CMAKE_PREFIX_PATH if not specified)",
'ConditionsVersion':
""" Tag for the conditions database """,
}
__used_configurables__ = [] if UseDD4Hep else [CondDB]
def __apply_configuration__(self):
"""
Converts the high-level information passed as properties into low-level configuration.
"""
assert self.getProp("GeometryBackend") in (
"DetDesc",
"DD4Hep"), "GeometryBackend has to be one of 'DetDesc' or 'DD4Hep'"
backend = self.getProp("GeometryBackend")
+1
if backend == "DetDesc":
from DetCond.Configuration import CondDB
from Configurables import (XmlCnvSvc, XmlParserSvc,
EntityResolverDispatcher,
GitEntityResolver)
__used_configurables__ = [CondDB]
##########################################################################
# DD4hep Detector Configuration
##########################################################################
##########################################################################
if UseDD4Hep:
elif backend == "DD4Hep":
__used_configurables__ = []
from Configurables import LHCb__Det__LbDD4hep__DD4hepSvc as DD4hepSvc
dd4hepSvc = DD4hepSvc()
@@ -311,7 +319,8 @@ class DDDBConf(ConfigurableUser):
# by default, use the latest DQFLAGS tag for the requested data type
# (unless already set by a data type handler)
if not self.getProp("Simulation") and dataType not in ("Upgrade",
"2022", "2023"):
"2022", "2023",
"2024", "Run3"):
self.__set_tag__(["DQFLAGS"], "<latest:{0}>".format(dataType))
# Get particle properties table from condDB
@@ -379,6 +388,13 @@ class DDDBConf(ConfigurableUser):
"EventClockSvc().InitialTime already set to %s UTC (requested %s UTC)",
t.isoformat(), utcDatetime.isoformat())
def __2024_conf__(self):
"""
Default configuration for 2024 data
to be updated after final configuration is taken
"""
pass
def __2023_conf__(self):
"""
Default configuration for 2023 data
@@ -513,6 +529,12 @@ class DDDBConf(ConfigurableUser):
else:
self.__set_tag__(["SIMCOND"], "sim-20090212")
def __Run3_conf__(self):
"""
Default database for Run3 MonteCarlo production and analysis
"""
pass # nothing special here
def __Upgrade_conf__(self):
"""
Default database for Upgrade MonteCarlo production and analysis
@@ -520,6 +542,7 @@ class DDDBConf(ConfigurableUser):
pass # nothing special here
__data_types_handlers__ = {
"2024": __2024_conf__,
"2023": __2023_conf__,
"2022": __2022_conf__,
"2018": __2018_conf__,
@@ -532,5 +555,6 @@ class DDDBConf(ConfigurableUser):
"2010": __2010_conf__,
"2009": __2009_conf__,
"2008": __2008_conf__,
"Run3": __Run3_conf__,
"Upgrade": __Upgrade_conf__
}
Loading