ATLAS Offline Software
Loading...
Searching...
No Matches
L0MuonNSWConfig.py
Go to the documentation of this file.
1#Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2from AthenaConfiguration.ComponentFactory import CompFactory
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4from AthenaCommon.Logging import logging
5
6_log = logging.getLogger(__name__)
7
8def L0MuonNSWSimCfg(flags, name = "L0Muon.NSWSimulation", **kwargs):
9
10 result = ComponentAccumulator()
11
12 alg = CompFactory.L0Muon.NSWSimulation(name = name, **kwargs)
13
14 from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool
15 monTool = GenericMonitoringTool(flags, 'MonTool')
16 monTool.defineHistogram('nNSWDigits', path='EXPERT', type='TH1F', title=';n_{Digit}^{NSW};Events', xbins=50, xmin=0, xmax=100)
17
18 alg.MonTool = monTool
19
20 result.addEventAlgo(alg, primary=True)
21 return result
22
23
24if __name__ == "__main__":
25
26 from MuonGeoModelTestR4.testGeoModel import setupGeoR4TestCfg, SetupArgParser, MuonPhaseIITestDefaults
27 from MuonConfig.MuonConfigUtils import setupHistSvcCfg, executeTest
28
29 parser = SetupArgParser()
30 parser.set_defaults(inputFile= MuonPhaseIITestDefaults.RDO_R3)
31 parser.set_defaults(nEvents = 20)
32 args = parser.parse_args()
33
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 acc.merge(setupHistSvcCfg(flags, outFile="L0MuonNSW_Expert.root", outStream="EXPERT"))
42
43 from MuonConfig.MuonByteStreamCnvTestConfig import STGC_RdoToDigitCfg, MM_RdoToDigitCfg
44 if flags.Detector.GeometrysTGC:
45 acc.merge(STGC_RdoToDigitCfg(flags, sTgcRdoContainer="sTGCRDO", sTgcDigitContainer="sTGC_DIGITS"))
46
47 if flags.Detector.GeometryMM:
48 acc.merge(MM_RdoToDigitCfg(flags, MmRdoContainer="MMRDO", MmDigitContainer="MM_DIGITS"))
49
50 acc.merge(L0MuonNSWSimCfg(flags, OutputLevel = DEBUG))
51
52 executeTest(acc)
L0MuonNSWSimCfg(flags, name="L0Muon.NSWSimulation", **kwargs)