Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
L0MuonMDTConfig.py
Go to the documentation of this file.
1 #Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2 from AthenaConfiguration.ComponentFactory import CompFactory
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 
5 from AthenaCommon.Logging import logging
6 _log = logging.getLogger(__name__)
7 
8 def L0MuonMDTSimCfg(flags, name = "L0MuonMDTSim", **kwargs):
9 
10  result = ComponentAccumulator()
11 
12  alg = CompFactory.L0Muon.MDTSimulation(name = name, **kwargs)
13 
14  from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool
15  monTool = GenericMonitoringTool(flags, 'MonTool')
16  monTool.HistPath = 'L0MuonMDTSim'
17  monTool.defineHistogram('track_input_eta', path='EXPERT', type='TH1F', title=';#eta_{#mu}^{truth};Muons', xbins=50, xmin=-3, xmax=3)
18 
19  alg.MonTool = monTool
20 
21  histSvc = CompFactory.THistSvc(Output=["EXPERT DATAFILE='" + name + ".root' OPT='RECREATE'"])
22 
23  result.addEventAlgo(alg)
24  result.addService(histSvc)
25  return result
26 
27 
28 if __name__ == "__main__":
29  from MuonGeoModelTestR4.testGeoModel import setupGeoR4TestCfg, SetupArgParser, executeTest
30  parser = SetupArgParser()
31  parser.set_defaults(inputFile= ["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MuonGeomRTT/myRDO.R3.pool.root"])
32  parser.set_defaults(nEvents = 20)
33  args = parser.parse_args()
34  from AthenaConfiguration.AllConfigFlags import initConfigFlags
35  flags = initConfigFlags()
36  flags.Common.MsgSuppression = False
37 
38  flags, acc = setupGeoR4TestCfg(args, flags)
39  from AthenaCommon.Constants import DEBUG
40 
41  from MuonConfig.MuonByteStreamCnvTestConfig import MdtRdoToMdtDigitCfg
42  acc.merge(MdtRdoToMdtDigitCfg(flags))
43  # example simulation alg
44  acc.merge(L0MuonMDTSimCfg(flags,
45  name = "L0MuonMDTSim",
46  OutputLevel = DEBUG))
47 
48  executeTest(acc)
49 
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.MuonByteStreamCnvTestConfig.MdtRdoToMdtDigitCfg
def MdtRdoToMdtDigitCfg(flags, name="MdtRdoToMdtDigitAlg", **kwargs)
Definition: MuonByteStreamCnvTestConfig.py:20
python.MdtCablingTester.SetupArgParser
def SetupArgParser()
Definition: MdtCablingTester.py:3
GenericMonitoringTool
Definition: GenericMonitoringTool.h:53
python.testGeoModel.executeTest
def executeTest(cfg)
Definition: MuonPhaseII/MuonDetDescr/MuonGeoModelTestR4/python/testGeoModel.py:224
python.testGeoModel.setupGeoR4TestCfg
def setupGeoR4TestCfg(args, flags=None)
Definition: MuonPhaseII/MuonDetDescr/MuonGeoModelTestR4/python/testGeoModel.py:122
Constants
some useful constants -------------------------------------------------—
L0MuonMDTConfig.L0MuonMDTSimCfg
def L0MuonMDTSimCfg(flags, name="L0MuonMDTSim", **kwargs)
Definition: L0MuonMDTConfig.py:8
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19