ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_RODVetoTestAlgConfig.py
Go to the documentation of this file.
1"""Define method to configure and test SCT_RODVetoTestAlg
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 SCT_RODVetoTestAlgCfg(flags, name="SCT_RODVetoTestAlg", **kwargs):
9 """Return a configured SCT_RODVetoTestAlg"""
10 acc = ComponentAccumulator()
11 from SCT_ConditionsTools.SCT_ConditionsToolsConfig import SCT_RODVetoCfg
12 algArgs = {}
13 algArgs["SCT_RODVetoTool"] = acc.popToolsAndMerge(SCT_RODVetoCfg(flags, **kwargs))
14 acc.addEventAlgo(CompFactory.SCT_RODVetoTestAlg(name, **algArgs))
15 return acc
16
17if __name__=="__main__":
18 from AthenaCommon.Logging import log
19 from AthenaCommon.Constants import INFO
20 log.setLevel(INFO)
21
22 from AthenaConfiguration.AllConfigFlags import initConfigFlags
23 flags = initConfigFlags()
24 flags.Input.Files = []
25 flags.Input.isMC = True
26 flags.Input.ProjectName = "mc16_13TeV"
27 flags.Input.RunNumbers = [300000] # MC16c 2017 run number
28 flags.Input.TimeStamps = [1500000000]
29 flags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-18"
30 from AthenaConfiguration.TestDefaults import defaultGeometryTags
31 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
32 flags.Detector.GeometrySCT = True
33 flags.lock()
34
35 from AthenaConfiguration.MainServicesConfig import MainServicesCfg
36 cfg = MainServicesCfg(flags)
37
38 from McEventSelector.McEventSelectorConfig import McEventSelectorCfg
39 cfg.merge(McEventSelectorCfg(flags))
40
41 kwargs = {}
42 kwargs["BadRODIds"] = [0x240100, 0x240030] # RODs to be vetoed
43 cfg.merge(SCT_RODVetoTestAlgCfg(flags, **kwargs))
44
45 cfg.run(maxEvents=20)
SCT_RODVetoTestAlgCfg(flags, name="SCT_RODVetoTestAlg", **kwargs)