ATLAS Offline Software
Loading...
Searching...
No Matches
MuonPhaseII/MuonDetDescr/MuonGeoModelTestR4/python/testGeoModel.py
Go to the documentation of this file.
1# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
3from AthenaConfiguration.ComponentFactory import CompFactory
4
5
6
8
9 EVGEN_PG = ["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MuonRecRTT/EVGEN_ParticleGun_FourMuon_Pt10to500.root"]
10
11 HITS_PG_R3 = ["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MuonGeomRTT/R3SimHits.pool.root"]
12
13 HITS_PG_R4 = ["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MuonGeomRTT/R4SimHits.pool.root"]
14
15 HITS_PG_R3_MSOnly = []
16
17 HITS_PG_R4_MSOnly = []
18
19
20 DATA_BS = [f"root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/data-art/large-input/MuonRecRTT/{fileName}" for fileName in [
21 "data26_13p6TeV.00519268.physics_Main.daq.RAW._lb0178._SFO-11._0001.data",
22 "data26_13p6TeV.00519268.physics_Main.daq.RAW._lb0178._SFO-11._0002.data",
23 "data26_13p6TeV.00519268.physics_Main.daq.RAW._lb0178._SFO-12._0001.data",
24 "data26_13p6TeV.00519268.physics_Main.daq.RAW._lb0178._SFO-12._0002.data",
25 "data26_13p6TeV.00519268.physics_Main.daq.RAW._lb0178._SFO-20._0001.data",
26 "data26_13p6TeV.00519268.physics_Main.daq.RAW._lb0178._SFO-20._0002.data",
27 ]
28 ]
29
30 RDO_R3 = [
31 "root://eosatlas.cern.ch:1094//eos/atlas/atlaslocalgroupdisk/dq2/rucio/group/det-muon/9c/69/group.det-muon.48959424.EXT0._000002.RDO.pool.root",
32 "root://eosatlas.cern.ch:1094//eos/atlas/atlaslocalgroupdisk/dq2/rucio/group/det-muon/af/b4/group.det-muon.48959424.EXT0._000003.RDO.pool.root",
33 "root://eosatlas.cern.ch:1094//eos/atlas/atlaslocalgroupdisk/dq2/rucio/group/det-muon/d8/a1/group.det-muon.48959424.EXT0._000004.RDO.pool.root",
34 "root://eosatlas.cern.ch:1094//eos/atlas/atlaslocalgroupdisk/dq2/rucio/group/det-muon/ea/62/group.det-muon.48959424.EXT0._000005.RDO.pool.root",
35 "root://eosatlas.cern.ch:1094//eos/atlas/atlaslocalgroupdisk/dq2/rucio/group/det-muon/53/6e/group.det-muon.48959424.EXT0._000006.RDO.pool.root",
36 "root://eosatlas.cern.ch:1094//eos/atlas/atlaslocalgroupdisk/dq2/rucio/group/det-muon/03/66/group.det-muon.48959424.EXT0._000007.RDO.pool.root",
37 "root://eosatlas.cern.ch:1094//eos/atlas/atlaslocalgroupdisk/dq2/rucio/group/det-muon/30/58/group.det-muon.48959424.EXT0._000008.RDO.pool.root",
38 "root://eosatlas.cern.ch:1094//eos/atlas/atlaslocalgroupdisk/dq2/rucio/group/det-muon/95/1e/group.det-muon.48959424.EXT0._000009.RDO.pool.root",
39 "root://eosatlas.cern.ch:1094//eos/atlas/atlaslocalgroupdisk/dq2/rucio/group/det-muon/e7/64/group.det-muon.48959424.EXT0._000010.RDO.pool.root",
40 "root://eosatlas.cern.ch:1094//eos/atlas/atlaslocalgroupdisk/dq2/rucio/group/det-muon/03/cc/group.det-muon.48959424.EXT0._000011.RDO.pool.root",
41 "root://eosatlas.cern.ch:1094//eos/atlas/atlaslocalgroupdisk/dq2/rucio/group/det-muon/49/61/group.det-muon.48959424.EXT0._000012.RDO.pool.root",
42 "root://eosatlas.cern.ch:1094//eos/atlas/atlaslocalgroupdisk/dq2/rucio/group/det-muon/74/ed/group.det-muon.48959424.EXT0._000013.RDO.pool.root",
43 ]
44
45 RDO_R4 = [
46 "root://eosatlas.cern.ch:1094//eos/atlas/atlaslocalgroupdisk/dq2/rucio/group/det-muon/8b/de/group.det-muon.48959425.EXT0._000002.RDO.pool.root",
47 "root://eosatlas.cern.ch:1094//eos/atlas/atlaslocalgroupdisk/dq2/rucio/group/det-muon/4f/ed/group.det-muon.48959425.EXT0._000007.RDO.pool.root",
48 "root://eosatlas.cern.ch:1094//eos/atlas/atlaslocalgroupdisk/dq2/rucio/group/det-muon/3d/10/group.det-muon.48959425.EXT0._000009.RDO.pool.root",
49 "root://eosatlas.cern.ch:1094//eos/atlas/atlaslocalgroupdisk/dq2/rucio/group/det-muon/28/62/group.det-muon.48959425.EXT0._000010.RDO.pool.root",
50 "root://eosatlas.cern.ch:1094//eos/atlas/atlaslocalgroupdisk/dq2/rucio/group/det-muon/5e/26/group.det-muon.48959425.EXT0._000011.RDO.pool.root",
51 "root://eosatlas.cern.ch:1094//eos/atlas/atlaslocalgroupdisk/dq2/rucio/group/det-muon/af/cd/group.det-muon.48959425.EXT0._000012.RDO.pool.root",
52 "root://eosatlas.cern.ch:1094//eos/atlas/atlaslocalgroupdisk/dq2/rucio/group/det-muon/88/76/group.det-muon.48959425.EXT0._000015.RDO.pool.root",
53 "root://eosatlas.cern.ch:1094//eos/atlas/atlaslocalgroupdisk/dq2/rucio/group/det-muon/54/fe/group.det-muon.48959425.EXT0._000016.RDO.pool.root",
54 "root://eosatlas.cern.ch:1094//eos/atlas/atlaslocalgroupdisk/dq2/rucio/group/det-muon/4e/b4/group.det-muon.48959425.EXT0._000017.RDO.pool.root",
55 "root://eosatlas.cern.ch:1094//eos/atlas/atlaslocalgroupdisk/dq2/rucio/group/det-muon/e3/d4/group.det-muon.48959425.EXT0._000022.RDO.pool.root",
56 "root://eosatlas.cern.ch:1094//eos/atlas/atlaslocalgroupdisk/dq2/rucio/group/det-muon/ee/b4/group.det-muon.48959425.EXT0._000023.RDO.pool.root",
57 "root://eosatlas.cern.ch:1094//eos/atlas/atlaslocalgroupdisk/dq2/rucio/group/det-muon/75/c9/group.det-muon.48959425.EXT0._000027.RDO.pool.root",
58 ]
59
62
63
64 GEODB_R3 = "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MuonGeomRTT/GeoDB/ATLAS-R3S-2021-03-02-00.db"
65
66 GEODB_R3MSOnly = "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MuonGeomRTT/GeoDB/ATLAS-R3S-2021-03-02-00_MSOnly.db"
67
69 GEODB_MTECH = "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MuonGeomRTT/GeoDB/ATLAS-R3S-2021-03-02-00_MTech.db"
70
71 GEODB_R4 = "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MuonGeomRTT/GeoDB/ATLAS-P2-RUN4-01-00-00.db"
72
73 GEODB_R4MSOnly = "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MuonGeomRTT/GeoDB/ATLAS-P2-RUN4-01-00-00_MSOnly.db"
74
75 GEODB_ITk_R3MS = "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MuonGeomRTT/GeoDB/ATLAS-P2-RUN4-01-00-00_R3MS.db"
76
77 GEODB_TOROID = "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MuonGeomRTT/GeoDB/MUON_TOROID.db"
78
79def SetupArgParser():
80 from argparse import ArgumentParser
81
82 parser = ArgumentParser()
83 parser.add_argument("--threads", type=int, help="number of threads", default=1)
84 parser.add_argument("--inputFile", "-i", default= MuonPhaseIITestDefaults.EVGEN_PG,
85 help="Input file to run on ", nargs="+")
86 parser.add_argument("--geoModelFile", default = MuonPhaseIITestDefaults.GEODB_R3, help="GeoModel SqLite file containing the muon geometry.")
87 parser.add_argument("--defaultGeoFile", help="Use the predefined GeoModel files on cvmfs", choices=["NONE", "RUN3", "RUN4",
88 "RUN3MSOnly", "RUN4MSOnly",
89 "ITkR3MS" ], default="NONE")
90 parser.add_argument("--chambers", default=["all"], nargs="+", help="Chambers to check. If string is all, all chambers will be checked")
91 parser.add_argument("--excludedChambers", default=[], nargs="+", help="Chambers to exclude. If string contains 'none', all chambers will be checked. Note: adding a chamber to --excludedChambers will overwrite it being in --chambers.")
92 parser.add_argument("--outRootFile", default="NewGeoModelDump.root", help="Output ROOT file to dump the geomerty")
93 parser.add_argument("--nEvents", help="Number of events to run", type = int ,default = 1)
94 parser.add_argument("--skipEvents", help="Number of events to skip", type = int, default = 0)
95 parser.add_argument("--noMdt", help="Disable the Mdts from the geometry", action='store_true', default = False)
96 parser.add_argument("--noRpc", help="Disable the Rpcs from the geometry", action='store_true', default = False)
97 parser.add_argument("--noTgc", help="Disable the Tgcs from the geometry", action='store_true', default = False)
98 parser.add_argument("--noMM", help="Disable the MMs from the geometry", action='store_true', default = False)
99 parser.add_argument("--noSTGC", help="Disable the sTgcs from the geometry", action='store_true', default = False)
100 parser.add_argument("--eventPrintoutLevel", type=int, help="Interval of event heartbeat printouts from the loop manager", default = 1)
101 parser.add_argument("--localMdtMezzJSON", default="", help="")
102 parser.add_argument("--localMdtCablingJSON", default="", help="")
103 parser.add_argument("--passiveMaterialMaps", default = "", help="Root file with the material maps on the surfaces")
104 parser.add_argument("--noPlots", help="Disable the pdf dumps of the geo tester", action='store_true', default = False)
105 return parser
106
108 from AthenaConfiguration.MainServicesConfig import MainServicesCfg
109 result = MainServicesCfg(flags)
110
111 from AthenaConfiguration.Enums import Format
112 if flags.Input.Format is Format.POOL:
113 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
114 result.merge(PoolReadCfg(flags))
115 elif flags.Input.Format == Format.BS:
116 from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
117 result.merge(ByteStreamReadCfg(flags))
118
119 from PerfMonComps.PerfMonCompsConfig import PerfMonMTSvcCfg
120 result.merge(PerfMonMTSvcCfg(flags))
121 from MuonConfig.MuonGeometryConfig import MuonIdHelperSvcCfg
122 result.merge(MuonIdHelperSvcCfg(flags))
123 return result
124
125def GeoModelMdtTestCfg(flags, name = "GeoModelMdtTest", localMezzanineJSON="", localCablingJSON="", doPlots=True,**kwargs):
126 result = ComponentAccumulator()
127 from MuonConfig.MuonCablingConfig import MDTCablingConfigCfg
128 result.merge(MDTCablingConfigCfg(flags,MezzanineJSON=localMezzanineJSON, CablingJSON=localCablingJSON))
129 if not doPlots:
130 kwargs["visualizeTubes"] = False
131 kwargs["visualizeStaggering"] = False
132 the_alg = CompFactory.MuonGMR4.GeoModelMdtTest(name, **kwargs)
133 result.addEventAlgo(the_alg, primary = True)
134 return result
135
136def GeoModelRpcTestCfg(flags, name = "GeoModelRpcTest", doPlots=True,**kwargs):
137 result = ComponentAccumulator()
138 if not doPlots:
139 kwargs["visualizePlanes"] = False
140 the_alg = CompFactory.MuonGMR4.GeoModelRpcTest(name, **kwargs)
141 result.addEventAlgo(the_alg, primary = True)
142 return result
143
144def GeoModelTgcTestCfg(flags, name = "GeoModelTgcTest", **kwargs):
145 result = ComponentAccumulator()
146 the_alg = CompFactory.MuonGMR4.GeoModelTgcTest(name, **kwargs)
147 result.addEventAlgo(the_alg, primary = True)
148 return result
149
150def GeoModelsTgcTestCfg(flags, name = "GeoModelsTgcTest", **kwargs):
151 result = ComponentAccumulator()
152 the_alg = CompFactory.MuonGMR4.GeoModelsTgcTest(name, **kwargs)
153 result.addEventAlgo(the_alg, primary = True)
154 return result
155
156def GeoModelMmTestCfg(flags, name = "GeoModelMmTest", **kwargs):
157 result = ComponentAccumulator()
158 the_alg = CompFactory.MuonGMR4.GeoModelMmTest(name, **kwargs)
159 result.addEventAlgo(the_alg, primary = True)
160 return result
161
162def NswGeoPlottingAlgCfg(flags, name="NswGeoPlotting", **kwargs):
163 result = ComponentAccumulator()
164 kwargs.setdefault("TestActsSurface", True)
165 kwargs.setdefault("plotTgc", flags.Detector.GeometryTGC)
166 kwargs.setdefault("plotStgc", flags.Detector.GeometrysTGC)
167 kwargs.setdefault("plotMm", flags.Detector.GeometryMM)
168
169 the_alg = CompFactory.MuonGMR4.NswGeoPlottingAlg(name, **kwargs)
170 result.addEventAlgo(the_alg, primary = True)
171 return result
172
174 from AthenaCommon.Logging import logging
175 log = logging.getLogger('GeometryConfiguration')
176
177 if not flags.GeoModel.SQLiteDB:
178 raise ValueError("Default tag configuration only works for SQLite")
179
180 from AthenaConfiguration.TestDefaults import defaultGeometryTags
181 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
182 from AthenaConfiguration.Enums import LHCPeriod
183 if flags.GeoModel.Run == LHCPeriod.Run3:
184 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN3
185 elif flags.GeoModel.Run == LHCPeriod.Run4:
186 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN4
187 else:
188 raise ValueError(f"Invalid run period {flags.GeoModel.Run}")
189 from MuonConfig.MuonConfigUtils import configureCondTag
190 configureCondTag(flags)
191
192 log.info(f"Setup {flags.GeoModel.AtlasVersion} geometry loading {flags.GeoModel.SQLiteDBFullPath}")
193 log.info(f"Use conditions tag {flags.IOVDb.GlobalTag}")
194
195
196def setupGeoR4TestCfg(args, flags = None):
197
198 if flags is None:
199 from AthenaConfiguration.AllConfigFlags import initConfigFlags
200 flags = initConfigFlags()
201 flags.Concurrency.NumThreads = args.threads
202 flags.Concurrency.NumConcurrentEvents = args.threads
203 flags.Exec.MaxEvents = args.nEvents
204 flags.Exec.SkipEvents = args.skipEvents
205 from os import path, system, listdir
206 flags.Input.Files = []
207
209 for fileArg in args.inputFile:
210 if path.isdir(fileArg):
211 flags.Input.Files += [ "{dir}/{file}".format(dir=fileArg, file=y) for y in listdir(fileArg) ]
212 else:
213 if fileArg[fileArg.rfind(".")+1 :]not in ["txt", "conf"]:
214 flags.Input.Files+=[fileArg]
215 else:
216 with open(fileArg) as inStream:
217 #Check if the input is a string of comma separated files, and if it is, split it into a list
218 if isinstance(inStream, str) and "," in inStream:
219 flags.Input.Files += inStream.split(",")
220 else:
221 flags.Input.Files+=[ line.strip() for line in inStream if line[0]!='#']
222
223 flags.Exec.FPE= 500
224 flags.Exec.EventPrintoutInterval = 500
225
226 if args.defaultGeoFile == "RUN3":
227 flags.GeoModel.SQLiteDBFullPath = MuonPhaseIITestDefaults.GEODB_R3
228 elif args.defaultGeoFile == "RUN4":
229 flags.GeoModel.SQLiteDBFullPath = MuonPhaseIITestDefaults.GEODB_R4
230 elif args.defaultGeoFile == "RUN3MSOnly":
231 flags.GeoModel.SQLiteDBFullPath = MuonPhaseIITestDefaults.GEODB_R3MSOnly
232 elif args.defaultGeoFile == "RUN4MSOnly":
233 flags.GeoModel.SQLiteDBFullPath = MuonPhaseIITestDefaults.GEODB_R4MSOnly
234 elif args.defaultGeoFile == "ITkR3MS":
235 flags.GeoModel.SQLiteDBFullPath = MuonPhaseIITestDefaults.GEODB_ITk_R3MS
236 elif args.geoModelFile.startswith("root://"):
237 if not path.exists("Geometry/{geoTag}.db".format(geoTag=args.geoTag)):
238 print ("Copy geometry file from EOS {source}".format(source = args.geoModelFile))
239 system("mkdir Geometry/")
240 system("xrdcp {source} Geometry/{geoTag}.db".format(source = args.geoModelFile,
241 geoTag=args.geoTag))
242
243 args.geoModelFile = "Geometry/{geoTag}.db".format(geoTag=args.geoTag)
244 else:
245 flags.GeoModel.SQLiteDBFullPath = args.geoModelFile
246
247 flags.GeoModel.SQLiteDB = True
249
250 if args.passiveMaterialMaps:
251 flags.Muon.trackGeometryMaterialMap = args.passiveMaterialMaps
252
253 flags.Detector.GeometryBpipe = False
254
255 flags.Detector.GeometryBCM = False
256 flags.Detector.GeometryPixel = False
257 flags.Detector.GeometrySCT = False
258 flags.Detector.GeometryTRT = False
259
260 flags.Detector.GeometryPLR = False
261 flags.Detector.GeometryBCMPrime = False
262 flags.Detector.GeometryITkPixel = False
263 flags.Detector.GeometryITkStrip = False
264
265 flags.Detector.GeometryHGTD = False
266
267 flags.Detector.GeometryLAr = False
268 flags.Detector.GeometryTile = False
269 flags.Detector.GeometryMBTS = False
270 flags.Detector.GeometryCalo = False
271
272 flags.Detector.GeometryCSC = False
273 if args.noSTGC:
274 flags.Detector.GeometrysTGC = False
275 if args.noMM:
276 flags.Detector.GeometryMM = False
277 if args.noTgc:
278 flags.Detector.GeometryTGC = False
279 if args.noRpc:
280 flags.Detector.GeometryRPC = False
281 if args.noMdt:
282 flags.Detector.GeometryMDT = False
283
284 try:
285 flags.Acts.TrackingGeometry.UseBlueprint = True
286 except AttributeError: pass
287 flags.Scheduler.CheckDependencies = True
288 flags.Scheduler.ShowDataDeps = True
289 flags.Scheduler.ShowDataFlow = True
290 flags.Scheduler.ShowControlFlow = True
291 flags.Scheduler.EnableVerboseViews = True
292 flags.Scheduler.AutoLoadUnmetDependencies = True
293 #flags.PerfMon.doFullMonMT = True
294 flags.lock()
295 flags.dump(evaluate = True)
296 cfg = setupServicesCfg(flags)
297
298 from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
299 cfg.merge(MuonGeoModelCfg(flags))
300
301 if not flags.Muon.usePhaseIIGeoSetup:
302 print ("WARNING: New Muon plugin is not part of the Geometry file {geoDBFile}".format(geoDBFile=args.geoModelFile))
303 else:
304 from ActsAlignmentAlgs.AlignmentAlgsConfig import ActsGeometryContextAlgCfg
305 cfg.merge(ActsGeometryContextAlgCfg(flags))
306
307 cfg.getService("MessageSvc").verboseLimit = 10000000
308 cfg.getService("MessageSvc").debugLimit = 10000000
309 cfg.getService("MessageSvc").errorLimit = 10000000
310
311 return flags, cfg
312
313
314if __name__=="__main__":
315 args = SetupArgParser().parse_args()
316 flags, cfg = setupGeoR4TestCfg(args)
317 from MuonConfig.MuonConfigUtils import setupHistSvcCfg
318 cfg.merge(setupHistSvcCfg(flags, outFile = args.outRootFile, outStream="GEOMODELTESTER"))
319 chambToTest = args.chambers if len([x for x in args.chambers if x =="all"]) ==0 else []
320 chambToExclude = args.excludedChambers
321
322
323 if flags.Muon.usePhaseIIGeoSetup:
324 cfg.getCondAlgo("MuonDetectorCondAlg").checkGeo = True
325 cfg.getCondAlgo("MuonDetectorCondAlg").dumpGeo = True
326 from TrackingGeometryCondAlg.AtlasTrackingGeometryCondAlgConfig import TrackingGeometryCondAlgCfg
327 cfg.merge(TrackingGeometryCondAlgCfg(flags))
328
329
330 cfg.getService("MessageSvc").setVerbose = []
331
332 if flags.Detector.GeometryMDT:
333 if not flags.Muon.usePhaseIIGeoSetup:
334 from MuonGeoModelTest.testGeoModel import GeoModelMdtTestCfg as LegacyTestCfg
335 cfg.merge(LegacyTestCfg(flags,
336 TestStations = [ch for ch in chambToTest if ch[0] == "B" or ch[0] == "E"],
337 ExcludeStations = [ch for ch in chambToExclude if ch[0] == "B" or ch[0] == "E"]))
338 else:
339 cfg.merge(GeoModelMdtTestCfg(flags,
340 TestStations = [ch for ch in chambToTest if ch[0] == "B" or ch[0] == "E"],
341 ExcludeStations = [ch for ch in chambToExclude if ch[0] == "B" or ch[0] == "E"],
342 localMezzanineJSON=args.localMdtMezzJSON,
343 localCablingJSON=args.localMdtCablingJSON,
344 ReadoutSideXML="ReadoutSides.xml",
345 doPlots=not args.noPlots,
346 ExtraInputs=[( 'MuonGM::MuonDetectorManager' , 'ConditionStore+MuonDetectorManager' )]))
347
348 if flags.Detector.GeometryRPC:
349 if not flags.Muon.usePhaseIIGeoSetup:
350 from MuonGeoModelTest.testGeoModel import GeoModelRpcTestCfg as LegacyTestCfg
351 cfg.merge(LegacyTestCfg(flags,
352 TestStations = [ch for ch in chambToTest if ch[0] == "B"],
353 ExcludeStations = [ch for ch in chambToExclude if ch[0] == "B"]))
354 else:
355 cfg.merge(GeoModelRpcTestCfg(flags,
356 TestStations = [ch for ch in chambToTest if ch[0] == "B"],
357 ExcludeStations = [ch for ch in chambToExclude if ch[0] == "B"],
358 doPlots=not args.noPlots,
359 ExtraInputs=[( 'MuonGM::MuonDetectorManager' , 'ConditionStore+MuonDetectorManager' )]))
360
361 if flags.Detector.GeometryTGC:
362 if not flags.Muon.usePhaseIIGeoSetup:
363 from MuonGeoModelTest.testGeoModel import GeoModelTgcTestCfg as LegacyTestCfg
364 cfg.merge(LegacyTestCfg(flags,
365 TestStations = [ch for ch in chambToTest if ch[0] == "T"],
366 ExcludeStations = [ch for ch in chambToExclude if ch[0] == "T"]))
367 else:
368 cfg.merge(GeoModelTgcTestCfg(flags,
369 TestStations = [ch for ch in chambToTest if ch[0] == "T"],
370 ExcludeStations = [ch for ch in chambToExclude if ch[0] == "T"],
371 ExtraInputs=[( 'MuonGM::MuonDetectorManager' , 'ConditionStore+MuonDetectorManager' )]))
372
373 if flags.Detector.GeometryMM:
374 if not flags.Muon.usePhaseIIGeoSetup:
375 from MuonGeoModelTest.testGeoModel import GeoModelMmTestCfg as LegacyTestCfg
376 cfg.merge(LegacyTestCfg(flags,
377 TestStations = [ch for ch in chambToTest if ch[0] == "M"],
378 ExcludeStations = [ch for ch in chambToExclude if ch[0] == "M"]))
379 else:
380 cfg.merge(GeoModelMmTestCfg(flags,
381 TestStations = [ch for ch in chambToTest if ch[0] == "M"],
382 ExcludeStations = [ch for ch in chambToExclude if ch[0] == "M"],
383 ExtraInputs=[( 'MuonGM::MuonDetectorManager' , 'ConditionStore+MuonDetectorManager' )]))
384
385 if flags.Detector.GeometrysTGC:
386 if not flags.Muon.usePhaseIIGeoSetup:
387 from MuonGeoModelTest.testGeoModel import GeoModelsTgcTestCfg as LegacyTestCfg
388 cfg.merge(LegacyTestCfg(flags,
389 TestStations = [ch for ch in chambToTest if ch[0] == "S"],
390 ExcludeStations = [ch for ch in chambToExclude if ch[0] == "S"]))
391 else:
392 cfg.merge(GeoModelsTgcTestCfg(flags,
393 TestStations = [ch for ch in chambToTest if ch[0] == "S"],
394 ExcludeStations = [ch for ch in chambToExclude if ch[0] == "S"],
395 ExtraInputs=[( 'MuonGM::MuonDetectorManager' , 'ConditionStore+MuonDetectorManager' )]))
396 from MuonConfig.MuonConfigUtils import executeTest
397 executeTest(cfg)
GeoModelTgcTestCfg(flags, name="GeoModelTgcTest", **kwargs)
GeoModelMdtTestCfg(flags, name="GeoModelMdtTest", **kwargs)
GeoModelsTgcTestCfg(flags, name="GeoModelsTgcTest", **kwargs)
GeoModelMmTestCfg(flags, name="GeoModelMmTest", **kwargs)
NswGeoPlottingAlgCfg(flags, name="NswGeoPlotting", **kwargs)
GeoModelRpcTestCfg(flags, name="GeoModelRpcTest", **kwargs)