ATLAS Offline Software
PlotNSWGeo.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 from AthenaConfiguration.ComponentFactory import CompFactory
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 
5 def NSWGeoPlottingAlgCfg(flags, name = "NSWGeoPlottingAlg", **kwargs):
6  result = ComponentAccumulator()
7  event_algo = CompFactory.NSWGeoPlottingAlg(name, **kwargs)
8  result.addEventAlgo(event_algo, primary = True)
9  return result
10 
11 def sTgcPadPlottingAlg(flags, name = "sTgcPadPlottingAlg", **kwargs):
12  result = ComponentAccumulator()
13  event_algo = CompFactory.sTgcPadPlottingAlg(name, **kwargs)
14  result.addEventAlgo(event_algo, primary = True)
15  return result
16 
17 
18 if __name__ == "__main__":
19  from AthenaConfiguration.AllConfigFlags import initConfigFlags
20  from MuonCondTest.MdtCablingTester import SetupArgParser
21  parser = SetupArgParser()
22  parser.set_defaults(inputFile=["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MuonRecRTT/EVGEN_ParticleGun_FourMuon_Pt10to500.root"])
23  args = parser.parse_args()
24 
25  flags = initConfigFlags()
26  flags.Concurrency.NumThreads = args.threads
27  flags.Concurrency.NumConcurrentEvents = args.threads # Might change this later, but good enough for the moment.
28  flags.Output.ESDFileName = args.output
29  flags.Input.Files = args.inputFile
30  flags.Muon.applyMMPassivation = True
31  from AthenaConfiguration.TestDefaults import defaultConditionsTags, defaultGeometryTags
32  flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN3
33  flags.IOVDb.GlobalTag = defaultConditionsTags.RUN3_MC
34  flags.lock()
35 
36  from MuonCondTest.MdtCablingTester import setupServicesCfg
37  cfg = setupServicesCfg(flags)
38 
39  #cfg.merge(NSWGeoPlottingAlgCfg(flags))
40  cfg.merge(sTgcPadPlottingAlg(flags))
41 
42  msgService = cfg.getService('MessageSvc')
43  msgService.Format = "S:%s E:%e % F%128W%S%7W%R%T %0W%M"
44 
45  cfg.printConfig(withDetails=True, summariseProps=True)
46 
47  flags.dump()
48 
49  sc = cfg.run(1)
50  if not sc.isSuccess():
51  import sys
52  sys.exit("Execution failed")
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.MdtCablingTester.setupServicesCfg
def setupServicesCfg(flags)
Definition: MdtCablingTester.py:17
PlotNSWGeo.sTgcPadPlottingAlg
def sTgcPadPlottingAlg(flags, name="sTgcPadPlottingAlg", **kwargs)
Definition: PlotNSWGeo.py:11
python.MdtCablingTester.SetupArgParser
def SetupArgParser()
Definition: MdtCablingTester.py:3
sTgcPadPlottingAlg
Simple algorithm to plot the sTGC pad positions.
Definition: sTgcPadPlottingAlg.h:20
PlotNSWGeo.NSWGeoPlottingAlgCfg
def NSWGeoPlottingAlgCfg(flags, name="NSWGeoPlottingAlg", **kwargs)
Definition: PlotNSWGeo.py:5
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19