ATLAS Offline Software
L0MuonS1TGCConfig.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 
6 def L0MuonTGCSimCfg(flags, name = "L0Muon.TGCSimulation", **kwargs):
7 
8  result = ComponentAccumulator()
9 
10  alg = CompFactory.L0Muon.TGCSimulation(name = name, **kwargs)
11 
12  from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool
13  monTool = GenericMonitoringTool(flags, 'MonTool')
14  monTool.defineHistogram('nTgcDigits', path='EXPERT', type='TH1F', title=';n_{Digit}^{TGC};Events', xbins=50, xmin=0, xmax=100)
15 
16  alg.MonTool = monTool
17 
18  histSvc = CompFactory.THistSvc(Output=["EXPERT DATAFILE='" + name + ".root' OPT='RECREATE'"])
19 
20  result.addEventAlgo(alg)
21  result.addService(histSvc)
22  return result
23 
24 
25 if __name__ == "__main__":
26 
27  from MuonGeoModelTestR4.testGeoModel import setupGeoR4TestCfg, SetupArgParser, executeTest
28  parser = SetupArgParser()
29  parser.set_defaults(inputFile= ["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MuonGeomRTT/myRDO.R3.pool.root"])
30  parser.set_defaults(nEvents = 20)
31 
32  args = parser.parse_args()
33  from AthenaConfiguration.AllConfigFlags import initConfigFlags
34  flags = initConfigFlags()
35  flags.Common.MsgSuppression = False
36 
37  flags, acc = setupGeoR4TestCfg(args, flags)
38  from AthenaCommon.Constants import DEBUG
39 
40  from MuonConfig.MuonByteStreamCnvTestConfig import TgcRdoToTgcDigitCfg
41  acc.merge(TgcRdoToTgcDigitCfg(flags, TgcDigitContainer = "TGC_DIGITS", TgcRdoContainer = 'TGCRDO'))
42 
43 
44  # example simulation alg
45  acc.merge(L0MuonTGCSimCfg(flags, OutputLevel = DEBUG))
46 
47 
48  executeTest(acc)
49 
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
GenericMonitoringTool
Definition: GenericMonitoringTool.h:53
MuonByteStreamCnvTestConfig.TgcRdoToTgcDigitCfg
def TgcRdoToTgcDigitCfg(flags, name="TgcRdoToTgcDigitAlg", **kwargs)
Definition: MuonByteStreamCnvTestConfig.py:91
testGeoModel.executeTest
def executeTest(cfg)
Definition: MuonPhaseII/MuonDetDescr/MuonGeoModelTestR4/python/testGeoModel.py:227
MdtCablingTester.SetupArgParser
def SetupArgParser()
Definition: MdtCablingTester.py:3
testGeoModel.setupGeoR4TestCfg
def setupGeoR4TestCfg(args, flags=None)
Definition: MuonPhaseII/MuonDetDescr/MuonGeoModelTestR4/python/testGeoModel.py:126
Constants
some useful constants -------------------------------------------------—
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
L0MuonS1TGCConfig.L0MuonTGCSimCfg
def L0MuonTGCSimCfg(flags, name="L0Muon.TGCSimulation", **kwargs)
Definition: L0MuonS1TGCConfig.py:6