diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt index ea2bc8b58e8e04b3e89b4bff131503dc6f44d2df..b5a18f4d519c0788fefa92b100c8dc921bf2f877 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt @@ -93,6 +93,9 @@ atlas_add_test( TestDCSConditionsNewConf atlas_add_test( TestMonReadNewConf SCRIPT python -m SCT_ConditionsAlgorithms.SCT_MonitorConditionsTestAlgConfig PROPERTIES TIMEOUT 600 ) +atlas_add_test( TestStripVetoNewConf + SCRIPT python -m SCT_ConditionsAlgorithms.SCT_StripVetoTestAlgConfig + PROPERTIES TIMEOUT 600 ) atlas_add_test( TestSummaryNewConf SCRIPT python -m SCT_ConditionsAlgorithms.SCT_ConditionsSummaryTestAlgConfig PROPERTIES TIMEOUT 600 ) diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/python/SCT_StripVetoTestAlgConfig.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/python/SCT_StripVetoTestAlgConfig.py new file mode 100644 index 0000000000000000000000000000000000000000..56ff2c2cc52b6f2d77739f5c580012727f9937fd --- /dev/null +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/python/SCT_StripVetoTestAlgConfig.py @@ -0,0 +1,42 @@ +"""Define method to configure and test SCT_StripVetoTestAlg + +Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +""" +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +from AthenaConfiguration.ComponentFactory import CompFactory + +def SCT_StripVetoTestAlgCfg(flags, name="SCT_StripVetoTestAlg", **kwargs): + """Return a configured SCT_SiliconConditionsTestAlg""" + acc = ComponentAccumulator() + from SCT_ConditionsTools.SCT_StripVetoConfig import SCT_StripVetoCfg + kwargs.setdefault("StripVetoTool", acc.popToolsAndMerge(SCT_StripVetoCfg(flags))) + acc.addEventAlgo(CompFactory.SCT_StripVetoTestAlg(name=name, **kwargs)) + return acc + +if __name__=="__main__": + from AthenaCommon.Logging import log + from AthenaCommon.Constants import INFO + log.setLevel(INFO) + + from AthenaCommon.Configurable import Configurable + Configurable.configurableRun3Behavior=1 + + from AthenaConfiguration.AllConfigFlags import ConfigFlags + ConfigFlags.Input.isMC = True + ConfigFlags.Input.ProjectName = "mc16_13TeV" + ConfigFlags.Input.RunNumber = 300000 # MC16c 2017 run number + ConfigFlags.addFlag("Input.InitialTimeStamp", 1500000000) # MC16c 2017 time stamp + ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-18" + ConfigFlags.GeoModel.AtlasVersion = "ATLAS-R2-2015-03-01-00" + ConfigFlags.Detector.GeometrySCT = True + ConfigFlags.lock() + + from AthenaConfiguration.MainServicesConfig import MainServicesCfg + cfg = MainServicesCfg(ConfigFlags) + + from McEventSelector.McEventSelectorConfig import McEventSelectorCfg + cfg.merge(McEventSelectorCfg(ConfigFlags)) + + cfg.merge(SCT_StripVetoTestAlgCfg(ConfigFlags)) + + cfg.run(maxEvents=20) diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_StripVetoConfig.py b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_StripVetoConfig.py new file mode 100644 index 0000000000000000000000000000000000000000..3bfbd151ac6f14c4bea30c1b34e966f3f8a91b9c --- /dev/null +++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_StripVetoConfig.py @@ -0,0 +1,29 @@ +"""Define methods to configure SCT_StripVetoTool + +Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +""" +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +from AthenaConfiguration.ComponentFactory import CompFactory +from AtlasGeoModel.GeoModelConfig import GeoModelCfg + +def SCT_StripVetoCfg(flags, name="SCT_StripVeto", **kwargs): + """Return a ComponentAccumulator configured for SCT_StripVetoTool + """ + acc = ComponentAccumulator() + + # For SCT_ID used in SCT_StripVetoTool + acc.merge(GeoModelCfg(flags)) + + # Condition tool + # Identifiers should be given as strings and decimal. + # Identifier::compact() method returns unsigned long long. + kwargs.setdefault("BadStripIdentifiers", ["576522359582752768", + "576522475009998848", + "576522475278434304", + # "576522475546869760", + # "576522475815305216", + # "576522476083740672", + ]) + acc.setPrivateTools(CompFactory.SCT_StripVetoTool(name=name+"Tool", **kwargs)) + + return acc