3 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory
import CompFactory
6 def MuonHitTesterCfg(flags, name="MuonHitTester", outFile="SimHitTest.root", **kwargs):
8 from MuonGeoModelTestR4.testGeoModel
import setupHistSvcCfg
9 result.merge(
setupHistSvcCfg(flags,outFile=outFile, outStream=
"MuonR4HitTest"))
10 from ActsAlignmentAlgs.AlignmentAlgsConfig
import ActsGeometryContextAlgCfg
12 kwargs.setdefault(
"isMC", flags.Input.isMC)
15 kwargs.setdefault(
"dumpPrds",
False)
16 kwargs.setdefault(
"dumpDigits",
False)
17 kwargs.setdefault(
"dumpSimHits",
True)
22 kwargs.setdefault(
"dumpMdtSimHits", flags.Detector.GeometryMDT)
23 kwargs.setdefault(
"dumpRpcSimHits", flags.Detector.GeometryRPC)
24 kwargs.setdefault(
"dumpTgcSimHits", flags.Detector.GeometryTGC)
25 kwargs.setdefault(
"dumpStgcSimHits",flags.Detector.GeometrysTGC)
26 kwargs.setdefault(
"dumpMmSimHits", flags.Detector.GeometryMM)
29 kwargs.setdefault(
"dumpMdtDigits", flags.Detector.GeometryMDT)
30 kwargs.setdefault(
"dumpRpcDigits", flags.Detector.GeometryRPC)
31 kwargs.setdefault(
"dumpTgcDigits", flags.Detector.GeometryTGC)
32 kwargs.setdefault(
"dumpStgcDigits",flags.Detector.GeometrysTGC)
33 kwargs.setdefault(
"dumpMmDigits", flags.Detector.GeometryMM)
35 kwargs.setdefault(
"dumpMdtPrds", flags.Detector.GeometryMDT)
36 kwargs.setdefault(
"dumpRpcPrds", flags.Detector.GeometryRPC)
37 kwargs.setdefault(
"dumpTgcPrds", flags.Detector.GeometryTGC)
38 kwargs.setdefault(
"dumpMmPrds", flags.Detector.GeometryMM)
40 theAlg = CompFactory.MuonValR4.MuonHitTesterAlg(name, **kwargs)
41 result.addEventAlgo(theAlg, primary =
True)
45 def MuonDigiTestCfg(flags, name="MuonDigiTester", outFile="DigiTest.root", **kwargs):
46 kwargs.setdefault(
"MdtSimHitKey",
"MDT_SDO")
47 kwargs.setdefault(
"RpcSimHitKey",
"RPC_SDO")
48 kwargs.setdefault(
"TgcSimHitKey",
"TGC_SDO")
49 kwargs.setdefault(
"MmSimHitKey",
"MM_SDO")
50 kwargs.setdefault(
"sTgcSimHitKey",
"sTGC_SDO")
51 kwargs.setdefault(
"dumpDigits",
True)
55 kwargs.setdefault(
"MdtSimHitKey",
"Bkg_MDT_SDO")
56 kwargs.setdefault(
"RpcSimHitKey",
"Bkg_RPC_SDO")
57 kwargs.setdefault(
"TgcSimHitKey",
"Bkg_TGC_SDO")
58 kwargs.setdefault(
"MmSimHitKey",
"Bkg_MM_SDO")
59 kwargs.setdefault(
"sTgcSimHitKey",
"Bkg_sTGC_SDO")
60 kwargs.setdefault(
"EvtInfoKey",
"Bkg_EventInfo")
61 kwargs.setdefault(
"dumpDigits",
True)
65 if __name__==
"__main__":
66 from MuonGeoModelTestR4.testGeoModel
import setupGeoR4TestCfg, SetupArgParser, executeTest
68 parser.add_argument(
"--runTester", help=
"Choice on the tester to setup", default=
"SIM", choices=[
"SIM",
"DIGI",
"PILEUP"])
69 parser.set_defaults(nEvents = -1)
70 parser.set_defaults(inputFile=[
"/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MuonRecRTT/R3SimHits.pool.root"])
71 parser.set_defaults(outRootFile=
"SimHitDumpNtuple.root")
72 parser.set_defaults(eventPrintoutLevel = 500)
74 args = parser.parse_args()
77 from MuonConfig.MuonDataPrepConfig
import xAODUncalibMeasPrepCfg
80 if args.runTester !=
"SIM":
81 if flags.Detector.GeometryMDT:
82 from MuonConfig.MuonByteStreamCnvTestConfig
import MdtRdoToMdtDigitCfg
84 if flags.Detector.GeometryRPC:
85 from MuonConfig.MuonByteStreamCnvTestConfig
import RpcRdoToRpcDigitCfg
87 if flags.Detector.GeometryTGC:
88 from MuonConfig.MuonByteStreamCnvTestConfig
import TgcRdoToTgcDigitCfg
90 if flags.Detector.GeometrysTGC:
91 from MuonConfig.MuonByteStreamCnvTestConfig
import STGC_RdoToDigitCfg
93 if flags.Detector.GeometryMM:
94 from MuonConfig.MuonByteStreamCnvTestConfig
import MM_RdoToDigitCfg
97 if args.runTester ==
"SIM":
99 elif args.runTester ==
"DIGI":
101 elif args.runTester ==
"PILEUP":