diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d53606322f5b8e39b1e418b25727468fc0a7747a..cc9355a1d91e29eede8a966d435526af8d6672ae 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,7 +25,7 @@ build_image: - mkdir build - cd build - set +e && source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh; set -e - - set +e && asetup --input=../../calypso/asetup.faser Athena,22.0.29; set -e + - set +e && asetup --input=../../calypso/asetup.faser Athena,22.0.30; set -e - cmake ../../calypso - make -j 3 artifacts: @@ -41,7 +41,7 @@ test_unittest: - yum -y install man - cd build - set +e && source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh; set -e - - set +e && asetup --input=../../calypso/asetup.faser Athena,22.0.29; set -e + - set +e && asetup --input=../../calypso/asetup.faser Athena,22.0.30; set -e - set +e && source `find . -name 'setup.sh'`; set -e - ctest -j12 dependencies: diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/python/EcalGeoModelConfig.py b/Calorimeter/CaloDetDescr/EcalGeoModel/python/EcalGeoModelConfig.py index 0959d09dfd45416123f09be51d473e1f3501def2..5d2025c41eb01c2ca82cb93bc63b67d05cba9b54 100644 --- a/Calorimeter/CaloDetDescr/EcalGeoModel/python/EcalGeoModelConfig.py +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/python/EcalGeoModelConfig.py @@ -17,24 +17,4 @@ def EcalGeometryCfg( flags ): ecalDetectorTool.useDynamicAlignFolders = flags.GeoModel.Align.Dynamic geoModelSvc.DetectorTools += [ ecalDetectorTool ] - # if flags.GeoModel.Align.Dynamic: - # acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL1/ID","/Indet/AlignL1/ID",className="CondAttrListCollection")) - # acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL2/SCT","/Indet/AlignL2/SCT",className="CondAttrListCollection")) - # acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL3","/Indet/AlignL3",className="AlignableTransformContainer")) - # else: - # if (not flags.Detector.SimulatePreshower) or flags.Detector.OverlayPreshower: - # acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/Align","/Indet/Align",className="AlignableTransformContainer")) - # else: - # acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/Align","/Indet/Align")) - - # if flags.Common.Project is not "AthSimulation": # Protection for AthSimulation builds - # if (not flags.Detector.SimulatePreshower) or flags.Detector.OverlayPreshower: - # from PreshowerConditionsAlgorithms.PreshowerConditionsAlgorithmsConf import PreshowerAlignCondAlg - # preshowerAlignCondAlg = PreshowerAlignCondAlg(name = "PreshowerAlignCondAlg", - # UseDynamicAlignFolders = flags.GeoModel.Align.Dynamic) - # acc.addCondAlgo(preshowerAlignCondAlg) - # from PreshowerConditionsAlgorithms.PreshowerConditionsAlgorithmsConf import PreshowerDetectorElementCondAlg - # preshowerDetectorElementCondAlg = PreshowerDetectorElementCondAlg(name = "PreshowerDetectorElementCondAlg") - # acc.addCondAlgo(preshowerDetectorElementCondAlg) - return acc diff --git a/Calorimeter/CaloDetDescr/EcalGeoModel/test/EcalGMConfig_test.py b/Calorimeter/CaloDetDescr/EcalGeoModel/test/EcalGMConfig_test.py index 98aed0888e8fc149ab8b957b5f667da5e93b48c8..9df7d390796ae700181f0922c38e30b1bf33bd6e 100644 --- a/Calorimeter/CaloDetDescr/EcalGeoModel/test/EcalGMConfig_test.py +++ b/Calorimeter/CaloDetDescr/EcalGeoModel/test/EcalGMConfig_test.py @@ -11,7 +11,7 @@ if __name__ == "__main__": ConfigFlags.Input.Files = defaultTestFiles.HITS ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX" - ConfigFlags.Detector.SimulateEcal = False + ConfigFlags.Detector.EnableEcal = True ConfigFlags.GeoModel.Align.Dynamic = False ConfigFlags.lock() diff --git a/Control/CalypsoConfiguration/python/AllConfigFlags.py b/Control/CalypsoConfiguration/python/AllConfigFlags.py index 779516111c0cd903971ebe9b49bb70b357339bd4..8cc83b1ec69a54bfdf402c04dac3d521b8aa25a1 100644 --- a/Control/CalypsoConfiguration/python/AllConfigFlags.py +++ b/Control/CalypsoConfiguration/python/AllConfigFlags.py @@ -34,7 +34,7 @@ def _createCfgFlags(): # acf=AthConfigFlags() fcf = athenaConfigFlags - # acf.addFlag('Input.Files', ["_ATHENA_GENERIC_INPUTFILE_NAME_",] ) # former global.InputFiles + fcf.Input.Files = ["_FASER_GENERIC_INPUTFILE_NAME_",] # former global.InputFiles # acf.addFlag('Input.SecondaryFiles', []) # secondary input files for DoubleEventSelector # acf.addFlag('Input.isMC', lambda prevFlags : "IS_SIMULATION" in GetFileMD(prevFlags.Input.Files).get("eventTypes",[]) ) # former global.isMC # acf.addFlag('Input.RunNumber', lambda prevFlags : list(GetFileMD(prevFlags.Input.Files).get("runNumbers",[]))) # former global.RunNumber @@ -98,12 +98,14 @@ def _createCfgFlags(): return createDetectorConfigFlags() # acf.addFlagsCategory( "Detector", __detector ) fcf.join( __detector() ) + from CalypsoConfiguration.DetectorConfigFlags import modifyDetectorConfigFlags + fcf = modifyDetectorConfigFlags(fcf) #Simulation Flags: - def __simulation(): - from G4AtlasApps.SimConfigFlags import createSimConfigFlags - return createSimConfigFlags() - _addFlagsCategory (fcf, "Sim", __simulation, 'G4AtlasApps' ) + # def __simulation(): + # from G4AtlasApps.SimConfigFlags import createSimConfigFlags + # return createSimConfigFlags() + # _addFlagsCategory (fcf, "Sim", __simulation, 'G4AtlasApps' ) #Digitization Flags: # def __digitization(): @@ -123,6 +125,8 @@ def _createCfgFlags(): return createGeoModelConfigFlags() # _addFlagsCategory( fcf, "GeoModel", __geomodel ) fcf.join( __geomodel() ) + from CalypsoConfiguration.GeoModelConfigFlags import modifyGeoModelConfigFlags + fcf = modifyGeoModelConfigFlags(fcf) # acf.addFlag('GeoModel.Layout', 'atlas') # replaces global.GeoLayout # acf.addFlag("GeoModel.AtlasVersion", lambda prevFlags : GetFileMD(prevFlags.Input.Files).get("GeoAtlas",None) or "ATLAS-R2-2016-01-00-01") # diff --git a/Control/CalypsoConfiguration/python/AutoConfigFlags.py b/Control/CalypsoConfiguration/python/AutoConfigFlags.py new file mode 100644 index 0000000000000000000000000000000000000000..b81df65fc3b8440eb4297cb36f3c4e7c6d8077ea --- /dev/null +++ b/Control/CalypsoConfiguration/python/AutoConfigFlags.py @@ -0,0 +1,133 @@ +from PyUtils.MetaReader import read_metadata +from AthenaCommon.Logging import logging +from functools import lru_cache + +msg = logging.getLogger('AutoConfigFlags') + +# Module level cache of file-metadata: +_fileMetaData = dict() + +class DynamicallyLoadMetadata: + def __init__(self, filename): + self.metadata = {} + self.filename = filename + self.metAccessLevel = 'lite' + thisFileMD = read_metadata(filename, None, 'lite') + self.metadata.update(thisFileMD[self.filename]) + msg.debug("Loaded using 'lite' %s", str(self.metadata)) + + def _loadMore(self): + thisFileMD = read_metadata(self.filename, None, 'peeker') + self.metadata.update(thisFileMD[self.filename]) + + def get(self, key, default): + if key in self.metadata: + return self.metadata[key] + if self.metAccessLevel != 'peeker': + msg.info("Looking into the file in 'peeker' mode as the configuration requires more details: %s ", key) + self.metAccessLevel = 'peeker' + self._loadMore() + if key in self.metadata: + return self.metadata[key] + return default + + def __contains__(self, key): + return self.get(key, None) is not None + + def __getitem__(self, key): + result = self.get(key, None) + if result is None: + raise RuntimeError("Key {} not found".format(key)) + return result + +def GetFileMD(filenames): + + filename=filenames[0] + if filename == '_FASER_GENERIC_INPUTFILE_NAME_': + raise RuntimeError('Input file name not set, instead _FASER_GENERIC_INPUTFILE_NAME_ found. Cannot read metadata.') + if filename not in _fileMetaData: + if len(filenames)>1: + msg.info("Multiple input files. Use the first one for auto-configuration") + msg.info("Obtaining metadata of auto-configuration by peeking into %s", filename) + _fileMetaData[filename] = DynamicallyLoadMetadata(filename) + + return _fileMetaData[filename] + + +def _initializeGeometryParameters(geoTag): + """Read geometry database for all detectors""" + + from FaserGeoModel import CommonGeoDB + from FaserGeoModel.FaserGeoDBInterface import FaserGeoDBInterface + + dbGeomCursor = FaserGeoDBInterface(geoTag) + dbGeomCursor.ConnectAndBrowseGeoDB() + + params = { 'Common' : CommonGeoDB.InitializeGeometryParameters(dbGeomCursor) } + + return params + + +@lru_cache(maxsize=4) # maxsize=1 should be enough for most jobs +def DetDescrInfo(geoTag): + """Query geometry DB for detector description. Returns dictionary with + detector description. Queries DB for each tag only once. + + geoTag: geometry tag (e.g. FASER-01) + """ + detDescrInfo = _initializeGeometryParameters(geoTag) + detDescrInfo["geomTag"] = geoTag + return detDescrInfo + + +@lru_cache(maxsize=4) # maxsize=1 should be enough for most jobs +def getDefaultDetectors(geoTag): + """Query geometry DB for detector description. + Returns a set of detectors used in a geometry tag. + + geoTag: geometry tag (e.g. FASER-01) + """ + detectors = set() + detectors.add('Veto') + detectors.add('Trigger') + detectors.add('Preshower') + detectors.add('FaserSCT') + detectors.add('Ecal') + detectors.add('UpstreamDipole') + detectors.add('CentralDipole') + detectors.add('DownstreamDipole') + + print("DetDescrInfo Run = ", DetDescrInfo(geoTag)['Common']['Run']) + print("DetDescrInfo TrackerType = ", DetDescrInfo(geoTag)['Common']['TrackerType']) + print("DetDescrInfo FaserNuType = ", DetDescrInfo(geoTag)['Common']['FaserNuType']) + + # if DetDescrInfo(geoTag)['Common']['Run'] == 'RUN4': + # detectors.add('ITkPixel') + # detectors.add('ITkStrip') + # else: + # detectors.add('Pixel') + # detectors.add('SCT') + # detectors.add('TRT') + # detectors.add('BCM') + # TODO: wait for special table in the geo DB + # if DetDescrInfo(geoTag)['Common']['Run'] == 'RUN4': + # detectors.add('BCMPrime') + + return detectors + + +# Based on RunDMCFlags.py +def getRunToTimestampDict(): + # this wrapper is intended to avoid an initial import + from .RunToTimestampData import RunToTimestampDict + return RunToTimestampDict + + +def getInitialTimeStampsFromRunNumbers(runNumbers): + """This is used to hold a dictionary of the form + {152166:1269948352889940910, ...} to allow the + timestamp to be determined from the run. + """ + run2timestampDict = getRunToTimestampDict() + timeStamps = [run2timestampDict.get(runNumber,1) for runNumber in runNumbers] # Add protection here? + return timeStamps diff --git a/Control/CalypsoConfiguration/python/DetectorConfigFlags.py b/Control/CalypsoConfiguration/python/DetectorConfigFlags.py index 29c4e71b35bc40e4acbdeeaca90876b57102b2d1..fb0c315a7383e8c3888b2b7a9a6dcbce58af9941 100644 --- a/Control/CalypsoConfiguration/python/DetectorConfigFlags.py +++ b/Control/CalypsoConfiguration/python/DetectorConfigFlags.py @@ -1,22 +1,29 @@ # Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -from __future__ import print_function - from AthenaConfiguration.AthConfigFlags import AthConfigFlags - +from CalypsoConfiguration.AutoConfigFlags import DetDescrInfo, getDefaultDetectors # This module is based upon Control/AthenaCommon/python/DetFlags.py # Only some flags have been migrated. + +allDetectors = [ + 'Veto', 'Trigger', 'Preshower', 'FaserSCT', 'Ecal', 'Dipole', +] + +allGroups = { + 'Tracker' : ['SCT'], + 'Scintillator' : ['Veto', 'Trigger', 'Preshower'], + 'FaserCalo' : ['Ecal'], + 'Magnet' : ['Dipole'] +} + def createDetectorConfigFlags(): dcf=AthConfigFlags() #Detector.Geometry - merger of the old geometry and detdescr tasks - dcf.addFlag('Detector.GeometryUpstreamDipole', False) - dcf.addFlag('Detector.GeometryCentralDipole', False) - dcf.addFlag('Detector.GeometryDownstreamDipole',False) - dcf.addFlag('Detector.GeometryDipole', lambda prevFlags : (prevFlags.Detector.GeometryUpstreamDipole or - prevFlags.Detector.GeometryCentralDipole or - prevFlags.Detector.GeometryDownstreamDipole)) + dcf.addFlag('Detector.GeometryDipole', False) + dcf.addFlag('Detector.GeometryMagnet', lambda prevFlags : (prevFlags.Detector.GeometryDipole )) + dcf.addFlag('Detector.GeometryVeto', False) dcf.addFlag('Detector.GeometryTrigger', False) dcf.addFlag('Detector.GeometryPreshower', False) @@ -25,49 +32,211 @@ def createDetectorConfigFlags(): prevFlags.Detector.GeometryPreshower)) dcf.addFlag('Detector.GeometryFaserSCT', False) dcf.addFlag('Detector.GeometryTracker', lambda prevFlags : prevFlags.Detector.GeometryFaserSCT ) + dcf.addFlag('Detector.GeometryEcal', False) dcf.addFlag('Detector.GeometryFaserCalo', lambda prevFlags : prevFlags.Detector.GeometryEcal) - dcf.addFlag('Detector.GeometryFaser', lambda prevFlags : (prevFlags.Detector.GeometryDecayVolume or - prevFlags.Detector.GeometryScintillator or - prevFlags.Detector.GeometryTracker or - prevFlags.Detector.GeometryFaserCalo)) - - #Detector.Simulate - dcf.addFlag('Detector.SimulateUpstreamDipole', False) - dcf.addFlag('Detector.SimulateCentralDipole', False) - dcf.addFlag('Detector.SimulateDownstreamDipole',False) - dcf.addFlag('Detector.SimulateDipole', lambda prevFlags : (prevFlags.Detector.SimulateUpstreamDipole or - prevFlags.Detector.SimulateCentralDipole or - prevFlags.Detector.SimulateDownstreamDipole)) - dcf.addFlag('Detector.SimulateDecayVolume', False) - dcf.addFlag('Detector.SimulateVeto', False) - dcf.addFlag('Detector.SimulateTrigger', False) - dcf.addFlag('Detector.SimulatePreshower', False) - dcf.addFlag('Detector.SimulateScintillator',lambda prevFlags : (prevFlags.Detector.SimulateVeto or - prevFlags.Detector.SimulateTrigger or - prevFlags.Detector.SimulatePreshower)) - dcf.addFlag('Detector.SimulateFaserSCT', False) - dcf.addFlag('Detector.SimulateTracker', lambda prevFlags : prevFlags.Detector.SimulateFaserSCT ) - dcf.addFlag('Detector.SimulateEcal', False) - dcf.addFlag('Detector.SimulateFaserCalo', lambda prevFlags : prevFlags.Detector.SimulateEcal) - dcf.addFlag('Detector.SimulateFaser', lambda prevFlags : (prevFlags.Detector.SimulateDecayVolume or - prevFlags.Detector.SimulateScintillator or - prevFlags.Detector.SimulateTracker or - prevFlags.Detector.SimulateFaserCalo)) - - #Detector.Overlay - # dcf.addFlag('Detector.OverlayVeto', False) - # dcf.addFlag('Detector.OverlayTrigger', False) - # dcf.addFlag('Detector.OverlayPreshower', False) - # dcf.addFlag('Detector.OverlayScintillator', lambda prevFlags : (prevFlags.Detector.OverlayVeto or - # prevFlags.Detector.OverlayTrigger or - # prevFlags.Detector.OverlayPreshower)) - # dcf.addFlag('Detector.OverlayFaserSCT', False) - # dcf.addFlag('Detector.OverlayTracker', lambda prevFlags : prevFlags.Detector.OverlayFaserSCT ) - # dcf.addFlag('Detector.OverlayEcal', False) - # dcf.addFlag('Detector.OverlayFaserCalo', lambda prevFlags : prevFlags.Detector.OverlayEcal) - # dcf.addFlag('Detector.OverlayFaser', lambda prevFlags : (prevFlags.Detector.OverlayScintillator or - # prevFlags.Detector.OverlayTracker or - # prevFlags.Detector.OverlayFaserCalo)) + + # Cavern (disabled by default) + # dcf.addFlag('Detector.GeometryCavern',False) + + # dcf.addFlag('Detector.GeometryFaser', lambda prevFlags : (prevFlags.Detector.GeometryDecayVolume or + # prevFlags.Detector.GeometryScintillator or + # prevFlags.Detector.GeometryTracker or + # prevFlags.Detector.GeometryFaserCalo)) + + + + #Detector.Enable + # dcf.addFlag('Detector.EnableUpstreamDipole', False) + # dcf.addFlag('Detector.EnableCentralDipole', False) + # dcf.addFlag('Detector.EnableDownstreamDipole',False) + # dcf.addFlag('Detector.EnableDipole', lambda prevFlags : (prevFlags.Detector.EnableUpstreamDipole or + # prevFlags.Detector.EnableCentralDipole or + # prevFlags.Detector.EnableDownstreamDipole)) + # dcf.addFlag('Detector.EnableDecayVolume', False) + dcf.addFlag('Detector.EnableVeto', lambda prevFlags : 'Veto' in getDefaultDetectors(prevFlags.GeoModel.FaserVersion)) + dcf.addFlag('Detector.EnableTrigger', lambda prevFlags : 'Trigger' in getDefaultDetectors(prevFlags.GeoModel.FaserVersion)) + dcf.addFlag('Detector.EnablePreshower', lambda prevFlags : 'Preshower' in getDefaultDetectors(prevFlags.GeoModel.FaserVersion)) + dcf.addFlag('Detector.EnableScintillator',lambda prevFlags : (prevFlags.Detector.EnableVeto or + prevFlags.Detector.EnableTrigger or + prevFlags.Detector.EnablePreshower)) + dcf.addFlag('Detector.EnableFaserSCT', lambda prevFlags : 'FaserSCT' in getDefaultDetectors(prevFlags.GeoModel.FaserVersion)) + dcf.addFlag('Detector.EnableTracker', lambda prevFlags : prevFlags.Detector.EnableFaserSCT ) + dcf.addFlag('Detector.EnableEcal', lambda prevFlags : 'Ecal' in getDefaultDetectors(prevFlags.GeoModel.FaserVersion)) + dcf.addFlag('Detector.EnableFaserCalo', lambda prevFlags : prevFlags.Detector.EnableEcal) + # dcf.addFlag('Detector.EnableFaser', lambda prevFlags : (prevFlags.Detector.EnableDecayVolume or + # prevFlags.Detector.EnableScintillator or + # prevFlags.Detector.EnableTracker or + # prevFlags.Detector.EnableFaserCalo)) + + # Reco flags + dcf.addFlag('Detector.RecoVeto', False) + dcf.addFlag('Detector.RecoTrigger', False) + dcf.addFlag('Detector.RecoPreshower', False) + dcf.addFlag('Detector.RecoEcal', False) + dcf.addFlag('Detector.RecoWaveform', lambda prevFlags : (prevFlags.Detector.RecoVeto or prevFlags.Detector.RecoTrigger or + prevFlags.Detector.RecoPreshower or prevFlags.Detector.RecoEcal)) + dcf.addFlag('Detector.RecoFaserSCT', False) + dcf.addFlag('Detector.RecoTracker', lambda prevFlags : (prevFlags.Detector.RecoSCT)) return dcf + +def _parseDetectorsList(flags, detectors): + # setup logging + from AthenaCommon.Logging import logging + log = logging.getLogger('DetectorConfigFlags') + # load flags + flags._loadDynaFlags('Detector') + # first check if we have groups + groups = [d for d in detectors if d in allGroups.keys()] + detectors = [d for d in detectors if d not in allGroups.keys()] + for g in groups: + log.debug("Evaluating detector group '%s'", g) + # in case of groups only enable defaults + for d in allGroups[g]: + if d in getDefaultDetectors(flags.GeoModel.FaserVersion): + log.debug("Appending detector '%s'", d) + detectors.append(d) + + # check if valid detectors are required + for d in detectors: + if d not in allDetectors: + log.warning("Unknown detector '%s'", d) + + return detectors + +def setupDetectorsFromList(flags, detectors, toggle_geometry=False, validate_only=False): + """Setup (toggle) detectors from a pre-defined list""" + changed = False + # setup logging + from AthenaCommon.Logging import logging + log = logging.getLogger('DetectorConfigFlags') + # parse the list + detectors = _parseDetectorsList(flags, detectors) + + # print summary + if validate_only: + log.info('Required detectors: %s', detectors) + else: + log.info('Setting detectors to: %s', detectors) + + # go through all of the detectors and check what should happen + for d in allDetectors: + status = d in detectors + name = f'Detector.Enable{d}' + if flags.hasFlag(name): + if flags(name) != status: + changed = True + if validate_only: + log.warning("Flag '%s' should be %s but is set to %s", name, status, not status) + else: + log.info("Toggling '%s' from %s to %s", name, not status, status) + flags._set(name, status) + if toggle_geometry: + name = f'Detector.Geometry{d}' + if flags.hasFlag(name): + if flags(name) != status: + changed = True + if validate_only: + log.warning("Flag '%s' should be %s but is set to %s", name, status, not status) + else: + log.info("Toggling '%s' from %s to %s", name, not status, status) + flags._set(name, status) + + return changed + +def enableDetectors(flags, detectors, toggle_geometry=False): + """Enable detectors from a list""" + changed = False + # setup logging + from AthenaCommon.Logging import logging + log = logging.getLogger('DetectorConfigFlags') + # parse the list + detectors = _parseDetectorsList(flags, detectors) + + # debugging + log.info('Enabling detectors: %s', detectors) + + # go through all of the detectors and enable them if needed + for d in detectors: + name = f'Detector.Enable{d}' + if flags.hasFlag(name): + if flags(name) is not True: + changed = True + log.info("Enabling '%s'", name) + flags._set(name, True) + if toggle_geometry: + name = f'Detector.Geometry{d}' + if flags.hasFlag(name): + if flags(name) is not True: + changed = True + log.info("Enabling '%s'", name) + flags._set(name, True) + + return changed + + +def disableDetectors(flags, detectors, toggle_geometry=False): + """Disable detectors from a list""" + changed = False + # setup logging + from AthenaCommon.Logging import logging + log = logging.getLogger('DetectorConfigFlags') + # parse the list + detectors = _parseDetectorsList(flags, detectors) + + # debugging + log.info('Disabling detectors: %s', detectors) + + # go through all of the detectors and disable them if needed + for d in detectors: + name = f'Detector.Enable{d}' + if flags.hasFlag(name): + if flags(name) is not False: + changed = True + log.info("Disabling '%s'", name) + flags._set(name, False) + if toggle_geometry: + name = f'Detector.Geometry{d}' + if flags.hasFlag(name): + if flags(name) is not False: + changed = True + log.info("Disabling '%s'", name) + flags._set(name, False) + + return changed + +def modifyDetectorConfigFlags(flags): + # disable problematic ATLAS flags by hand + flags.Detector.GeometryCSC = False + flags.Detector.GeometrysTGC = False + flags.Detector.GeometryMM = False + + flags.Detector.EnableBCM = False + flags.Detector.EnableDBM = False + flags.Detector.EnablePixel = False + flags.Detector.EnableSCT = False + flags.Detector.EnableTRT = False + + # Upgrade ITk Inner Tracker is a separate and parallel detector + flags.Detector.EnableBCMPrime = False + flags.Detector.EnableITkPixel = False + flags.Detector.EnableITkStrip = False + + flags.Detector.EnableHGTD = False + + # Calorimeters + flags.Detector.EnableLAr = False + flags.Detector.EnableTile = False + + # Muon Spectrometer + flags.Detector.EnableCSC = False + flags.Detector.EnableMDT = False + flags.Detector.EnableRPC = False + flags.Detector.EnableTGC = False + flags.Detector.EnablesTGC = False + flags.Detector.EnableMM = False + + flags.Detector.RecoIBL = False + + return flags \ No newline at end of file diff --git a/Control/CalypsoConfiguration/python/GeoModelConfigFlags.py b/Control/CalypsoConfiguration/python/GeoModelConfigFlags.py index 9729f35abd74c72ce2620043ed52bf26c4dc8760..3b19940156b1c85694f99484e6c5a447b599e1eb 100644 --- a/Control/CalypsoConfiguration/python/GeoModelConfigFlags.py +++ b/Control/CalypsoConfiguration/python/GeoModelConfigFlags.py @@ -1,10 +1,21 @@ # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from AthenaConfiguration.AthConfigFlags import AthConfigFlags +from CalypsoConfiguration.AutoConfigFlags import GetFileMD, DetDescrInfo def createGeoModelConfigFlags(): gcf=AthConfigFlags() - gcf.addFlag("GeoModel.FaserVersion", "FASER-01") # + gcf.addFlag("GeoModel.FaserVersion", lambda prevFlags : ((prevFlags.Input.Files and + prevFlags.Input.Files != ["_FASER_GENERIC_INPUTFILE_NAME_"] and + GetFileMD(prevFlags.Input.Files).get("GeoFaser",None)) + or "FASER-01")) gcf.addFlag("GeoModel.GeoExportFile","") return gcf + +def modifyGeoModelConfigFlags(flags): + print("modifyGeoModelConfigFlags called for FaserVersion: ", flags.GeoModel.FaserVersion) + flags.GeoModel.Run = lambda prevFlags : DetDescrInfo(prevFlags.GeoModel.FaserVersion)['Common']['Run'] + print(DetDescrInfo(flags.GeoModel.FaserVersion)['Common']['Run']) + return flags + \ No newline at end of file diff --git a/Control/CalypsoConfiguration/python/MainServicesConfig.py b/Control/CalypsoConfiguration/python/MainServicesConfig.py index 447b89a403122cf110704a2bf6550569bba0c363..1a4e4c1af078ba498e949e2ac082e3baf8a18bb6 100644 --- a/Control/CalypsoConfiguration/python/MainServicesConfig.py +++ b/Control/CalypsoConfiguration/python/MainServicesConfig.py @@ -46,14 +46,14 @@ def MainServicesCfg(cfgFlags): if cfgFlags.Concurrency.NumThreads==0: # For serial execution, we need the CondAlgs to execute first. cfg.addSequence(AthSequencer('AthCondSeq',StopOverride=True),parentName='AthAllAlgSeq') - cfg.addSequence(AthSequencer('AthAlgSeq',IgnoreFilterPassed=True,StopOverride=True),parentName='AthAllAlgSeq') + cfg.addSequence(AthSequencer('AthAlgSeq',IgnoreFilterPassed=True,StopOverride=True, ProcessDynamicDataDependencies=True, ExtraDataForDynamicConsumers=[] ),parentName='AthAllAlgSeq') else: # In MT, the order of execution is irrelevant (determined by data deps). # We add the conditions sequence later such that the CondInputLoader gets # initialized after all other user Algorithms for MT, so the base classes # of data deps can be correctly determined. cfg.addSequence(AthSequencer('AthAlgSeq',IgnoreFilterPassed=True,StopOverride=True),parentName='AthAllAlgSeq') - cfg.addSequence(AthSequencer('AthCondSeq',StopOverride=True),parentName='AthAllAlgSeq') + cfg.addSequence(AthSequencer('AthCondSeq',StopOverride=True, ProcessDynamicDataDependencies=True, ExtraDataForDynamicConsumers=[]),parentName='AthAllAlgSeq') cfg.addSequence(AthSequencer('AthEndSeq',Sequential=True),parentName='AthAlgEvtSeq') cfg.setAppProperty('PrintAlgsSequence', True) diff --git a/Control/CalypsoConfiguration/python/testDetectorFlags.py b/Control/CalypsoConfiguration/python/testDetectorFlags.py new file mode 100644 index 0000000000000000000000000000000000000000..9a555b4c637e5699aefd8516874286f1e127b51c --- /dev/null +++ b/Control/CalypsoConfiguration/python/testDetectorFlags.py @@ -0,0 +1,128 @@ +#!/usr/bin/env python +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + +from CalypsoConfiguration.AllConfigFlags import ConfigFlags +from CalypsoConfiguration.DetectorConfigFlags import setupDetectorsFromList, enableDetectors, disableDetectors + +ConfigFlags._loadDynaFlags('GeoModel') +ConfigFlags._loadDynaFlags('Detector') + +test_tags = [ + 'FASER-00', + 'FASER-01' # example +] + +flags_runs = {t: ConfigFlags.clone() for t in test_tags} + +for tag in test_tags: + flags = flags_runs[tag] + flags.GeoModel.FaserVersion = tag + + print(f'{flags.GeoModel.FaserVersion} - {flags.GeoModel.Run}') + flags.dump('Detector.(Geometry|Enable)', True) + print() + + # test flags that change with time + assert flags.Detector.EnableEcal == (tag != 'FASER-00') + # assert flags.Detector.EnableBCM == (tag != 'ATLAS-P2-ITK-24-00-00') + # assert flags.Detector.EnableDBM == (tag in ['ATLAS-R2-2016-01-00-01', 'ATLAS-R3S-2021-01-00-01']) + # assert flags.Detector.EnablePixel == (tag != 'ATLAS-P2-ITK-24-00-00') + # assert flags.Detector.EnableSCT == (tag != 'ATLAS-P2-ITK-24-00-00') + # assert flags.Detector.EnableTRT == (tag != 'ATLAS-P2-ITK-24-00-00') + # assert flags.Detector.EnableITkPixel == (tag == 'ATLAS-P2-ITK-24-00-00') + # assert flags.Detector.EnableITkStrip == (tag == 'ATLAS-P2-ITK-24-00-00') + # assert flags.Detector.EnableHGTD == (tag == 'ATLAS-P2-ITK-24-00-00') + # assert flags.Detector.EnableCSC == (tag in ['ATLAS-R1-2012-03-01-00', 'ATLAS-R2-2016-01-00-01']) + # assert flags.Detector.EnablesTGC == (tag in ['ATLAS-R3S-2021-01-00-01', 'ATLAS-P2-ITK-24-00-00']) + # assert flags.Detector.EnableMM == (tag in ['ATLAS-R3S-2021-01-00-01', 'ATLAS-P2-ITK-24-00-00']) + + +# test setup for Run 3 +flags = flags_runs['FASER-01'] + +print("Test: validate ['Tracker', 'Scintillator', 'FaserCalo', 'Dipole']") +assert not setupDetectorsFromList(flags, ['Tracker', 'Scintillator', 'FaserCalo', 'Dipole'], validate_only=True) +print() + +print("Test: validate ['Magnet']") +assert setupDetectorsFromList(flags, ['Magnet'], validate_only=True) +print() + +print("Test: setup ['Magnet']") +assert setupDetectorsFromList(flags, ['Magnet'], toggle_geometry=True) +assert flags.Detector.GeometryDipole +assert not flags.Detector.EnableFaserSCT +assert not flags.Detector.EnableEcal +assert not flags.Detector.EnableVeto +assert not flags.Detector.EnableTrigger +assert not flags.Detector.EnablePreshower +assert not flags.Detector.GeometryFaserSCT +assert not flags.Detector.GeometryEcal +assert not flags.Detector.GeometryVeto +assert not flags.Detector.GeometryTrigger +assert not flags.Detector.GeometryPreshower +print() + +# print("Test: setup ['ID'] (geometry included)") +# assert setupDetectorsFromList(flags, ['ID'], toggle_geometry=True) +# assert flags.Detector.EnablePixel +# assert flags.Detector.GeometryPixel +# assert flags.Detector.EnableSCT +# assert flags.Detector.GeometrySCT +# assert flags.Detector.EnableTRT +# assert flags.Detector.GeometryTRT +# assert not flags.Detector.EnableCSC +# assert not flags.Detector.GeometryCSC +# assert not flags.Detector.EnableMM +# print() + +# print("Test: enable ['ID'] (geometry included)") +# assert not enableDetectors(flags, ['ID'], toggle_geometry=True) +# print() + +# print("Test: disable ['ID'] (geometry included)") +# assert disableDetectors(flags, ['ID'], toggle_geometry=True) +# assert not flags.Detector.EnablePixel +# assert not flags.Detector.GeometryPixel +# assert not flags.Detector.EnableSCT +# assert not flags.Detector.GeometrySCT +# assert not flags.Detector.EnableTRT +# assert not flags.Detector.GeometryTRT +# print() + +# print("Test: enable ['MDT', 'RPC']") +# assert enableDetectors(flags, ['MDT', 'RPC']) +# assert flags.Detector.EnableMDT +# assert not flags.Detector.GeometryMDT +# assert flags.Detector.EnableRPC +# assert not flags.Detector.GeometryRPC +# assert not flags.Detector.EnableCSC +# assert not flags.Detector.GeometryCSC +# print() + +# print("Test: enable ['LAr']") +# assert enableDetectors(flags, ['LAr']) +# assert flags.Detector.EnableLAr +# assert flags.Detector.EnableL1Calo +# print() + +# print("Test: enable ['Forward']") +# assert enableDetectors(flags, ['Forward']) +# assert flags.Detector.EnableLucid +# assert flags.Detector.EnableZDC +# assert flags.Detector.EnableALFA +# assert flags.Detector.EnableAFP +# assert flags.Detector.EnableFwdRegion +# print() + + +# # test setup for Run 4 +# flags = flags_runs['ATLAS-P2-ITK-24-00-00'] + +# print("Test: validate ['ITk', 'HGTD', 'Calo', 'Muon']") +# assert not setupDetectorsFromList(flags, ['ITk', 'HGTD', 'Calo', 'Muon'], validate_only=True) +# print() + +# print("Test: enable ['ITkStrip']") +# assert setupDetectorsFromList(flags, ['ITkStrip'], toggle_geometry=True) +# print() diff --git a/Control/CalypsoExample/GenEventExample/python/GenEventReadExampleConfig.py b/Control/CalypsoExample/GenEventExample/python/GenEventReadExampleConfig.py index 3d59aef95f8ab851a0ec8f8985bfb12b397545c4..28073eb6912b68aa7844dd524d051082c03a62ff 100644 --- a/Control/CalypsoExample/GenEventExample/python/GenEventReadExampleConfig.py +++ b/Control/CalypsoExample/GenEventExample/python/GenEventReadExampleConfig.py @@ -28,7 +28,7 @@ if __name__ == "__main__": ConfigFlags.Input.isMC = True # Needed to bypass autoconfig ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX" # Needed to bypass autoconfig, only the "OFLCOND" matters at the moment ConfigFlags.GeoModel.FaserVersion = "FASER-01" # Default FASER geometry - ConfigFlags.Detector.SimulateFaserSCT = True + ConfigFlags.Detector.EnableFaserSCT = True ConfigFlags.Input.Files = ["my.cosmics.pool.root"] ConfigFlags.lock() diff --git a/Control/CalypsoExample/GeoModelTest/python/GeoModelTestConfig.py b/Control/CalypsoExample/GeoModelTest/python/GeoModelTestConfig.py index e8474a6d64560f7c707a5666ff2396843100fa27..e7f6feb7f9bcce18af1dccf3f0e57d403ea9844a 100644 --- a/Control/CalypsoExample/GeoModelTest/python/GeoModelTestConfig.py +++ b/Control/CalypsoExample/GeoModelTest/python/GeoModelTestConfig.py @@ -33,14 +33,14 @@ if __name__ == "__main__": ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX" # Needed to bypass autoconfig, only the "OFLCOND" matters at the moment ConfigFlags.GeoModel.FaserVersion = "FASER-01" # Default FASER geometry ConfigFlags.GeoModel.GeoExportFile = "faserGeo.db" # Writes out a GeoModel file with the full geometry tree (optional, comment out to skip) - ConfigFlags.Detector.SimulateVeto = True - ConfigFlags.Detector.SimulateTrigger = True - ConfigFlags.Detector.SimulatePreshower= True - ConfigFlags.Detector.SimulateFaserSCT = True - ConfigFlags.Detector.SimulateUpstreamDipole = True - ConfigFlags.Detector.SimulateCentralDipole = True - ConfigFlags.Detector.SimulateDownstreamDipole = True - ConfigFlags.Detector.SimulateEcal = True + # ConfigFlags.Detector.EnableVeto = True + # ConfigFlags.Detector.EnableTrigger = True + # ConfigFlags.Detector.EnablePreshower= True + # ConfigFlags.Detector.EnableFaserSCT = True + # ConfigFlags.Detector.EnableUpstreamDipole = True + # ConfigFlags.Detector.EnableCentralDipole = True + # ConfigFlags.Detector.EnableDownstreamDipole = True + # ConfigFlags.Detector.EnableEcal = True ConfigFlags.lock() # Configure components diff --git a/Control/CalypsoExample/RDOReadExample/python/RDOReadExampleConfig.py b/Control/CalypsoExample/RDOReadExample/python/RDOReadExampleConfig.py index e94f6364b4e44457375f04ccac67f1771daaeec7..fcaea799841a83b3ed152d8e139d931136e06968 100644 --- a/Control/CalypsoExample/RDOReadExample/python/RDOReadExampleConfig.py +++ b/Control/CalypsoExample/RDOReadExample/python/RDOReadExampleConfig.py @@ -28,7 +28,7 @@ if __name__ == "__main__": ConfigFlags.Input.isMC = True # Needed to bypass autoconfig ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX" # Needed to bypass autoconfig, only the "OFLCOND" matters at the moment ConfigFlags.GeoModel.FaserVersion = "FASER-01" # Default FASER geometry - ConfigFlags.Detector.SimulateFaserSCT = True + ConfigFlags.Detector.GeometryFaserSCT = True ConfigFlags.Input.Files = ["my.RDO.pool.root"] ConfigFlags.lock() diff --git a/Control/CalypsoExample/WriteAlignment/python/WriteAlignmentConfig.py b/Control/CalypsoExample/WriteAlignment/python/WriteAlignmentConfig.py index a1944cee1b50a1c119e384d6d8006ef5c5820a02..41fb9c9360add2307d3bb5bd001cff5506d9f029 100644 --- a/Control/CalypsoExample/WriteAlignment/python/WriteAlignmentConfig.py +++ b/Control/CalypsoExample/WriteAlignment/python/WriteAlignmentConfig.py @@ -48,13 +48,6 @@ if __name__ == "__main__": ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX" # Needed to bypass autoconfig, only the "OFLCOND" matters at the moment ConfigFlags.GeoModel.FaserVersion = "FASER-01" # Default FASER geometry ConfigFlags.GeoModel.GeoExportFile = "faserGeo.db" # Writes out a GeoModel file with the full geometry tree (optional, comment out to skip) - ConfigFlags.Detector.SimulateVeto = True - ConfigFlags.Detector.SimulateTrigger = True - ConfigFlags.Detector.SimulatePreshower= True - ConfigFlags.Detector.SimulateFaserSCT = True - ConfigFlags.Detector.SimulateUpstreamDipole = True - ConfigFlags.Detector.SimulateCentralDipole = True - ConfigFlags.Detector.SimulateDownstreamDipole = True ConfigFlags.lock() # Configure components diff --git a/DetectorDescription/GeoModel/FaserGeoModel/data/geomDB.sql b/DetectorDescription/GeoModel/FaserGeoModel/data/geomDB.sql index 169464145119b397ee3c56a336f4356d4584137d..a18d47bce2d9f0a9f68970b1cfa868fc602ccf20 100644 --- a/DetectorDescription/GeoModel/FaserGeoModel/data/geomDB.sql +++ b/DetectorDescription/GeoModel/FaserGeoModel/data/geomDB.sql @@ -439,8 +439,8 @@ DROP TABLE IF EXISTS "FASERCOMMON_DATA"; CREATE TABLE IF NOT EXISTS "FASERCOMMON_DATA" ( "FASERCOMMON_DATA_ID" SLONGLONG UNIQUE, "CONFIG" TEXT , - "GEOTYPE" TEXT , - "STRIPGEOTYPE" TEXT + "TRACKERTYPE" TEXT , + "FASERNUTYPE" TEXT ); DROP TABLE IF EXISTS "FASERCOMMON_DATA2TAG"; CREATE TABLE IF NOT EXISTS "FASERCOMMON_DATA2TAG" ( @@ -960,7 +960,7 @@ INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-01", "NeutrinoIdentifier", "NeutrinoId INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-01", "ScintIdentifier", "ScintIdentifier-00", 100016); INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-01", "TrackerIdentifier", "TrackerIdentifier-00", 100017); INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-01", "CaloIdentifier", "CaloIdentifier-00", 100018); -INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-CR", "FASER", "FASER-01", 100039); +INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-CR", "FASER", "FASER-CR", 107784); INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-CR", "FaserCommon", "FaserCommon-00", 100013); INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-CR", "Materials", "Materials-00", 100005); INSERT INTO "HVS_TAGCACHE" VALUES ("FASER-CR", "StdMaterials", "StdMaterials-00", 100006); @@ -1645,7 +1645,7 @@ INSERT INTO "SCINTMATCOMPONENTS_DATA2TAG" VALUES (100012, 0); INSERT INTO "SCINTMATCOMPONENTS_DATA2TAG" VALUES (100012, 1); -- -- -INSERT INTO "FASERCOMMON_DATA" VALUES (0, "RUN3", "UNDEFINED", "UNDEFINED"); +INSERT INTO "FASERCOMMON_DATA" VALUES (0, "RUN3", "TRACKER", "NONE"); INSERT INTO "FASERCOMMON_DATA2TAG" VALUES (100013, 0); -- -- diff --git a/DetectorDescription/GeoModel/FaserGeoModel/python/CaloGMConfig.py b/DetectorDescription/GeoModel/FaserGeoModel/python/CaloGMConfig.py deleted file mode 100644 index 32889ca65d1e8a3cd05b894ef6aa5d52fbca89fb..0000000000000000000000000000000000000000 --- a/DetectorDescription/GeoModel/FaserGeoModel/python/CaloGMConfig.py +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -# - -from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator - -def CaloGeometryCfg (flags): - acc = ComponentAccumulator() - from EcalGeoModel.EcalGeoModelConfig import EcalGeometryCfg - acc.merge(EcalGeometryCfg( flags )) - - return acc - - -if __name__ == "__main__": - # import os - from AthenaCommon.Logging import log - from AthenaCommon.Constants import DEBUG - from AthenaCommon.Configurable import Configurable - from AthenaConfiguration.AllConfigFlags import ConfigFlags - from AthenaConfiguration.MainServicesConfig import MainServicesCfg - from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg - # Set up logging and new style config - log.setLevel(DEBUG) - Configurable.configurableRun3Behavior = True - ConfigFlags.addFlag("GeoModel.FaserVersion", "Faser-01") - - # from AthenaConfiguration.TestDefaults import defaultTestFiles - # Provide MC input - # ConfigFlags.Input.Files = defaultTestFiles.HITS - ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX" - ConfigFlags.Detector.SimulateEcal = True - ConfigFlags.GeoModel.Align.Dynamic = False - # Provide data input - ##from AthenaConfiguration.TestDefaults import defaultTestFiles - # - ConfigFlags.lock() - # Construct ComponentAccumulator - acc = MainServicesCfg(ConfigFlags) - acc.merge(PoolReadCfg(ConfigFlags)) - acc.merge(CaloGeometryCfg(ConfigFlags)) - acc.getService("ConditionStore").Dump=True - acc.printConfig(withDetails=True) - f=open('CaloGMCfg2.pkl','wb') - acc.store(f) - f.close() - ConfigFlags.dump() - # Execute and finish - acc.run(maxEvents=3) diff --git a/DetectorDescription/GeoModel/FaserGeoModel/python/CommonGeoDB.py b/DetectorDescription/GeoModel/FaserGeoModel/python/CommonGeoDB.py new file mode 100644 index 0000000000000000000000000000000000000000..4fa37231aa7847270aa5784b6e483041c48e71b7 --- /dev/null +++ b/DetectorDescription/GeoModel/FaserGeoModel/python/CommonGeoDB.py @@ -0,0 +1,27 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +def InitializeGeometryParameters(dbGeomCursor): + """Read version name, layout and fasernu from FaserCommon table. + + dbGeomCursor: FaserGeoDBInterface instance + """ + + dbId, dbCommon, dbParam = dbGeomCursor.GetCurrentLeafContent("FaserCommon") + print("dbId = ", dbId) + print("dbCommon = ", dbCommon) + print("dbParam = ", dbParam) + + params = {"Run" : "UNDEFINED", + "TrackerType" : "UNDEFINED", + "FaserNuType" : "UNDEFINED"} + + if len(dbId)>0: + key = dbId[0] + if "CONFIG" in dbParam : + params["Run"] = dbCommon[key][dbParam.index("CONFIG")] + if "TRACKERTYPE" in dbParam : + params["TrackerType"] = dbCommon[key][dbParam.index("TRACKERTYPE")] + if "FASERNUTYPE" in dbParam : + params["FaserNuType"] = dbCommon[key][dbParam.index("FASERNUTYPE")] + + return params diff --git a/DetectorDescription/GeoModel/FaserGeoModel/python/DipoleGMConfig.py b/DetectorDescription/GeoModel/FaserGeoModel/python/DipoleGMConfig.py deleted file mode 100644 index 32c67118b7cd01d78dc2112316c9d84555a342e3..0000000000000000000000000000000000000000 --- a/DetectorDescription/GeoModel/FaserGeoModel/python/DipoleGMConfig.py +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -# - -from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator - -def DipoleGeometryCfg (flags): - acc = ComponentAccumulator() - from DipoleGeoModel.DipoleGeoModelConfig import DipoleGeometryCfg - acc.merge(DipoleGeometryCfg( flags )) - return acc - - -if __name__ == "__main__": - # import os - from AthenaCommon.Logging import log - from AthenaCommon.Constants import DEBUG - from AthenaCommon.Configurable import Configurable - from CalypsoConfiguration.AllConfigFlags import ConfigFlags - from CalypsoConfiguration.MainServicesConfig import MainServicesCfg - from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg - # Set up logging and new style config - log.setLevel(DEBUG) - Configurable.configurableRun3Behavior = True - ConfigFlags.addFlag("GeoModel.FaserVersion", "Faser-01") - # ConfigFlags.addFlag("Detector.SimulateVeto", True) - # ConfigFlags.addFlag("Detector.SimulateFaserSCT", True) - # ConfigFlags.addFlag("Detector.SimulateUpstreamDipole", True) - # ConfigFlags.addFlag("Detector.SimulateCentralDipole", True) - # ConfigFlags.addFlag("Detector.SimulateDownstreamDipole", True) - - # from AthenaConfiguration.TestDefaults import defaultTestFiles - # Provide MC input - # ConfigFlags.Input.Files = defaultTestFiles.HITS - ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX" - ConfigFlags.Detector.SimulateVeto = False - ConfigFlags.Detector.SimulateFaserSCT = False - ConfigFlags.Detector.SimulateUpstreamDipole = True - ConfigFlags.Detector.SimulateCentralDipole = True - ConfigFlags.Detector.SimulateDownstreamDipole = True - ConfigFlags.GeoModel.Align.Dynamic = False - # Provide data input - ##from AthenaConfiguration.TestDefaults import defaultTestFiles - # - ConfigFlags.lock() - # Construct ComponentAccumulator - acc = MainServicesCfg(ConfigFlags) - acc.merge(PoolReadCfg(ConfigFlags)) - # acc.merge(ScintGeometryCfg(ConfigFlags)) - # acc.merge(FaserSCT_GeometryCfg(ConfigFlags)) - acc.merge(DipoleGeometryCfg(ConfigFlags)) - #acc.getService("StoreGateSvc").Dump=True - acc.getService("ConditionStore").Dump=True - acc.printConfig(withDetails=True) - f=open('DipoleGMCfg2.pkl','wb') - acc.store(f) - f.close() - ConfigFlags.dump() - # Execute and finish - acc.run(maxEvents=3) diff --git a/DetectorDescription/GeoModel/FaserGeoModel/python/FaserGeoDBInterface.py b/DetectorDescription/GeoModel/FaserGeoModel/python/FaserGeoDBInterface.py new file mode 100644 index 0000000000000000000000000000000000000000..fe851e833e5f0a6e099a683f2dc448fceda8fce0 --- /dev/null +++ b/DetectorDescription/GeoModel/FaserGeoModel/python/FaserGeoDBInterface.py @@ -0,0 +1,230 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the FASER collaboration + +from AthenaCommon import Logging + +import coral +import os + +# ------------------------------------------------------------------------------------- +# FaserGeoDBInterface : Interface with the geometry DB +# ------------------------------------------------------------------------------------- + +class FaserGeoDBInterface: + + def __init__(self,dbTag,verbose=False): + + self.dbGeoTag=dbTag + self.dbGeoTagId="" + self.dbSession=0 + self.dbSchema=0 + self.bVerbose=verbose + + self.TagAndNodeVersionDict={} + + def __del__(self): + + Logging.log.verbose("-> close DB connection") + del self.dbSession + + + def ConnectToDB(self): + + svc = coral.ConnectionService() + svcconfig = svc.configuration() + svcconfig.disablePoolAutomaticCleanUp() + svcconfig.setConnectionTimeOut(0) + + # Check that the FRONTIER_SERVER is set properly, if not reduce the retrial period and time out values + if not ('FRONTIER_SERVER' in os.environ and os.environ['FRONTIER_SERVER']): + svcconfig.setConnectionRetrialPeriod(1) + svcconfig.setConnectionRetrialTimeOut(1) + else: + svcconfig.setConnectionRetrialPeriod(300) + svcconfig.setConnectionRetrialTimeOut(3600) + + self.dbSession = svc.connect( 'FASERDD', accessMode = coral.access_ReadOnly ) + transaction = self.dbSession.transaction() + + self.dbSchema = self.dbSession.nominalSchema() + transaction.start(True) + + def ConnectAndBrowseGeoDB(self): + + self.ConnectToDB() + self.ReadGeometryTagId() + self.ReadTagAndNodeVersionsFromDB() + + + def ReadGeometryTagId(self): + """ Read the geometry Id corresponding to the geometry tag name in order to collect the child node Id's """ + + query = self.dbSchema.tableHandle("HVS_TAG2NODE").newQuery() + + query.addToOutputList('TAG_NAME') + query.addToOutputList('TAG_ID') + + bindstag2node = coral.AttributeList() + bindstag2node.extend('tagN','string') + bindstag2node[0].setData(self.dbGeoTag) + condString='TAG_NAME=:tagN' + + query.setCondition(condString,bindstag2node) + + for currentRow in iter(query.execute()): + for i in range(0,currentRow.size()): + if currentRow[i].specification().name()=="TAG_ID": + Logging.log.verbose("*** GeoTagId ******** "+str(currentRow)) + self.dbGeoTagId=currentRow[i].data() + continue + + del query + return + + + def AnalyseDBRequestOutput_Query(self,request,keyName=""): + """ Analyze request output -> return a list of dictionaries and a list of parameter types """ + + dataList=[] + typeList=[] + + # Loop over row + iCmpt=0 + for row in iter(request.execute()): + dictLoc={} + # loop over parameters read fron the DB + for j in range(0,row.size()): + name=row[j].specification().name() + paramType=row[j].specification().typeName() + value=row[j].data() + dictLoc[name]=value + # collect parameter name/types + if iCmpt==0: typeList.append((name,paramType)) + iCmpt+=1 + dataList.append(dictLoc) + + # return datalist as a list of dictionaries ( 1 dictionary per line) + if keyName=="": + return dataList,typeList + + # reorganize dataList as a dictionary with keys based on the keyName input parameter + dataDict={} + for d in dataList: + k=d[keyName] + v=[d[paramName] for paramName,tmp in typeList if paramName!=keyName] + dataDict[k]=v + + return dataDict,typeList + + + def ReadTagAndNodeVersionsFromDB(self): + """ Read tag and node versions defined for the geometry tag """ + + # Proceed by looping over the chilg Id's as long as childs are defined + + bStopLoop=False + tagDictGbl={} + + # Check if the geometry tag was found in the DB + if self.dbGeoTagId=="": + Logging.log.error("The geometry tag %s could not be found in the database.", self.dbGeoTag) + Logging.log.error("Its name might be misspelled and/or the script might access a local DB that is not up to date.") + import sys + sys.exit() + + # Get node ids for the geometry tag + tagIdList=[int(self.dbGeoTagId)] # start with the geometry tag Id + + # Loop while child tags are found + while not bStopLoop : + + query0 = self.dbSchema.newQuery() + + query0.addToOutputList('C.NODE_NAME',"nodename") + query0.addToOutputList('A.TAG_NAME',"tagname") + query0.addToOutputList('A.TAG_ID',"tagid") + + query0.addToTableList( "HVS_TAG2NODE","A" ) + query0.addToTableList( "HVS_LTAG2LTAG","B") + query0.addToTableList( "HVS_NODE","C" ) + + bindstag2node = coral.AttributeList() + condString="C.NODE_ID=A.NODE_ID AND A.TAG_ID=B.CHILD_TAG and B.PARENT_TAG IN (%s)" % str(tagIdList)[1:-1] + Logging.log.verbose("----------------------------\n"+condString) + query0.setCondition(condString,bindstag2node) + + # Analyze the output and collect the new tag and node versions + dictRes,paramType=self.AnalyseDBRequestOutput_Query(query0,"nodename") + tagDictGbl.update(dictRes) + del query0 + + if len(dictRes.keys())==0: + # No child found + bStopLoop=True + else: + # create child Id's list for the next loop + tagIdList=[int(dictRes[k][1]) for k in dictRes.keys()] + + + self.TagAndNodeVersionDict.update(tagDictGbl) + + + def GetCurrentLeafContent(self, leafName): + """ Read a DB table content and return 3 lists : + - dbId : the data_id list corresponding to each entry in the table + - dbContent : the table values as a dictionary with keys corresponding to the dbId list + - paramName : the name of the table parameters """ + + upLeafName=leafName.upper() + + # check if table is defined in the current geometry + if leafName not in self.TagAndNodeVersionDict: + print("leafName not found") + dbId=[] + dbContent={} + paramName=[] + return dbId,dbContent,paramName + + + # ------ leafName_DATA_ID entries + leafTagId=self.TagAndNodeVersionDict[leafName][1] + + query = self.dbSchema.tableHandle(upLeafName+"_DATA2TAG").newQuery() + query.addToOutputList(upLeafName+'_DATA_ID') + + bindstag2node = coral.AttributeList() + condString=upLeafName+'_TAG_ID='+str(leafTagId) + query.setCondition(condString,bindstag2node) + + dictRes,typeList=self.AnalyseDBRequestOutput_Query(query) + dataIdList=[int(s[upLeafName+'_DATA_ID']) for s in dictRes] + del query + + # ------- values corresponding to leafName_DATA_ entries + + query = self.dbSchema.tableHandle(upLeafName+"_DATA").newQuery() + + condString=upLeafName+'_DATA_ID IN ('+str(dataIdList)[1:-1]+") ORDER BY "+upLeafName+"_DATA_ID" + query.setCondition(condString,bindstag2node) + + dictRes,typeList=self.AnalyseDBRequestOutput_Query(query) + del query + + # ------- build output + # paramNames : name of the DB parameters (following the table columns order) + # dbId : data_id vector + # dbContent : table content (key = dbId, value=list of value fooliwin the paramName ranking scheme) + + paramName=[s[0] for s in typeList] + + paramKey=typeList[0][0] + dbId=[] + dbContent={} + for s in dictRes: + key=int(s[paramKey]) + dbId.append(key) + v=[s[k[0]] for k in typeList] + dbContent[key]=v + + return dbId,dbContent,paramName + + diff --git a/DetectorDescription/GeoModel/FaserGeoModel/python/FaserGeoModelConfig.py b/DetectorDescription/GeoModel/FaserGeoModel/python/FaserGeoModelConfig.py index 8f3b5d836d9fc870012b791f88eab60981861ad2..c75cbdbc6759af504b8d9baebf35dce8369e96ac 100644 --- a/DetectorDescription/GeoModel/FaserGeoModel/python/FaserGeoModelConfig.py +++ b/DetectorDescription/GeoModel/FaserGeoModel/python/FaserGeoModelConfig.py @@ -11,31 +11,13 @@ def FaserGeometryCfg (flags): from FaserGeoModel.ScintGMConfig import ScintGeometryCfg acc.merge(ScintGeometryCfg(flags)) - from FaserGeoModel.SCTGMConfig import SctGeometryCfg - acc.merge(SctGeometryCfg(flags)) + from FaserSCT_GeoModel.FaserSCT_GeoModelConfig import FaserSCT_GeometryCfg + acc.merge(FaserSCT_GeometryCfg(flags)) - from FaserGeoModel.DipoleGMConfig import DipoleGeometryCfg - acc.merge(DipoleGeometryCfg(flags)) + from DipoleGeoModel.DipoleGeoModelConfig import DipoleGeometryCfg + acc.merge(DipoleGeometryCfg( flags )) - # Hack to avoid randomly failing to find sqlite file - # poolSvc = CompFactory.PoolSvc() - # poolSvc.SortReplicas = False - # acc.addService(poolSvc) - - # if flags.Detector.SimulateScintillator or flags.Detector.GeometryScintillator: - # from FaserGeoModel.ScintGMConfig import ScintGeometryCfg - # acc.merge(ScintGeometryCfg(flags)) - - # if flags.Detector.SimulateTracker or flags.Detector.GeometryTracker: - # from FaserGeoModel.SCTGMConfig import SctGeometryCfg - # acc.merge(SctGeometryCfg(flags)) - - # if flags.Detector.SimulateDipole or flags.Detector.GeometryDipole: - # from FaserGeoModel.DipoleGMConfig import DipoleGeometryCfg - # acc.merge(DipoleGeometryCfg(flags)) - - if flags.Detector.SimulateFaserCalo or flags.Detector.GeometryFaserCalo: - from FaserGeoModel.CaloGMConfig import CaloGeometryCfg - acc.merge(CaloGeometryCfg(flags)) + from EcalGeoModel.EcalGeoModelConfig import EcalGeometryCfg + acc.merge(EcalGeometryCfg( flags )) return acc diff --git a/DetectorDescription/GeoModel/FaserGeoModel/python/GeoModelConfig.py b/DetectorDescription/GeoModel/FaserGeoModel/python/GeoModelConfig.py index d4bcd520de282bd1c2cdee84522db7c697fa8564..04584191a9547e36c9708fda12deeff7034686e2 100644 --- a/DetectorDescription/GeoModel/FaserGeoModel/python/GeoModelConfig.py +++ b/DetectorDescription/GeoModel/FaserGeoModel/python/GeoModelConfig.py @@ -1,10 +1,10 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -from __future__ import print_function from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory +from AthenaConfiguration.Enums import ProductionStep from AthenaCommon.Configurable import Configurable -# from AthenaCommon.Constants import VERBOSE +from AthenaCommon import Logging def GeoModelCfg(configFlags): version = configFlags.GeoModel.FaserVersion @@ -23,8 +23,7 @@ def GeoModelCfg(configFlags): GeoExportFile = geoExportFile, SupportedGeometry = int(relversion[0]) ) - if configFlags.Detector.Simulate: - ## Protects GeoModelSvc in the simulation from the AlignCallbacks + if configFlags.Common.ProductionStep == ProductionStep.Simulation: ## Protects GeoModelSvc in the simulation from the AlignCallbacks gms.AlignCallbacks = False result.addService(gms,primary=True,create=True) @@ -35,7 +34,7 @@ def GeoModelCfg(configFlags): from EventInfoMgt.TagInfoMgrConfig import TagInfoMgrCfg tim_ca,tagInfoMgr = TagInfoMgrCfg(configFlags) - # result.addService(tagInfoMgr) + result.addService(tagInfoMgr) result.merge(tim_ca) #TagInfoMgr used by GeoModelSvc but no ServiceHandle. Relies on string-name @@ -52,6 +51,5 @@ if __name__ == "__main__": ConfigFlags.lock() acc = GeoModelCfg( ConfigFlags ) - acc.store( open("test.pkl", "wb"), useBootStrapFile = False ) - + acc.store( open("test.pkl", "wb") ) print("All OK") diff --git a/DetectorDescription/GeoModel/FaserGeoModel/python/SCTGMConfig.py b/DetectorDescription/GeoModel/FaserGeoModel/python/SCTGMConfig.py deleted file mode 100644 index fcc96ff867743314cc331de37a024d228457eb98..0000000000000000000000000000000000000000 --- a/DetectorDescription/GeoModel/FaserGeoModel/python/SCTGMConfig.py +++ /dev/null @@ -1,51 +0,0 @@ -# -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -# - -from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator -from FaserSCT_GeoModel.FaserSCT_GeoModelConfig import FaserSCT_GeometryCfg - -def SctGeometryCfg (flags): - acc = ComponentAccumulator() - acc.merge(FaserSCT_GeometryCfg( flags )) - return acc - - -if __name__ == "__main__": - from AthenaCommon.Logging import log - from AthenaCommon.Constants import DEBUG - from AthenaCommon.Configurable import Configurable - from CalypsoConfiguration.AllConfigFlags import ConfigFlags - from CalypsoConfiguration.MainServicesConfig import MainServicesCfg - from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg - # Set up logging and new style config - log.setLevel(DEBUG) - Configurable.configurableRun3Behavior = True - ConfigFlags.addFlag("GeoModel.FaserVersion", "Faser-01") - # ConfigFlags.addFlag("Detector.SimulateVeto", True) - # ConfigFlags.addFlag("Detector.SimulateFaserSCT", True) - - # from AthenaConfiguration.TestDefaults import defaultTestFiles - # Provide MC input - # ConfigFlags.Input.Files = defaultTestFiles.HITS - ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX" - ConfigFlags.Detector.SimulateFaserSCT = True - ConfigFlags.GeoModel.Align.Dynamic = False - # Provide data input - ##from AthenaConfiguration.TestDefaults import defaultTestFiles - # - ConfigFlags.lock() - # Construct ComponentAccumulator - acc = MainServicesCfg(ConfigFlags) - acc.merge(PoolReadCfg(ConfigFlags)) - # acc.merge(ScintGeometryCfg(ConfigFlags)) - acc.merge(FaserSCT_GeometryCfg(ConfigFlags)) - #acc.getService("StoreGateSvc").Dump=True - acc.getService("ConditionStore").Dump=True - acc.printConfig(withDetails=True) - f=open('TrackerGMCfg2.pkl','wb') - acc.store(f) - f.close() - ConfigFlags.dump() - # Execute and finish - acc.run(maxEvents=3) diff --git a/DetectorDescription/GeoModel/FaserGeoModel/python/ScintGMConfig.py b/DetectorDescription/GeoModel/FaserGeoModel/python/ScintGMConfig.py index e78a59b9909b530c9c4e203b03bc31657d4d887e..1c94db586d1ca1baec1fe7df455eaaff6f10bbef 100644 --- a/DetectorDescription/GeoModel/FaserGeoModel/python/ScintGMConfig.py +++ b/DetectorDescription/GeoModel/FaserGeoModel/python/ScintGMConfig.py @@ -24,22 +24,21 @@ if __name__ == "__main__": from AthenaCommon.Logging import log from AthenaCommon.Constants import DEBUG from AthenaCommon.Configurable import Configurable - from AthenaConfiguration.AllConfigFlags import ConfigFlags + from CalypsoConfiguration.AllConfigFlags import ConfigFlags from CalypsoConfiguration.MainServicesConfig import MainServicesCfg from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg # Set up logging and new style config log.setLevel(DEBUG) Configurable.configurableRun3Behavior = True - ConfigFlags.addFlag("GeoModel.FaserVersion", "Faser-01") - # ConfigFlags.addFlag("Detector.SimulateVeto", True) + ConfigFlags.GeoModel.FaserVersion = "Faser-01" # from AthenaConfiguration.TestDefaults import defaultTestFiles # Provide MC input # ConfigFlags.Input.Files = defaultTestFiles.HITS ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX" - ConfigFlags.Detector.SimulateVeto = True - ConfigFlags.Detector.SimulateTrigger= True - ConfigFlags.Detector.SimulatePreshower= True + ConfigFlags.Detector.GeometryVeto = True + ConfigFlags.Detector.GeometryTrigger= True + ConfigFlags.Detector.GeometryPreshower= True ConfigFlags.GeoModel.Align.Dynamic = False # Provide data input ##from AthenaConfiguration.TestDefaults import defaultTestFiles diff --git a/DetectorDescription/GeoModel/FaserGeoModel/test/FaserGeometryConfig_EVNT_test.py b/DetectorDescription/GeoModel/FaserGeoModel/test/FaserGeometryConfig_EVNT_test.py index 4fd94d7237921598041c20a606e46f7763a32689..eb0ced94e5731055600128fce56efe974a0b7d25 100644 --- a/DetectorDescription/GeoModel/FaserGeoModel/test/FaserGeometryConfig_EVNT_test.py +++ b/DetectorDescription/GeoModel/FaserGeoModel/test/FaserGeometryConfig_EVNT_test.py @@ -10,6 +10,7 @@ if __name__ == "__main__": from AthenaCommon.Constants import VERBOSE, INFO from AthenaCommon.Configurable import Configurable from CalypsoConfiguration.AllConfigFlags import ConfigFlags + from AthenaConfiguration.Enums import ProductionStep from CalypsoConfiguration.MainServicesConfig import MainServicesCfg from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg # Set up logging and new style config @@ -19,13 +20,9 @@ if __name__ == "__main__": from AthenaConfiguration.TestDefaults import defaultTestFiles # Provide MC input + ConfigFlags.Common.ProductionStep = ProductionStep.Simulation ConfigFlags.Input.Files = defaultTestFiles.EVNT ConfigFlags.GeoModel.FaserVersion = "FASER-01" - ConfigFlags.Detector.SimulateVeto = True - ConfigFlags.Detector.SimulateFaserSCT = True - ConfigFlags.Detector.SimulateUpstreamDipole = True - ConfigFlags.Detector.SimulateCentralDipole = True - ConfigFlags.Detector.SimulateDownstreamDipole = True ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX" ConfigFlags.GeoModel.Align.Dynamic = False ConfigFlags.lock() diff --git a/Generators/FaserCosmicGenerator/README.md b/Generators/FaserCosmicGenerator/README.md index 36032771d5612d4d8280056497c1483ace53e288..c4e4a29d40879b5a4defac29e1d44d79274e02d8 100644 --- a/Generators/FaserCosmicGenerator/README.md +++ b/Generators/FaserCosmicGenerator/README.md @@ -2,7 +2,7 @@ ## Setup -In Athena 22.0.29, the scipy module is missing from the LCG environment for some reason. +In Athena 22.0.30, the scipy module is missing from the LCG environment for some reason. To use the generator, the following command is required after the usual steps to setup the release: diff --git a/README.md b/README.md index 9eb23b38eaef099935d2dff3777c390c804b3cc0..92183a28f41a30ca378577a43fafa25433fc5458 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ git clone --recursive https://:@gitlab.cern.ch:8443/$USERNAME/calypso.git #The next three lines are used to setup the ATLAS release environment export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh -asetup --input=calypso/asetup.faser Athena,22.0.29 +asetup --input=calypso/asetup.faser Athena,22.0.30 #create build directory mkdir build diff --git a/Scintillator/ScintDetDescr/PreshowerGeoModel/python/PreshowerGeoModelConfig.py b/Scintillator/ScintDetDescr/PreshowerGeoModel/python/PreshowerGeoModelConfig.py index d0e538cf233ff3e70564970c56f37fc57ca64b6b..e731e9df95aed24fb1f2b54bbeb5405ff34563c5 100644 --- a/Scintillator/ScintDetDescr/PreshowerGeoModel/python/PreshowerGeoModelConfig.py +++ b/Scintillator/ScintDetDescr/PreshowerGeoModel/python/PreshowerGeoModelConfig.py @@ -17,24 +17,4 @@ def PreshowerGeometryCfg( flags ): preshowerDetectorTool.useDynamicAlignFolders = flags.GeoModel.Align.Dynamic geoModelSvc.DetectorTools += [ preshowerDetectorTool ] - # if flags.GeoModel.Align.Dynamic: - # acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL1/ID","/Indet/AlignL1/ID",className="CondAttrListCollection")) - # acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL2/SCT","/Indet/AlignL2/SCT",className="CondAttrListCollection")) - # acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL3","/Indet/AlignL3",className="AlignableTransformContainer")) - # else: - # if (not flags.Detector.SimulatePreshower) or flags.Detector.OverlayPreshower: - # acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/Align","/Indet/Align",className="AlignableTransformContainer")) - # else: - # acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/Align","/Indet/Align")) - - # if flags.Common.Project is not "AthSimulation": # Protection for AthSimulation builds - # if (not flags.Detector.SimulatePreshower) or flags.Detector.OverlayPreshower: - # from PreshowerConditionsAlgorithms.PreshowerConditionsAlgorithmsConf import PreshowerAlignCondAlg - # preshowerAlignCondAlg = PreshowerAlignCondAlg(name = "PreshowerAlignCondAlg", - # UseDynamicAlignFolders = flags.GeoModel.Align.Dynamic) - # acc.addCondAlgo(preshowerAlignCondAlg) - # from PreshowerConditionsAlgorithms.PreshowerConditionsAlgorithmsConf import PreshowerDetectorElementCondAlg - # preshowerDetectorElementCondAlg = PreshowerDetectorElementCondAlg(name = "PreshowerDetectorElementCondAlg") - # acc.addCondAlgo(preshowerDetectorElementCondAlg) - return acc diff --git a/Scintillator/ScintDetDescr/PreshowerGeoModel/test/PreshowerGMConfig_test.py b/Scintillator/ScintDetDescr/PreshowerGeoModel/test/PreshowerGMConfig_test.py index e86bf87d5589ec97a03b4c5eaa0a03cdf8711261..2c2501267f993a31c25765208fef41575fa0e22f 100644 --- a/Scintillator/ScintDetDescr/PreshowerGeoModel/test/PreshowerGMConfig_test.py +++ b/Scintillator/ScintDetDescr/PreshowerGeoModel/test/PreshowerGMConfig_test.py @@ -11,7 +11,6 @@ if __name__ == "__main__": ConfigFlags.Input.Files = defaultTestFiles.HITS ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX" - ConfigFlags.Detector.SimulatePreshower = False ConfigFlags.GeoModel.Align.Dynamic = False ConfigFlags.lock() diff --git a/Scintillator/ScintDetDescr/TriggerGeoModel/python/TriggerGeoModelConfig.py b/Scintillator/ScintDetDescr/TriggerGeoModel/python/TriggerGeoModelConfig.py index b92891b22bdcae940622a667f3c537be46c29305..907ed096e0ed8048f6bfa49e222bb4bfca4058b4 100644 --- a/Scintillator/ScintDetDescr/TriggerGeoModel/python/TriggerGeoModelConfig.py +++ b/Scintillator/ScintDetDescr/TriggerGeoModel/python/TriggerGeoModelConfig.py @@ -17,24 +17,4 @@ def TriggerGeometryCfg( flags ): triggerDetectorTool.useDynamicAlignFolders = flags.GeoModel.Align.Dynamic geoModelSvc.DetectorTools += [ triggerDetectorTool ] - # if flags.GeoModel.Align.Dynamic: - # acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL1/ID","/Indet/AlignL1/ID",className="CondAttrListCollection")) - # acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL2/SCT","/Indet/AlignL2/SCT",className="CondAttrListCollection")) - # acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL3","/Indet/AlignL3",className="AlignableTransformContainer")) - # else: - # if (not flags.Detector.SimulateTrigger) or flags.Detector.OverlayTrigger: - # acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/Align","/Indet/Align",className="AlignableTransformContainer")) - # else: - # acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/Align","/Indet/Align")) - - # if flags.Common.Project is not "AthSimulation": # Protection for AthSimulation builds - # if (not flags.Detector.SimulateTrigger) or flags.Detector.OverlayTrigger: - # from TriggerConditionsAlgorithms.TriggerConditionsAlgorithmsConf import TriggerAlignCondAlg - # triggerAlignCondAlg = TriggerAlignCondAlg(name = "TriggerAlignCondAlg", - # UseDynamicAlignFolders = flags.GeoModel.Align.Dynamic) - # acc.addCondAlgo(triggerAlignCondAlg) - # from TriggerConditionsAlgorithms.TriggerConditionsAlgorithmsConf import TriggerDetectorElementCondAlg - # triggerDetectorElementCondAlg = TriggerDetectorElementCondAlg(name = "TriggerDetectorElementCondAlg") - # acc.addCondAlgo(triggerDetectorElementCondAlg) - return acc diff --git a/Scintillator/ScintDetDescr/TriggerGeoModel/test/TriggerGMConfig_test.py b/Scintillator/ScintDetDescr/TriggerGeoModel/test/TriggerGMConfig_test.py index 0c68cdf32151c4f71a50b1922751a05b5fbd1cb6..4c88d31efe75a0a0f7b8dbfef8ad1e73101ce4e8 100644 --- a/Scintillator/ScintDetDescr/TriggerGeoModel/test/TriggerGMConfig_test.py +++ b/Scintillator/ScintDetDescr/TriggerGeoModel/test/TriggerGMConfig_test.py @@ -11,7 +11,6 @@ if __name__ == "__main__": ConfigFlags.Input.Files = defaultTestFiles.HITS ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX" - ConfigFlags.Detector.SimulateTrigger = False ConfigFlags.GeoModel.Align.Dynamic = False ConfigFlags.lock() diff --git a/Scintillator/ScintDetDescr/VetoGeoModel/python/VetoGeoModelConfig.py b/Scintillator/ScintDetDescr/VetoGeoModel/python/VetoGeoModelConfig.py index 4e3497dc2e8452e951e98f8988e611027be1a093..5d2e4b9391b53324d975b46daee4a1996b3aba84 100644 --- a/Scintillator/ScintDetDescr/VetoGeoModel/python/VetoGeoModelConfig.py +++ b/Scintillator/ScintDetDescr/VetoGeoModel/python/VetoGeoModelConfig.py @@ -17,24 +17,4 @@ def VetoGeometryCfg( flags ): vetoDetectorTool.useDynamicAlignFolders = flags.GeoModel.Align.Dynamic geoModelSvc.DetectorTools += [ vetoDetectorTool ] - # if flags.GeoModel.Align.Dynamic: - # acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL1/ID","/Indet/AlignL1/ID",className="CondAttrListCollection")) - # acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL2/SCT","/Indet/AlignL2/SCT",className="CondAttrListCollection")) - # acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL3","/Indet/AlignL3",className="AlignableTransformContainer")) - # else: - # if (not flags.Detector.SimulateVeto) or flags.Detector.OverlayVeto: - # acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/Align","/Indet/Align",className="AlignableTransformContainer")) - # else: - # acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/Align","/Indet/Align")) - - # if flags.Common.Project is not "AthSimulation": # Protection for AthSimulation builds - # if (not flags.Detector.SimulateVeto) or flags.Detector.OverlayVeto: - # from VetoConditionsAlgorithms.VetoConditionsAlgorithmsConf import VetoAlignCondAlg - # vetoAlignCondAlg = VetoAlignCondAlg(name = "VetoAlignCondAlg", - # UseDynamicAlignFolders = flags.GeoModel.Align.Dynamic) - # acc.addCondAlgo(vetoAlignCondAlg) - # from VetoConditionsAlgorithms.VetoConditionsAlgorithmsConf import VetoDetectorElementCondAlg - # vetoDetectorElementCondAlg = VetoDetectorElementCondAlg(name = "VetoDetectorElementCondAlg") - # acc.addCondAlgo(vetoDetectorElementCondAlg) - return acc diff --git a/Scintillator/ScintDetDescr/VetoGeoModel/test/VetoGMConfig_test.py b/Scintillator/ScintDetDescr/VetoGeoModel/test/VetoGMConfig_test.py index 3b649270f43f16793de2a445b66935dc69bad34f..b38d833dd48371e3ce4ae49be0b2c0d108ed6982 100644 --- a/Scintillator/ScintDetDescr/VetoGeoModel/test/VetoGMConfig_test.py +++ b/Scintillator/ScintDetDescr/VetoGeoModel/test/VetoGMConfig_test.py @@ -11,7 +11,6 @@ if __name__ == "__main__": ConfigFlags.Input.Files = defaultTestFiles.HITS ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX" - ConfigFlags.Detector.SimulateVeto = False ConfigFlags.GeoModel.Align.Dynamic = False ConfigFlags.lock() diff --git a/Simulation/G4Faser/G4FaserAlg/test/runEcal.py b/Simulation/G4Faser/G4FaserAlg/test/runEcal.py index 268d8da2b34109fc82ec0225dd199282ec07719d..cbae412c90dd7776fdf1bb6fe50975de7076dfaf 100755 --- a/Simulation/G4Faser/G4FaserAlg/test/runEcal.py +++ b/Simulation/G4Faser/G4FaserAlg/test/runEcal.py @@ -57,22 +57,9 @@ if __name__ == "__main__": # Geometry-related settings # Do not change! # - ConfigFlags.Detector.SimulateVeto = True - ConfigFlags.Detector.GeometryVeto = True - ConfigFlags.Detector.SimulateTrigger= True - ConfigFlags.Detector.GeometryTrigger= True - ConfigFlags.Detector.SimulatePreshower = True - ConfigFlags.Detector.GeometryPreshower = True - ConfigFlags.Detector.SimulateFaserSCT = True - ConfigFlags.Detector.GeometryFaserSCT = True - ConfigFlags.Detector.SimulateEcal = True - ConfigFlags.Detector.GeometryEcal = True - ConfigFlags.Detector.SimulateUpstreamDipole = True - ConfigFlags.Detector.SimulateCentralDipole = True - ConfigFlags.Detector.SimulateDownstreamDipole = True - ConfigFlags.Detector.GeometryUpstreamDipole = True - ConfigFlags.Detector.GeometryCentralDipole = True - ConfigFlags.Detector.GeometryDownstreamDipole = True + detectors = ['Veto', 'Trigger', 'Preshower', 'FaserSCT', 'Dipole', 'Ecal'] + from CalypsoConfiguration.DetectorConfigFlags import setupDetectorsFromList + setupDetectorsFromList(ConfigFlags, detectors, toggle_geometry=True) ConfigFlags.GeoModel.Align.Dynamic = False ConfigFlags.Sim.ReleaseGeoModel = False # diff --git a/Simulation/G4Faser/G4FaserAlg/test/runG4.py b/Simulation/G4Faser/G4FaserAlg/test/runG4.py index a3e69e7a84a751dd9edb95b28fa20aab9e764db8..5054684724bedcb0c5595b423747b8ae4512170a 100644 --- a/Simulation/G4Faser/G4FaserAlg/test/runG4.py +++ b/Simulation/G4Faser/G4FaserAlg/test/runG4.py @@ -57,29 +57,14 @@ if __name__ == "__main__": # Geometry-related settings # Do not change! # - ConfigFlags.Detector.SimulateVeto = True - ConfigFlags.Detector.GeometryVeto = True - ConfigFlags.Detector.SimulateTrigger= True - ConfigFlags.Detector.GeometryTrigger= True - ConfigFlags.Detector.SimulatePreshower = True - ConfigFlags.Detector.GeometryPreshower = True - ConfigFlags.Detector.SimulateFaserSCT = True - ConfigFlags.Detector.GeometryFaserSCT = True - ConfigFlags.Detector.SimulateEcal = True - ConfigFlags.Detector.GeometryEcal = True - ConfigFlags.Detector.SimulateUpstreamDipole = True - ConfigFlags.Detector.SimulateCentralDipole = True - ConfigFlags.Detector.SimulateDownstreamDipole = True - ConfigFlags.Detector.GeometryUpstreamDipole = True - ConfigFlags.Detector.GeometryCentralDipole = True - ConfigFlags.Detector.GeometryDownstreamDipole = True + detectors = ['Veto', 'Trigger', 'Preshower', 'FaserSCT', 'Dipole', 'Ecal'] + from CalypsoConfiguration.DetectorConfigFlags import setupDetectorsFromList + setupDetectorsFromList(ConfigFlags, detectors, toggle_geometry=True) ConfigFlags.GeoModel.Align.Dynamic = False ConfigFlags.Sim.ReleaseGeoModel = False - # # Physics list # - ConfigFlags.Sim.PhysicsList = "FTFP_BERT" # # All flags should be set before calling lock diff --git a/Simulation/G4Faser/G4FaserAlg/test/runG4Cosmics.py b/Simulation/G4Faser/G4FaserAlg/test/runG4Cosmics.py index 56c675f5fce97a5f04d33dc3836a6d69e5586f2c..2479a9d1178d1ca543d57c36f7e22c1dff1472b5 100644 --- a/Simulation/G4Faser/G4FaserAlg/test/runG4Cosmics.py +++ b/Simulation/G4Faser/G4FaserAlg/test/runG4Cosmics.py @@ -58,22 +58,9 @@ if __name__ == "__main__": # Geometry-related settings # Do not change! # - ConfigFlags.Detector.SimulateVeto = True - ConfigFlags.Detector.GeometryVeto = True - ConfigFlags.Detector.SimulateTrigger= True - ConfigFlags.Detector.GeometryTrigger= True - ConfigFlags.Detector.SimulatePreshower = True - ConfigFlags.Detector.GeometryPreshower = True - ConfigFlags.Detector.SimulateFaserSCT = True - ConfigFlags.Detector.GeometryFaserSCT = True - ConfigFlags.Detector.SimulateEcal = True - ConfigFlags.Detector.GeometryEcal = True - ConfigFlags.Detector.SimulateUpstreamDipole = True - ConfigFlags.Detector.SimulateCentralDipole = True - ConfigFlags.Detector.SimulateDownstreamDipole = True - ConfigFlags.Detector.GeometryUpstreamDipole = True - ConfigFlags.Detector.GeometryCentralDipole = True - ConfigFlags.Detector.GeometryDownstreamDipole = True + detectors = ['Veto', 'Trigger', 'Preshower', 'FaserSCT', 'Dipole', 'Ecal'] + from CalypsoConfiguration.DetectorConfigFlags import setupDetectorsFromList + setupDetectorsFromList(ConfigFlags, detectors, toggle_geometry=True) ConfigFlags.GeoModel.Align.Dynamic = False ConfigFlags.Sim.ReleaseGeoModel = False diff --git a/Simulation/G4Faser/G4FaserAlg/test/runG4DecayInFlight.py b/Simulation/G4Faser/G4FaserAlg/test/runG4DecayInFlight.py index e11ee6d1624cca27a23eb454af21d5a5f2e633dd..d33533819fd706e5f0c08ac52e0a0e4915980107 100644 --- a/Simulation/G4Faser/G4FaserAlg/test/runG4DecayInFlight.py +++ b/Simulation/G4Faser/G4FaserAlg/test/runG4DecayInFlight.py @@ -58,22 +58,9 @@ if __name__ == "__main__": # Geometry-related settings # Do not change! # - ConfigFlags.Detector.SimulateVeto = True - ConfigFlags.Detector.GeometryVeto = True - ConfigFlags.Detector.SimulateTrigger= True - ConfigFlags.Detector.GeometryTrigger= True - ConfigFlags.Detector.SimulatePreshower = True - ConfigFlags.Detector.GeometryPreshower = True - ConfigFlags.Detector.SimulateFaserSCT = True - ConfigFlags.Detector.GeometryFaserSCT = True - ConfigFlags.Detector.SimulateEcal = True - ConfigFlags.Detector.GeometryEcal = True - ConfigFlags.Detector.SimulateUpstreamDipole = True - ConfigFlags.Detector.SimulateCentralDipole = True - ConfigFlags.Detector.SimulateDownstreamDipole = True - ConfigFlags.Detector.GeometryUpstreamDipole = True - ConfigFlags.Detector.GeometryCentralDipole = True - ConfigFlags.Detector.GeometryDownstreamDipole = True + detectors = ['Veto', 'Trigger', 'Preshower', 'FaserSCT', 'Dipole', 'Ecal'] + from CalypsoConfiguration.DetectorConfigFlags import setupDetectorsFromList + setupDetectorsFromList(ConfigFlags, detectors, toggle_geometry=True) ConfigFlags.GeoModel.Align.Dynamic = False ConfigFlags.Sim.ReleaseGeoModel = False diff --git a/Simulation/G4Faser/G4FaserAlg/test/runGeantinoScan.py b/Simulation/G4Faser/G4FaserAlg/test/runGeantinoScan.py index 5a35c670ec1b4c4b58bf0769b827a9df69a04cd5..249968dfbaa320b99dc70b6a955ce3234dd2412b 100644 --- a/Simulation/G4Faser/G4FaserAlg/test/runGeantinoScan.py +++ b/Simulation/G4Faser/G4FaserAlg/test/runGeantinoScan.py @@ -58,20 +58,9 @@ if __name__ == "__main__": # Geometry-related settings # Do not change! # - ConfigFlags.Detector.SimulateVeto = True - ConfigFlags.Detector.GeometryVeto = True - ConfigFlags.Detector.SimulateTrigger= True - ConfigFlags.Detector.GeometryTrigger= True - ConfigFlags.Detector.SimulatePreshower = True - ConfigFlags.Detector.GeometryPreshower = True - ConfigFlags.Detector.SimulateFaserSCT = True - ConfigFlags.Detector.GeometryFaserSCT = True - ConfigFlags.Detector.SimulateUpstreamDipole = True - ConfigFlags.Detector.SimulateCentralDipole = True - ConfigFlags.Detector.SimulateDownstreamDipole = True - ConfigFlags.Detector.GeometryUpstreamDipole = True - ConfigFlags.Detector.GeometryCentralDipole = True - ConfigFlags.Detector.GeometryDownstreamDipole = True + detectors = ['Veto', 'Trigger', 'Preshower', 'FaserSCT', 'Dipole', 'Ecal'] + from CalypsoConfiguration.DetectorConfigFlags import setupDetectorsFromList + setupDetectorsFromList(ConfigFlags, detectors, toggle_geometry=True) ConfigFlags.GeoModel.Align.Dynamic = False ConfigFlags.Sim.ReleaseGeoModel = False # diff --git a/Simulation/G4Faser/G4FaserAlg/test/runGen.py b/Simulation/G4Faser/G4FaserAlg/test/runGen.py index 7ce7118445796b62deea7dec2ea482c9e3e3dfc4..a53f8aabe62609c3753c609f0b45dcb7a43c7204 100755 --- a/Simulation/G4Faser/G4FaserAlg/test/runGen.py +++ b/Simulation/G4Faser/G4FaserAlg/test/runGen.py @@ -57,20 +57,9 @@ if __name__ == "__main__": # Geometry-related settings # Do not change! # -# ConfigFlags.Detector.SimulateVeto = True -# ConfigFlags.Detector.GeometryVeto = True -# ConfigFlags.Detector.SimulateTrigger= True -# ConfigFlags.Detector.GeometryTrigger= True -# ConfigFlags.Detector.SimulatePreshower = True -# ConfigFlags.Detector.GeometryPreshower = True -# ConfigFlags.Detector.SimulateFaserSCT = True -# ConfigFlags.Detector.GeometryFaserSCT = True -# ConfigFlags.Detector.SimulateUpstreamDipole = True -# ConfigFlags.Detector.SimulateCentralDipole = True -# ConfigFlags.Detector.SimulateDownstreamDipole = True -# ConfigFlags.Detector.GeometryUpstreamDipole = True -# ConfigFlags.Detector.GeometryCentralDipole = True -# ConfigFlags.Detector.GeometryDownstreamDipole = True +# detectors = ['Veto', 'Trigger', 'Preshower', 'FaserSCT', 'Dipole', 'Ecal'] +# from CalypsoConfiguration.DetectorConfigFlags import setupDetectorsFromList +# setupDetectorsFromList(ConfigFlags, detectors, toggle_geometry=True) ConfigFlags.GeoModel.Align.Dynamic = False ConfigFlags.Sim.ReleaseGeoModel = False # diff --git a/Simulation/G4Faser/G4FaserServices/python/G4FaserServicesConfigNew.py b/Simulation/G4Faser/G4FaserServices/python/G4FaserServicesConfigNew.py index a46deaa99702897bef402d0005cc8f828c5c1421..c9d461ceb0edfd01a20732c0c3c686d94bc3e911 100644 --- a/Simulation/G4Faser/G4FaserServices/python/G4FaserServicesConfigNew.py +++ b/Simulation/G4Faser/G4FaserServices/python/G4FaserServicesConfigNew.py @@ -32,13 +32,13 @@ def getFASER_RegionCreatorList(ConfigFlags): # if ConfigFlags.Beam.Type == 'cosmics' or ConfigFlags.Sim.CavernBG != 'Signal': # regionCreatorList += [SX1PhysicsRegionToolCfg(ConfigFlags), BedrockPhysicsRegionToolCfg(ConfigFlags), CavernShaftsConcretePhysicsRegionToolCfg(ConfigFlags)] - if ConfigFlags.Detector.SimulateScintillator: + if ConfigFlags.Detector.EnableScintillator: regionCreatorList += [ScintillatorPhysicsRegionToolCfg(ConfigFlags)] - if ConfigFlags.Detector.SimulateTracker: + if ConfigFlags.Detector.EnableTracker: regionCreatorList += [TrackerPhysicsRegionToolCfg(ConfigFlags)] - if ConfigFlags.Detector.SimulateEcal: + if ConfigFlags.Detector.EnableEcal: regionCreatorList += [EcalPhysicsRegionToolCfg(ConfigFlags)] return regionCreatorList @@ -52,39 +52,27 @@ def FASER_FieldMgrListCfg(ConfigFlags): tool = result.popToolsAndMerge(acc) fieldMgrList += [tool] - # if ConfigFlags.Detector.SimulateUpstreamDipole: - # acc = UpstreamDipoleFieldManagerToolCfg(ConfigFlags) - # tool = result.popToolsAndMerge(acc) - # fieldMgrList += [tool] - # if ConfigFlags.Detector.SimulateCentralDipole: - # acc = CentralDipoleFieldManagerToolCfg(ConfigFlags) - # tool = result.popToolsAndMerge(acc) - # fieldMgrList += [tool] - # if ConfigFlags.Detector.SimulateDownstreamDipole: - # acc = DownstreamDipoleFieldManagerToolCfg(ConfigFlags) - # tool = result.popToolsAndMerge(acc) - # fieldMgrList += [tool] - if ConfigFlags.Detector.SimulateDipole: + if ConfigFlags.Detector.GeometryDipole: acc = DipoleFieldManagerToolCfg(ConfigFlags) tool = result.popToolsAndMerge(acc) fieldMgrList += [tool] - if ConfigFlags.Detector.SimulateVeto: + if ConfigFlags.Detector.GeometryVeto: acc = VetoFieldManagerToolCfg(ConfigFlags) tool = result.popToolsAndMerge(acc) fieldMgrList += [tool] - if ConfigFlags.Detector.SimulateTrigger: + if ConfigFlags.Detector.GeometryTrigger: acc = TriggerFieldManagerToolCfg(ConfigFlags) tool = result.popToolsAndMerge(acc) fieldMgrList += [tool] - if ConfigFlags.Detector.SimulatePreshower: + if ConfigFlags.Detector.GeometryPreshower: acc = PreshowerFieldManagerToolCfg(ConfigFlags) tool = result.popToolsAndMerge(acc) fieldMgrList += [tool] - if ConfigFlags.Detector.SimulateTracker: + if ConfigFlags.Detector.GeometryTracker: acc = TrackerFieldManagerToolCfg(ConfigFlags) tool = result.popToolsAndMerge(acc) fieldMgrList += [tool] - if ConfigFlags.Detector.SimulateEcal: + if ConfigFlags.Detector.GeometryEcal: acc = EcalFieldManagerToolCfg(ConfigFlags) tool = result.popToolsAndMerge(acc) fieldMgrList += [tool] diff --git a/Simulation/G4Faser/G4FaserTools/python/G4FaserToolsConfigNew.py b/Simulation/G4Faser/G4FaserTools/python/G4FaserToolsConfigNew.py index 0fda13cce8f864fbc07d2a3ebcd3cbf01d71c69a..6f091f84426c8d0f31a128c1ab18d0eaf0fcc9a4 100644 --- a/Simulation/G4Faser/G4FaserTools/python/G4FaserToolsConfigNew.py +++ b/Simulation/G4Faser/G4FaserTools/python/G4FaserToolsConfigNew.py @@ -18,17 +18,17 @@ def generateScintSensitiveDetectorList(ConfigFlags): result = ComponentAccumulator() SensitiveDetectorList=[] - if ConfigFlags.Detector.SimulateVeto: + if ConfigFlags.Detector.EnableVeto: accVeto,toolVeto = VetoSensorSDCfg(ConfigFlags) SensitiveDetectorList += [ toolVeto ] result.merge(accVeto) - if ConfigFlags.Detector.SimulateTrigger: + if ConfigFlags.Detector.EnableTrigger: accTrigger,toolTrigger = TriggerSensorSDCfg(ConfigFlags) SensitiveDetectorList += [ toolTrigger ] result.merge(accTrigger) - if ConfigFlags.Detector.SimulatePreshower: + if ConfigFlags.Detector.EnablePreshower: accPreshower,toolPreshower = PreshowerSensorSDCfg(ConfigFlags) SensitiveDetectorList += [ toolPreshower ] result.merge(accPreshower) @@ -40,7 +40,7 @@ def generateTrackerSensitiveDetectorList(ConfigFlags): result = ComponentAccumulator() SensitiveDetectorList=[] - if ConfigFlags.Detector.SimulateFaserSCT: + if ConfigFlags.Detector.EnableFaserSCT: accSCT,toolSCT = SctSensorSDCfg(ConfigFlags) SensitiveDetectorList += [ toolSCT ] result.merge(accSCT) @@ -52,7 +52,7 @@ def generateCaloSensitiveDetectorList(ConfigFlags): result = ComponentAccumulator() SensitiveDetectorList=[] - if ConfigFlags.Detector.SimulateEcal: + if ConfigFlags.Detector.EnableEcal: accEcal,toolEcal = EcalSensorSDCfg(ConfigFlags) SensitiveDetectorList += [ toolEcal ] result.merge(accEcal) diff --git a/Simulation/G4Faser/G4FaserTools/python/G4GeometryToolConfig.py b/Simulation/G4Faser/G4FaserTools/python/G4GeometryToolConfig.py index dd8cbc0cf2d54e5e0c3ba5799a413ca491747142..d08fd6f405c3a81b8eaada00cf8e7e01417c4f4a 100644 --- a/Simulation/G4Faser/G4FaserTools/python/G4GeometryToolConfig.py +++ b/Simulation/G4Faser/G4FaserTools/python/G4GeometryToolConfig.py @@ -61,32 +61,32 @@ def generateSubDetectorList(ConfigFlags): result = ComponentAccumulator() SubDetectorList=[] - if ConfigFlags.Detector.SimulateVeto: + if ConfigFlags.Detector.GeometryVeto: accVeto, toolVeto = VetoGeoDetectorToolCfg(ConfigFlags) SubDetectorList += [ toolVeto ] result.merge(accVeto) - if ConfigFlags.Detector.SimulateTrigger: + if ConfigFlags.Detector.GeometryTrigger: accTrigger, toolTrigger = TriggerGeoDetectorToolCfg(ConfigFlags) SubDetectorList += [ toolTrigger ] result.merge(accTrigger) - if ConfigFlags.Detector.SimulatePreshower: + if ConfigFlags.Detector.GeometryPreshower: accPreshower, toolPreshower = PreshowerGeoDetectorToolCfg(ConfigFlags) SubDetectorList += [ toolPreshower ] result.merge(accPreshower) - if ConfigFlags.Detector.SimulateFaserSCT: + if ConfigFlags.Detector.GeometryFaserSCT: accSCT, toolSCT = SCTGeoDetectorToolCfg(ConfigFlags) SubDetectorList += [ toolSCT ] result.merge(accSCT) - if ConfigFlags.Detector.SimulateDipole: + if ConfigFlags.Detector.GeometryDipole: accDipole, toolDipole = DipoleGeoDetectorToolCfg(ConfigFlags) SubDetectorList += [ toolDipole ] result.merge(accDipole) - if ConfigFlags.Detector.SimulateEcal: + if ConfigFlags.Detector.GeometryEcal: accEcal, toolEcal = EcalGeoDetectorToolCfg(ConfigFlags) SubDetectorList += [ toolEcal ] result.merge(accEcal) diff --git a/Simulation/ISF/ISF_Core/FaserISF_Services/test/FaserISF_ServicesConfigNew_test.py b/Simulation/ISF/ISF_Core/FaserISF_Services/test/FaserISF_ServicesConfigNew_test.py index 828aef6da99541b57a84bfb261ad2c7f7421690f..88c14ccb7498a0f77190503815eb42129ab7a4a0 100644 --- a/Simulation/ISF/ISF_Core/FaserISF_Services/test/FaserISF_ServicesConfigNew_test.py +++ b/Simulation/ISF/ISF_Core/FaserISF_Services/test/FaserISF_ServicesConfigNew_test.py @@ -24,7 +24,6 @@ if __name__ == '__main__': ConfigFlags.Sim.WorldRRange = 15000 ConfigFlags.Sim.WorldZRange = 27000 #change defaults? - ConfigFlags.Detector.SimulateForward = False # Finalize ConfigFlags.lock() diff --git a/Tracker/TrackerDetDescr/DipoleGeoModel/CMakeLists.txt b/Tracker/TrackerDetDescr/DipoleGeoModel/CMakeLists.txt index 534b6608385732a05d0ff479bd05ba154c15b8ef..66d08f6cf22b8a6b6c0d8b55381524ace835e06c 100644 --- a/Tracker/TrackerDetDescr/DipoleGeoModel/CMakeLists.txt +++ b/Tracker/TrackerDetDescr/DipoleGeoModel/CMakeLists.txt @@ -19,7 +19,8 @@ atlas_add_component( DipoleGeoModel LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel GeoModelFaserUtilities GaudiKernel TrackerGeoModelUtils SGTools StoreGateLib SGtests AthenaPoolUtilities DetDescrConditions GeometryDBSvcLib ) atlas_add_test( DipoleGMConfig_test - SCRIPT test/DipoleGMConfig_test.py + SCRIPT python ${CMAKE_CURRENT_SOURCE_DIR}/test/DipoleGMConfig_test.py + PROPERTIES WORKING_DIRECTORY ${CMAKE_BINARY_DIR} PROPERTIES TIMEOUT 300 ) # Install files from the package: diff --git a/Tracker/TrackerDetDescr/DipoleGeoModel/python/DipoleGeoModelConfig.py b/Tracker/TrackerDetDescr/DipoleGeoModel/python/DipoleGeoModelConfig.py index c45d13a1ecc56a7b0f905964bea65399c89b7e75..72c8780996dcb0e6ba169130399444dc7f00ae25 100644 --- a/Tracker/TrackerDetDescr/DipoleGeoModel/python/DipoleGeoModelConfig.py +++ b/Tracker/TrackerDetDescr/DipoleGeoModel/python/DipoleGeoModelConfig.py @@ -2,13 +2,6 @@ from AthenaConfiguration.ComponentFactory import CompFactory -# def getDipoleTool(name="DipoleTool", **kwargs): -# kwargs.setdefault("RDBAccessSvc", "RDBAccessSvc") -# kwargs.setdefault("GeometryDBSvc", "TrackerGeometryDBSvc") -# kwargs.setdefault("GeoDbTagSvc", "GeoDbTagSvc") -# return CfgMgr.DipoleTool(name, **kwargs) - - def DipoleGeometryCfg( flags ): from FaserGeoModel.GeoModelConfig import GeoModelCfg acc = GeoModelCfg( flags ) diff --git a/Tracker/TrackerDetDescr/DipoleGeoModel/test/DipoleGMConfig_test.py b/Tracker/TrackerDetDescr/DipoleGeoModel/test/DipoleGMConfig_test.py index a20abc7e90dffbde4996b6b3b2c6ac05aafbb3ae..e9b1cf75813c29ae1fde82433c067df18510b27e 100755 --- a/Tracker/TrackerDetDescr/DipoleGeoModel/test/DipoleGMConfig_test.py +++ b/Tracker/TrackerDetDescr/DipoleGeoModel/test/DipoleGMConfig_test.py @@ -11,7 +11,6 @@ if __name__ == "__main__": ConfigFlags.Input.Files = defaultTestFiles.HITS ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX" - ConfigFlags.Detector.SimulateDipole = True ConfigFlags.GeoModel.Align.Dynamic = False ConfigFlags.lock() diff --git a/Tracker/TrackerDetDescr/FaserSCT_GeoModel/python/FaserSCT_GeoModelConfig.py b/Tracker/TrackerDetDescr/FaserSCT_GeoModel/python/FaserSCT_GeoModelConfig.py index 50af73d47bd06e49d030dffd0289b962cab5ff55..88a5b7b1e8b32c6ebf0555a8c485b0cea9ef1677 100644 --- a/Tracker/TrackerDetDescr/FaserSCT_GeoModel/python/FaserSCT_GeoModelConfig.py +++ b/Tracker/TrackerDetDescr/FaserSCT_GeoModel/python/FaserSCT_GeoModelConfig.py @@ -1,17 +1,9 @@ # Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration from AthenaConfiguration.ComponentFactory import CompFactory +from AthenaConfiguration.Enums import ProductionStep from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline -# def getFaserSCT_DetectorTool(name="FaserSCT_DetectorTool", **kwargs): -# kwargs.setdefault("DetectorName", "SCT") -# kwargs.setdefault("Alignable", True) -# kwargs.setdefault("RDBAccessSvc", "RDBAccessSvc") -# kwargs.setdefault("GeometryDBSvc", "TrackerGeometryDBSvc") -# kwargs.setdefault("GeoDbTagSvc", "GeoDbTagSvc") -# FaserSCT_DetectorTool = CompFactory.FaserSCT_DetectorTool -# return FaserSCT_DetectorTool(name, **kwargs) - def FaserSCT_GeometryCfg( flags ): from FaserGeoModel.GeoModelConfig import GeoModelCfg acc = GeoModelCfg( flags ) @@ -38,12 +30,12 @@ def FaserSCT_GeometryCfg( flags ): # acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL3","/Indet/AlignL3",className="AlignableTransformContainer")) print("FaserSCT dynamic align flag is not supported!") else: - if (not flags.Detector.SimulateFaserSCT) : + if flags.Common.Project != "AthSimulation" and (flags.Common.ProductionStep != ProductionStep.Simulation or flags.Overlay.DataOverlay): acc.merge(addFoldersSplitOnline(flags,"SCT","/Tracker/Onl/Align","/Tracker/Align",className="AlignableTransformContainer")) - # else: - # acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/Align","/Indet/Align")) + else: + acc.merge(addFoldersSplitOnline(flags,"SCT","/Tracker/Onl/Align","/Tracker/Align")) if flags.Common.Project != "AthSimulation": # Protection for AthSimulation builds - if (not flags.Detector.SimulateFaserSCT) : + if flags.Common.ProductionStep != ProductionStep.Simulation or flags.Overlay.DataOverlay: FaserSCT_AlignCondAlg = CompFactory.FaserSCT_AlignCondAlg sctAlignCondAlg = FaserSCT_AlignCondAlg(name = "FaserSCT_AlignCondAlg", UseDynamicAlignFolders = flags.GeoModel.Align.Dynamic) diff --git a/Tracker/TrackerDetDescr/FaserSCT_GeoModel/test/FaserSCT_GMConfig_test.py b/Tracker/TrackerDetDescr/FaserSCT_GeoModel/test/FaserSCT_GMConfig_test.py index cd8a4d6204d7d0a83298531cbe449e7309be55d3..9349cdf70ea06476605c181ceb471fc725abad4d 100755 --- a/Tracker/TrackerDetDescr/FaserSCT_GeoModel/test/FaserSCT_GMConfig_test.py +++ b/Tracker/TrackerDetDescr/FaserSCT_GeoModel/test/FaserSCT_GMConfig_test.py @@ -11,7 +11,6 @@ if __name__ == "__main__": ConfigFlags.Input.Files = defaultTestFiles.HITS ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX" - ConfigFlags.Detector.SimulateFaserSCT = False ConfigFlags.GeoModel.Align.Dynamic = False ConfigFlags.lock() diff --git a/Tracker/TrackerDigitization/FaserSCT_Digitization/python/FaserSCT_DigitizationConfigNew.py b/Tracker/TrackerDigitization/FaserSCT_Digitization/python/FaserSCT_DigitizationConfigNew.py index 5b7438529ccc6aac610162cdc1322c59c3767431..95d6b690ce2a9579c10d9c8e60f3daa614dc4e8b 100644 --- a/Tracker/TrackerDigitization/FaserSCT_Digitization/python/FaserSCT_DigitizationConfigNew.py +++ b/Tracker/TrackerDigitization/FaserSCT_Digitization/python/FaserSCT_DigitizationConfigNew.py @@ -9,7 +9,7 @@ from AthenaCommon.Logging import logging PileUpXingFolder=CompFactory.PileUpXingFolder from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg #SCT_RadDamageSummaryTool=CompFactory.SCT_RadDamageSummaryTool -from FaserGeoModel.SCTGMConfig import SctGeometryCfg +from FaserSCT_GeoModel.FaserSCT_GeoModelConfig import FaserSCT_GeometryCfg from FaserSCT_ConditionsTools.FaserSCT_DCSConditionsConfig import FaserSCT_DCSConditionsCfg from FaserSCT_ConditionsTools.FaserSCT_SiliconConditionsConfig import FaserSCT_SiliconConditionsToolCfg, FaserSCT_SiliconConditionsCfg @@ -32,7 +32,7 @@ def FaserSCT_LastXing(): def FaserSCT_DigitizationCommonCfg(flags, name="FaserSCT_DigitizationToolCommon", **kwargs): """Return ComponentAccumulator with common FaserSCT digitization tool config""" - acc = SctGeometryCfg(flags) + acc = FaserSCT_GeometryCfg(flags) if not flags.Digitization.DoInnerDetectorNoise: kwargs.setdefault("OnlyHitElements", True) diff --git a/Tracker/TrackerDigitization/FaserSCT_Digitization/test/FaserSCT_DigitizationDbg.py b/Tracker/TrackerDigitization/FaserSCT_Digitization/test/FaserSCT_DigitizationDbg.py index b4715bf9b718234bc07210670670d8ab0c577718..33389e158e45283bf2813dd6752547a570e0d7ed 100644 --- a/Tracker/TrackerDigitization/FaserSCT_Digitization/test/FaserSCT_DigitizationDbg.py +++ b/Tracker/TrackerDigitization/FaserSCT_Digitization/test/FaserSCT_DigitizationDbg.py @@ -27,7 +27,6 @@ ConfigFlags.Output.RDOFileName = "my.RDO.pool.root" ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX" ConfigFlags.GeoModel.Align.Dynamic = False ConfigFlags.Beam.NumberOfCollisions = 0. -#ConfigFlags.Detector.SimulateFaserSCT = True ConfigFlags.Digitization.TruthOutput = True diff --git a/Tracker/TrackerRecAlgs/FaserSpacePoints/python/FaserSpacePointsCosmics.py b/Tracker/TrackerRecAlgs/FaserSpacePoints/python/FaserSpacePointsCosmics.py index 3285654cc36993c893ca9d79e65d1ee6c38a2aad..1859efa6cb0a1ee5e1057149ade0bcbfae9851d2 100644 --- a/Tracker/TrackerRecAlgs/FaserSpacePoints/python/FaserSpacePointsCosmics.py +++ b/Tracker/TrackerRecAlgs/FaserSpacePoints/python/FaserSpacePointsCosmics.py @@ -14,13 +14,14 @@ from TrackerPrepRawDataFormation.TrackerPrepRawDataFormationConfig import FaserS from TrackerSpacePointFormation.TrackerSpacePointFormationConfig import TrackerSpacePointFinderCfg from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory +from FaserSCT_GeoModel.FaserSCT_GeoModelConfig import FaserSCT_GeometryCfg Tracker__TruthSeededTrackFinder, THistSvc=CompFactory.getComps("Tracker::FaserSpacePoints", "THistSvc") def TruthSeededTrackFinderBasicCfg(flags, **kwargs): """Return ComponentAccumulator for TruthSeededTrackFinder""" - acc = ComponentAccumulator() + acc = FaserSCT_GeometryCfg(flags) kwargs.setdefault("SpacePointsSCTName", "SCT_SpacePointContainer") acc.addEventAlgo(Tracker__TruthSeededTrackFinder(**kwargs)) # attach ToolHandles diff --git a/Tracker/TrackerRecAlgs/TrackerClusterFit/python/TrackerClusterFitConfig.py b/Tracker/TrackerRecAlgs/TrackerClusterFit/python/TrackerClusterFitConfig.py index dfeb2517763b8c3b0be0fcab43fef99d92db6f5f..19fb699dae47f023b5a20665461f2cfe3a3510d6 100644 --- a/Tracker/TrackerRecAlgs/TrackerClusterFit/python/TrackerClusterFitConfig.py +++ b/Tracker/TrackerRecAlgs/TrackerClusterFit/python/TrackerClusterFitConfig.py @@ -2,13 +2,12 @@ Copyright (C) 2021 CERN for the benefit of the FASER collaboration """ -from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory -# from FaserGeoModel.SCTGMConfig import SctGeometryCfg +from FaserSCT_GeoModel.FaserSCT_GeoModelConfig import FaserSCT_GeometryCfg def ClusterFitAlgBasicCfg(flags, **kwargs): """Return ComponentAccumulator for Tracker ClusterFitAlg""" - acc = ComponentAccumulator() + acc = FaserSCT_GeometryCfg( flags ) # clusterTool = acc.popToolsAndMerge(FaserSCT_ClusterizationToolCfg(flags)) # kwargs.setdefault("SCT_ClusteringTool", clusterTool) # kwargs.setdefault("DataObjectName", "SCT_RDOs") diff --git a/Tracker/TrackerRecAlgs/TrackerClusterFit/test/TrackerClusterFitDbg.py b/Tracker/TrackerRecAlgs/TrackerClusterFit/test/TrackerClusterFitDbg.py index da1f3c16ff27ade957870168cbea9b55c25a3139..0f9c27faf83191276126e18859cf8177de9f096c 100644 --- a/Tracker/TrackerRecAlgs/TrackerClusterFit/test/TrackerClusterFitDbg.py +++ b/Tracker/TrackerRecAlgs/TrackerClusterFit/test/TrackerClusterFitDbg.py @@ -102,6 +102,8 @@ ConfigFlags.Common.isOnline = False ConfigFlags.GeoModel.Align.Dynamic = False ConfigFlags.Beam.NumberOfCollisions = 0. +ConfigFlags.Detector.GeometryFaserSCT = True + ConfigFlags.lock() # Core components diff --git a/Tracker/TrackerRecAlgs/TrackerPrepRawDataFormation/python/TrackerPrepRawDataFormationConfig.py b/Tracker/TrackerRecAlgs/TrackerPrepRawDataFormation/python/TrackerPrepRawDataFormationConfig.py index 4d0786c4c586945e790fe9dded5038ea8b5fc51e..57c9d3cea350a801b9b07f83a391f2d04ef1efba 100644 --- a/Tracker/TrackerRecAlgs/TrackerPrepRawDataFormation/python/TrackerPrepRawDataFormationConfig.py +++ b/Tracker/TrackerRecAlgs/TrackerPrepRawDataFormation/python/TrackerPrepRawDataFormationConfig.py @@ -7,14 +7,14 @@ from AthenaConfiguration.ComponentFactory import CompFactory PileUpXingFolder=CompFactory.PileUpXingFolder from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg -from FaserGeoModel.SCTGMConfig import SctGeometryCfg +from FaserSCT_GeoModel.FaserSCT_GeoModelConfig import FaserSCT_GeometryCfg from FaserSiLorentzAngleTool.FaserSCT_LorentzAngleConfig import FaserSCT_LorentzAngleCfg def FaserSCT_ClusterizationCommonCfg(flags, name="FaserSCT_ClusterizationToolCommon", **kwargs): """Return ComponentAccumulator with common FaserSCT Clusterization tool config""" - acc = SctGeometryCfg(flags) + acc = FaserSCT_GeometryCfg(flags) Tracker__TrackerClusterMakerTool,Tracker__FaserSCT_ClusteringTool=CompFactory.getComps("Tracker::TrackerClusterMakerTool", "Tracker::FaserSCT_ClusteringTool") trackerClusterMakerTool = Tracker__TrackerClusterMakerTool(name = "TrackerClusterMakerTool") diff --git a/Tracker/TrackerRecAlgs/TrackerSpacePointFormation/python/TrackerSpacePointFormationConfig.py b/Tracker/TrackerRecAlgs/TrackerSpacePointFormation/python/TrackerSpacePointFormationConfig.py index a1076d989a188d67de7f41979a8818a8c6729d5e..de8355dedc7b23a05ec50fe6757fcba0d00f759b 100644 --- a/Tracker/TrackerRecAlgs/TrackerSpacePointFormation/python/TrackerSpacePointFormationConfig.py +++ b/Tracker/TrackerRecAlgs/TrackerSpacePointFormation/python/TrackerSpacePointFormationConfig.py @@ -7,7 +7,7 @@ from AthenaConfiguration.ComponentFactory import CompFactory PileUpXingFolder, Tracker__TrackerSpacePointFinder, Tracker__StatisticsAlg, TrackerDD__SiElementPropertiesTableCondAlg, Tracker__TrackerSpacePointMakerTool = CompFactory.getComps("PileUpXingFolder", "Tracker::TrackerSpacePointFinder", "Tracker::StatisticsAlg", "TrackerDD::SiElementPropertiesTableCondAlg", "Tracker::TrackerSpacePointMakerTool") from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg -from FaserGeoModel.SCTGMConfig import SctGeometryCfg +from FaserSCT_GeoModel.FaserSCT_GeoModelConfig import FaserSCT_GeometryCfg def TrackerDDSiElementPropertiesTableCondAlgCfg(flags, **kwargs): acc = ComponentAccumulator() @@ -17,7 +17,7 @@ def TrackerDDSiElementPropertiesTableCondAlgCfg(flags, **kwargs): def TrackerSpacePointMakerCommonCfg(flags, name="TrackerSpacePointMakerTool", **kwargs): """Return ComponentAccumulator with common FaserSCT Clusterization tool config""" - acc = SctGeometryCfg(flags) + acc = FaserSCT_GeometryCfg(flags) kwargs.setdefault("InputObjectName", "SCT_ClusterContainer") trackerSpacePointMakerTool = Tracker__TrackerSpacePointMakerTool(name) diff --git a/Tracker/TrackerRecAlgs/TruthSeededTrackFinder/python/TruthSeededTrackFinderConfig.py b/Tracker/TrackerRecAlgs/TruthSeededTrackFinder/python/TruthSeededTrackFinderConfig.py index 25ea502023aa075b792f5962280a60ca161a8e86..a94a2800473d128ac27e115fa8117678269528c2 100644 --- a/Tracker/TrackerRecAlgs/TruthSeededTrackFinder/python/TruthSeededTrackFinderConfig.py +++ b/Tracker/TrackerRecAlgs/TruthSeededTrackFinder/python/TruthSeededTrackFinderConfig.py @@ -4,16 +4,15 @@ Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration """ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory - Tracker__TruthSeededTrackFinder, THistSvc=CompFactory.getComps("Tracker::TruthSeededTrackFinder", "THistSvc") - +from FaserSCT_GeoModel.FaserSCT_GeoModelConfig import FaserSCT_GeometryCfg from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg def TruthSeededTrackFinderBasicCfg(flags, **kwargs): """Return ComponentAccumulator for TruthSeededTrackFinder""" - acc = ComponentAccumulator() + acc = FaserSCT_GeometryCfg(flags) kwargs.setdefault("SpacePointsSCTName", "SCT_SpacePointContainer") kwargs.setdefault("FaserSpacePointsSeedsName", "Seeds_SpacePointContainer") acc.addEventAlgo(Tracker__TruthSeededTrackFinder(**kwargs)) diff --git a/Tracking/Acts/FaserActsGeometry/python/FaserActsExtrapolationConfig.py b/Tracking/Acts/FaserActsGeometry/python/FaserActsExtrapolationConfig.py index ee53a9aac0530e4359fac3cc327be4ac683fb8af..574f7f82273d076fd6b236488d9a443a17890b68 100644 --- a/Tracking/Acts/FaserActsGeometry/python/FaserActsExtrapolationConfig.py +++ b/Tracking/Acts/FaserActsGeometry/python/FaserActsExtrapolationConfig.py @@ -4,7 +4,7 @@ Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory from FaserGeoModel.FaserGeoModelConfig import FaserGeometryCfg -from FaserGeoModel.SCTGMConfig import SctGeometryCfg +from FaserSCT_GeoModel.FaserSCT_GeoModelConfig import FaserSCT_GeometryCfg from MagFieldServices.MagFieldServicesConfig import MagneticFieldSvcCfg @@ -46,7 +46,7 @@ def FaserActsExtrapolationAlg_OutputCfg(flags): def FaserActsExtrapolationAlgCfg(flags, **kwargs): # Initialize GeoModel #acc = FaserGeometryCfg(flags) - acc = SctGeometryCfg(flags) + acc = FaserSCT_GeometryCfg(flags) # Initialize field service acc.merge(MagneticFieldSvcCfg(flags)) diff --git a/Tracking/Acts/FaserActsGeometry/python/FaserActsMaterialMapping_jobOptions.py b/Tracking/Acts/FaserActsGeometry/python/FaserActsMaterialMapping_jobOptions.py index 63f3a60283daceb5133497d58a04067836837830..40e7eb6922fd60597c2f42d4d73ce9555dce2ae6 100644 --- a/Tracking/Acts/FaserActsGeometry/python/FaserActsMaterialMapping_jobOptions.py +++ b/Tracking/Acts/FaserActsGeometry/python/FaserActsMaterialMapping_jobOptions.py @@ -62,15 +62,6 @@ if "__main__" == __name__: ConfigFlags.Beam.Type = "collisions" ConfigFlags.GeoModel.FaserVersion = "FASER-01" ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX" -# ConfigFlags.Detector.SimulateBpipe = False -# ConfigFlags.Detector.SimulateID = False -# ConfigFlags.Detector.GeometryBpipe = True -# ConfigFlags.Detector.GeometryID = True -# ConfigFlags.Detector.GeometryPixel = True -# ConfigFlags.Detector.GeometrySCT = True -# ConfigFlags.Detector.GeometryCalo = True -# ConfigFlags.Detector.GeometryMuon = False -# ConfigFlags.Detector.GeometryTRT = True ConfigFlags.TrackingGeometry.MaterialSource = "geometry-maps.json" ConfigFlags.Concurrency.NumThreads = 1 ConfigFlags.Concurrency.NumConcurrentEvents = 1 diff --git a/Tracking/Acts/FaserActsGeometry/python/FaserActsWriteTrackingGeometryConfig.py b/Tracking/Acts/FaserActsGeometry/python/FaserActsWriteTrackingGeometryConfig.py index d4453a69f079186dc0181bdbe519b9932a4f9890..2aef1dac095cf13d8b44ddbdf490d186be67c45b 100644 --- a/Tracking/Acts/FaserActsGeometry/python/FaserActsWriteTrackingGeometryConfig.py +++ b/Tracking/Acts/FaserActsGeometry/python/FaserActsWriteTrackingGeometryConfig.py @@ -4,7 +4,7 @@ Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory #from FaserGeoModel.FaserGeoModelConfig import FaserGeometryCfg -from FaserGeoModel.SCTGMConfig import SctGeometryCfg +from FaserSCT_GeoModel.FaserSCT_GeoModelConfig import FaserSCT_GeometryCfg FaserActsWriteTrackingGeometry,FaserActsTrackingGeometrySvc,FaserActsTrackingGeometryTool,FaserActsObjWriterTool,FaserActsAlignmentCondAlg = CompFactory.getComps("FaserActsWriteTrackingGeometry","FaserActsTrackingGeometrySvc","FaserActsTrackingGeometryTool","FaserActsObjWriterTool","FaserActsAlignmentCondAlg") @@ -37,7 +37,7 @@ def FaserActsWriteTrackingGeometry_OutputCfg(flags): def FaserActsWriteTrackingGeometryCfg(flags, **kwargs): #acc = FaserGeometryCfg(flags) - acc = SctGeometryCfg(flags) + acc = FaserSCT_GeometryCfg(flags) acc.merge(FaserActsTrackingGeometrySvcCfg(flags, **kwargs)) #acc.merge(FaserActsAlignmentCondAlgCfg(flags)) acc.merge(FaserActsWriteTrackingGeometryBasicCfg(flags, **kwargs)) diff --git a/Tracking/Acts/FaserActsGeometry/test/FaserActsExtrapolationAlg.py b/Tracking/Acts/FaserActsGeometry/test/FaserActsExtrapolationAlg.py index 41a481b690f8a49c7b44befcbd091eb467ae4047..71be0017e3473e5ba7778b1a1a2c243bf50552ad 100644 --- a/Tracking/Acts/FaserActsGeometry/test/FaserActsExtrapolationAlg.py +++ b/Tracking/Acts/FaserActsGeometry/test/FaserActsExtrapolationAlg.py @@ -26,7 +26,7 @@ ConfigFlags.GeoModel.FaserVersion = "FASER-01" # Always needed ConfigFlags.addFlag("Input.InitialTimeStamp", 0) # Workaround to avoid problematic ISF code ConfigFlags.GeoModel.Layout = "Development" -ConfigFlags.Detector.SimulateFaserSCT = True +ConfigFlags.Detector.GeometryFaserSCT = True #ConfigFlags.GeoModel.AtlasVersion = "ATLAS-R2-2016-01-00-01" # Always needed to fool autoconfig; value ignored ConfigFlags.GeoModel.Align.Dynamic = False #ConfigFlags.Concurrency.NumThreads = 1 diff --git a/Tracking/Acts/FaserActsGeometry/test/FaserActsWriteTrackingGeometry.py b/Tracking/Acts/FaserActsGeometry/test/FaserActsWriteTrackingGeometry.py index f2bc11f57f8e8a118e933ebdd9c3641fe61cfa49..1124fd8f2695ae9a388676e9ce5bb688c2462cf5 100644 --- a/Tracking/Acts/FaserActsGeometry/test/FaserActsWriteTrackingGeometry.py +++ b/Tracking/Acts/FaserActsGeometry/test/FaserActsWriteTrackingGeometry.py @@ -25,7 +25,7 @@ ConfigFlags.GeoModel.FaserVersion = "FASER-01" # Always needed ConfigFlags.addFlag("Input.InitialTimeStamp", 0) # Workaround to avoid problematic ISF code ConfigFlags.GeoModel.Layout = "Development" -ConfigFlags.Detector.SimulateFaserSCT = True +ConfigFlags.Detector.GeometryFaserSCT = True ConfigFlags.GeoModel.AtlasVersion = "ATLAS-R2-2016-01-00-01" # Always needed to fool autoconfig; value ignored ConfigFlags.GeoModel.Align.Dynamic = False #ConfigFlags.Concurrency.NumThreads = 1 diff --git a/version.txt b/version.txt index 6c5fa89eac24b43b94c16331a49837b435ce09c9..4d15ca0406c60c5d409bc33ab5858a0090feb7d2 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -22.0.29 +22.0.30