ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_ModuleVetoTestAlgConfig.py
Go to the documentation of this file.
1"""Define method to configure and test ITkStrip_ModuleVetoTestAlg
2
3Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
4"""
5from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
6from AthenaConfiguration.ComponentFactory import CompFactory
7
8def ITkStripVetoTestAlgCfg(flags, name="ITkStripModuleVetoTestAlg", **kwargs):
9 """Return a configured ITkStripModuleVetoTestAlg"""
10 acc = ComponentAccumulator()
11 from SCT_ConditionsTools.SCT_ConditionsToolsConfig import SCT_ModuleVetoCfg
12 acc.addEventAlgo(CompFactory.SCT_ModuleVetoTestAlg(name,
13 ModuleVetoTool=acc.popToolsAndMerge(SCT_ModuleVetoCfg(flags, **kwargs))))
14 return acc
15
16if __name__=="__main__":
17 from AthenaCommon.Logging import log
18 from AthenaCommon.Constants import INFO
19 log.setLevel(INFO)
20
21 from AthenaConfiguration.AllConfigFlags import initConfigFlags
22 flags = initConfigFlags()
23 flags.Input.Files = []
24 flags.Input.isMC = True
25 flags.Input.ProjectName = "mc16_13TeV"
26 flags.Input.RunNumbers = [350200] # MC23 PhaseII mu=200 run number
27 flags.Input.TimeStamps = [1625130000] # MC23 PhaseII mu=200 time stamp
28 flags.IOVDb.GlobalTag = "OFLP200"
29 from AthenaConfiguration.TestDefaults import defaultGeometryTags
30 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN4
31 flags.Detector.GeometryITkStrip = True
32 flags.lock()
33
34 from AthenaConfiguration.MainServicesConfig import MainServicesCfg
35 cfg = MainServicesCfg(flags)
36
37 from McEventSelector.McEventSelectorConfig import McEventSelectorCfg
38 cfg.merge(McEventSelectorCfg(flags))
39
40 kwargs = {}
41
42
43 kwargs["useDB"] = False
44 if kwargs["useDB"]:
45 kwargs["folderStrings"] = "/ITk/Manual/BadModules"
46 kwargs["BadModuleIdentifiers"] = ["database"]
47 else:
48 kwargs["BadModuleIdentifiers"] = ["1", "2"]
49
50 cfg.merge(ITkStripVetoTestAlgCfg(flags, **kwargs))
51
52 cfg.run(maxEvents=20)
ITkStripVetoTestAlgCfg(flags, name="ITkStripModuleVetoTestAlg", **kwargs)