ATLAS Offline Software
Loading...
Searching...
No Matches
L0MuonS1TGCConfig.py
Go to the documentation of this file.
1#Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2from AthenaConfiguration.ComponentFactory import CompFactory
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4
5
6def 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
25if __name__ == "__main__":
26
27 from MuonGeoModelTestR4.testGeoModel import setupGeoR4TestCfg, SetupArgParser, executeTest, MuonPhaseIITestDefaults
28 parser = SetupArgParser()
29 parser.set_defaults(inputFile= MuonPhaseIITestDefaults.RDO_ZMUMU_R3)
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
L0MuonTGCSimCfg(flags, name="L0Muon.TGCSimulation", **kwargs)