ATLAS Offline Software
Loading...
Searching...
No Matches
testGeoModel Namespace Reference

Classes

class  MuonPhaseIITestDefaults

Functions

 SetupArgParser ()
 GeoModelMdtTestCfg (flags, name="GeoModelMdtTest", **kwargs)
 GeoModelRpcTestCfg (flags, name="GeoModelRpcTest", **kwargs)
 GeoModelTgcTestCfg (flags, name="GeoModelTgcTest", **kwargs)
 GeoModelMmTestCfg (flags, name="GeoModelMmTest", **kwargs)
 GeoModelsTgcTestCfg (flags, name="GeoModelsTgcTest", **kwargs)
 GeoModelCscTestCfg (flags, name="GeoModelCscTest", **kwargs)
 setupServicesCfg (flags)
 GeoModelMdtTestCfg (flags, name="GeoModelMdtTest", localMezzanineJSON="", localCablingJSON="", doPlots=True, **kwargs)
 GeoModelRpcTestCfg (flags, name="GeoModelRpcTest", doPlots=True, **kwargs)
 NswGeoPlottingAlgCfg (flags, name="NswGeoPlotting", **kwargs)
 setupGeoR4TestCfg (args, flags=None)

Variables

 args = SetupArgParser().parse_args()
 flags = initConfigFlags()
 NumThreads
 NumConcurrentEvents
 Files
 AtlasVersion
 GlobalTag
 ShowDataDeps
 ShowDataFlow
 MaxEvents
 evaluate
 cfg = SetupMuonStandaloneCA(flags)
int chambToTest = 0 else []
 chambToExclude = args.excludedChambers
 checkGeo
 Ensure consistent translation of the geometry.
 dumpGeo
 setVerbose

Function Documentation

◆ GeoModelCscTestCfg()

testGeoModel.GeoModelCscTestCfg ( flags,
name = "GeoModelCscTest",
** kwargs )

Definition at line 71 of file MuonDetDescr/MuonGeoModelTest/python/testGeoModel.py.

71def GeoModelCscTestCfg(flags, name = "GeoModelCscTest", **kwargs):
72 result = ComponentAccumulator()
73 if not flags.Detector.GeometryCSC: return result
74 the_alg = CompFactory.MuonGM.GeoModelCscTest(name, **kwargs)
75 result.addEventAlgo(the_alg)
76 return result
77

◆ GeoModelMdtTestCfg() [1/2]

testGeoModel.GeoModelMdtTestCfg ( flags,
name = "GeoModelMdtTest",
** kwargs )

Definition at line 35 of file MuonDetDescr/MuonGeoModelTest/python/testGeoModel.py.

35def GeoModelMdtTestCfg(flags, name = "GeoModelMdtTest", **kwargs):
36 result = ComponentAccumulator()
37 if not flags.Detector.GeometryMDT: return result
38 from MuonConfig.MuonCablingConfig import MDTCablingConfigCfg
39 result.merge(MDTCablingConfigCfg(flags))
40 the_alg = CompFactory.MuonGM.GeoModelMdtTest(name, **kwargs)
41 result.addEventAlgo(the_alg)
42 return result
43

◆ GeoModelMdtTestCfg() [2/2]

testGeoModel.GeoModelMdtTestCfg ( flags,
name = "GeoModelMdtTest",
localMezzanineJSON = "",
localCablingJSON = "",
doPlots = True,
** kwargs )

Definition at line 137 of file MuonPhaseII/MuonDetDescr/MuonGeoModelTestR4/python/testGeoModel.py.

137def GeoModelMdtTestCfg(flags, name = "GeoModelMdtTest", localMezzanineJSON="", localCablingJSON="", doPlots=True,**kwargs):
138 result = ComponentAccumulator()
139 from MuonConfig.MuonCablingConfig import MDTCablingConfigCfg
140 result.merge(MDTCablingConfigCfg(flags,MezzanineJSON=localMezzanineJSON, CablingJSON=localCablingJSON))
141 if not doPlots:
142 kwargs["visualizeTubes"] = False
143 kwargs["visualizeStaggering"] = False
144 the_alg = CompFactory.MuonGMR4.GeoModelMdtTest(name, **kwargs)
145 result.addEventAlgo(the_alg, primary = True)
146 return result
147

◆ GeoModelMmTestCfg()

testGeoModel.GeoModelMmTestCfg ( flags,
name = "GeoModelMmTest",
** kwargs )

Definition at line 57 of file MuonDetDescr/MuonGeoModelTest/python/testGeoModel.py.

57def GeoModelMmTestCfg(flags,name = "GeoModelMmTest", **kwargs):
58 result = ComponentAccumulator()
59 if not flags.Detector.GeometryMM: return result
60 the_alg = CompFactory.MuonGM.GeoModelMmTest(name, **kwargs)
61 result.addEventAlgo(the_alg)
62 return result
63

◆ GeoModelRpcTestCfg() [1/2]

testGeoModel.GeoModelRpcTestCfg ( flags,
name = "GeoModelRpcTest",
** kwargs )

Definition at line 44 of file MuonDetDescr/MuonGeoModelTest/python/testGeoModel.py.

44def GeoModelRpcTestCfg(flags,name = "GeoModelRpcTest", **kwargs):
45 result = ComponentAccumulator()
46 if not flags.Detector.GeometryRPC: return result
47 the_alg = CompFactory.MuonGM.GeoModelRpcTest(name, **kwargs)
48 result.addEventAlgo(the_alg)
49 return result
50

◆ GeoModelRpcTestCfg() [2/2]

testGeoModel.GeoModelRpcTestCfg ( flags,
name = "GeoModelRpcTest",
doPlots = True,
** kwargs )

Definition at line 148 of file MuonPhaseII/MuonDetDescr/MuonGeoModelTestR4/python/testGeoModel.py.

148def GeoModelRpcTestCfg(flags, name = "GeoModelRpcTest", doPlots=True,**kwargs):
149 result = ComponentAccumulator()
150 if not doPlots:
151 kwargs["visualizePlanes"] = False
152 the_alg = CompFactory.MuonGMR4.GeoModelRpcTest(name, **kwargs)
153 result.addEventAlgo(the_alg, primary = True)
154 return result
155

◆ GeoModelsTgcTestCfg()

testGeoModel.GeoModelsTgcTestCfg ( flags,
name = "GeoModelsTgcTest",
** kwargs )

Definition at line 64 of file MuonDetDescr/MuonGeoModelTest/python/testGeoModel.py.

64def GeoModelsTgcTestCfg(flags, name = "GeoModelsTgcTest", **kwargs):
65 result = ComponentAccumulator()
66 if not flags.Detector.GeometrysTGC: return result
67 the_alg = CompFactory.MuonGM.GeoModelsTgcTest(name, **kwargs)
68 result.addEventAlgo(the_alg)
69 return result
70

◆ GeoModelTgcTestCfg()

testGeoModel.GeoModelTgcTestCfg ( flags,
name = "GeoModelTgcTest",
** kwargs )

Definition at line 51 of file MuonDetDescr/MuonGeoModelTest/python/testGeoModel.py.

51def GeoModelTgcTestCfg(flags,name = "GeoModelTgcTest", **kwargs):
52 result = ComponentAccumulator()
53 if not flags.Detector.GeometryTGC: return result
54 the_alg = CompFactory.MuonGM.GeoModelTgcTest(name, **kwargs)
55 result.addEventAlgo(the_alg)
56 return result

◆ NswGeoPlottingAlgCfg()

testGeoModel.NswGeoPlottingAlgCfg ( flags,
name = "NswGeoPlotting",
** kwargs )

Definition at line 174 of file MuonPhaseII/MuonDetDescr/MuonGeoModelTestR4/python/testGeoModel.py.

174def NswGeoPlottingAlgCfg(flags, name="NswGeoPlotting", **kwargs):
175 result = ComponentAccumulator()
176 kwargs.setdefault("TestActsSurface", True)
177 kwargs.setdefault("plotTgc", flags.Detector.GeometryTGC)
178 kwargs.setdefault("plotStgc", flags.Detector.GeometrysTGC)
179 kwargs.setdefault("plotMm", flags.Detector.GeometryMM)
180
181 the_alg = CompFactory.MuonGMR4.NswGeoPlottingAlg(name, **kwargs)
182 result.addEventAlgo(the_alg, primary = True)
183 return result
184
185
186
187

◆ SetupArgParser()

testGeoModel.SetupArgParser ( )

Definition at line 6 of file MuonDetDescr/MuonGeoModelTest/python/testGeoModel.py.

6def SetupArgParser():
7 from AthenaConfiguration.TestDefaults import defaultConditionsTags, defaultGeometryTags, defaultTestFiles
8
9 from argparse import ArgumentParser
10
11 parser = ArgumentParser()
12 parser.add_argument("--threads", type=int, help="number of threads", default=1)
13 parser.add_argument("--inputFile", "-i", default=defaultTestFiles.EVNT,
14 help="Input file to run on ", nargs="+")
15 parser.add_argument("--geoTag", default=defaultGeometryTags.RUN3, help="Geometry tag to use", choices=[defaultGeometryTags.RUN2_BEST_KNOWLEDGE ,
16 defaultGeometryTags.RUN3])
17 parser.add_argument("--condTag", default=defaultConditionsTags.RUN3_MC, help="Conditions tag to use",
18 choices=[defaultConditionsTags.RUN3_MC,
19 defaultConditionsTags.RUN3_DATA,
20 defaultConditionsTags.RUN2_DATA,
21 defaultConditionsTags.RUN2_MC])
22 parser.add_argument("--chambers", default=["all"
23 ], nargs="+", help="Chambers to check. If string is all, all chambers will be checked")
24 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.")
25 parser.add_argument("--outRootFile", default="LegacyGeoModelDump.root", help="Output ROOT file to dump the geomerty")
26 parser.add_argument("--noMdt", help="Disable the Mdts from the geometry", action='store_true', default = False)
27 parser.add_argument("--noRpc", help="Disable the Rpcs from the geometry", action='store_true', default = False)
28 parser.add_argument("--noTgc", help="Disable the Tgcs from the geometry", action='store_true', default = False)
29 parser.add_argument("--noMM", help="Disable the MMs from the geometry", action='store_true', default = False)
30 parser.add_argument("--noSTGC", help="Disable the sTgcs from the geometry", action='store_true', default = False)
31
32 return parser
33
34

◆ setupGeoR4TestCfg()

testGeoModel.setupGeoR4TestCfg ( args,
flags = None )

Definition at line 188 of file MuonPhaseII/MuonDetDescr/MuonGeoModelTestR4/python/testGeoModel.py.

188def setupGeoR4TestCfg(args, flags = None):
189
190 if flags is None:
191 from AthenaConfiguration.AllConfigFlags import initConfigFlags
192 flags = initConfigFlags()
193 flags.Concurrency.NumThreads = args.threads
194 flags.Concurrency.NumConcurrentEvents = args.threads
195 flags.Exec.MaxEvents = args.nEvents
196 flags.Exec.SkipEvents = args.skipEvents
197
198
200 from MuonConfig.MuonConfigUtils import prepareInput
201 prepareInput(flags, args.inputFile)
202
203 flags.Exec.FPE= 500
204 flags.Exec.EventPrintoutInterval = 500
205
206 if args.defaultGeoFile == "RUN3":
207 flags.GeoModel.SQLiteDBFullPath = MuonPhaseIITestDefaults.GEODB_R3
208 elif args.defaultGeoFile == "RUN4":
209 flags.GeoModel.SQLiteDBFullPath = MuonPhaseIITestDefaults.GEODB_R4
210 elif args.defaultGeoFile == "RUN3MSOnly":
211 flags.GeoModel.SQLiteDBFullPath = MuonPhaseIITestDefaults.GEODB_R3MSOnly
212 elif args.defaultGeoFile == "RUN4MSOnly":
213 flags.GeoModel.SQLiteDBFullPath = MuonPhaseIITestDefaults.GEODB_R4MSOnly
214 elif args.defaultGeoFile == "ITkR3MS":
215 flags.GeoModel.SQLiteDBFullPath = MuonPhaseIITestDefaults.GEODB_ITk_R3MS
216 elif args.geoModelFile.startswith("root://"):
217 from os import system, path
218 if not path.exists("Geometry/{geoTag}.db".format(geoTag=args.geoTag)):
219 print ("Copy geometry file from EOS {source}".format(source = args.geoModelFile))
220 system("mkdir Geometry/")
221 system("xrdcp {source} Geometry/{geoTag}.db".format(source = args.geoModelFile,
222 geoTag=args.geoTag))
223
224 args.geoModelFile = "Geometry/{geoTag}.db".format(geoTag=args.geoTag)
225 else:
226 flags.GeoModel.SQLiteDBFullPath = args.geoModelFile
227
228 flags.GeoModel.SQLiteDB = True
229 from MuonConfig.MuonConfigUtils import configureDefaultTags
230 configureDefaultTags(flags)
231
232 if args.passiveMaterialMaps:
233 flags.Muon.trackGeometryMaterialMap = args.passiveMaterialMaps
234
235 flags.Detector.GeometryBpipe = False
236
237 flags.Detector.GeometryBCM = False
238 flags.Detector.GeometryPixel = False
239 flags.Detector.GeometrySCT = False
240 flags.Detector.GeometryTRT = False
241
242 flags.Detector.GeometryPLR = False
243 flags.Detector.GeometryBCMPrime = False
244 flags.Detector.GeometryITkPixel = False
245 flags.Detector.GeometryITkStrip = False
246
247 flags.Detector.GeometryHGTD = False
248
249 flags.Detector.GeometryLAr = False
250 flags.Detector.GeometryTile = False
251 flags.Detector.GeometryMBTS = False
252 flags.Detector.GeometryCalo = False
253
254 flags.Detector.GeometryCSC = False
255 if args.noSTGC:
256 flags.Detector.GeometrysTGC = False
257 if args.noMM:
258 flags.Detector.GeometryMM = False
259 if args.noTgc:
260 flags.Detector.GeometryTGC = False
261 if args.noRpc:
262 flags.Detector.GeometryRPC = False
263 if args.noMdt:
264 flags.Detector.GeometryMDT = False
265
266 try:
267 flags.Acts.TrackingGeometry.UseBlueprint = True
268 except AttributeError: pass
269 flags.Scheduler.CheckDependencies = True
270 flags.Scheduler.ShowDataDeps = True
271 flags.Scheduler.ShowDataFlow = True
272 flags.Scheduler.ShowControlFlow = True
273 flags.Scheduler.EnableVerboseViews = True
274 flags.Scheduler.AutoLoadUnmetDependencies = True
275 #flags.PerfMon.doFullMonMT = True
276 flags.lock()
277 flags.dump(evaluate = True)
278 cfg = setupServicesCfg(flags)
279
280 from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
281 cfg.merge(MuonGeoModelCfg(flags))
282
283 if not flags.Muon.usePhaseIIGeoSetup:
284 print ("WARNING: New Muon plugin is not part of the Geometry file {geoDBFile}".format(geoDBFile=args.geoModelFile))
285 else:
286 from ActsAlignmentAlgs.AlignmentAlgsConfig import ActsGeometryContextAlgCfg
287 cfg.merge(ActsGeometryContextAlgCfg(flags))
288
289 cfg.getService("MessageSvc").verboseLimit = 10000000
290 cfg.getService("MessageSvc").debugLimit = 10000000
291 cfg.getService("MessageSvc").errorLimit = 10000000
292
293 return flags, cfg
294
295
bool prepareInput(const std::string &name, const std::vector< int64_t > &shape, const std::vector< T > &data, std::vector< std::shared_ptr< tc::InferInput > > &inputs)

◆ setupServicesCfg()

testGeoModel.setupServicesCfg ( flags)

Definition at line 119 of file MuonPhaseII/MuonDetDescr/MuonGeoModelTestR4/python/testGeoModel.py.

119def setupServicesCfg(flags):
120 from AthenaConfiguration.MainServicesConfig import MainServicesCfg
121 result = MainServicesCfg(flags)
122
123 from AthenaConfiguration.Enums import Format
124 if flags.Input.Format is Format.POOL:
125 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
126 result.merge(PoolReadCfg(flags))
127 elif flags.Input.Format == Format.BS:
128 from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
129 result.merge(ByteStreamReadCfg(flags))
130
131 from PerfMonComps.PerfMonCompsConfig import PerfMonMTSvcCfg
132 result.merge(PerfMonMTSvcCfg(flags))
133 from MuonConfig.MuonGeometryConfig import MuonIdHelperSvcCfg
134 result.merge(MuonIdHelperSvcCfg(flags))
135 return result
136

Variable Documentation

◆ args

testGeoModel.args = SetupArgParser().parse_args()

◆ AtlasVersion

testGeoModel.AtlasVersion

◆ cfg

testGeoModel.cfg = SetupMuonStandaloneCA(flags)

◆ chambToExclude

testGeoModel.chambToExclude = args.excludedChambers

◆ chambToTest

int testGeoModel.chambToTest = 0 else []

◆ checkGeo

testGeoModel.checkGeo

Ensure consistent translation of the geometry.

Definition at line 306 of file MuonPhaseII/MuonDetDescr/MuonGeoModelTestR4/python/testGeoModel.py.

◆ dumpGeo

testGeoModel.dumpGeo

◆ evaluate

testGeoModel.evaluate

◆ Files

testGeoModel.Files

◆ flags

testGeoModel.flags = initConfigFlags()

◆ GlobalTag

testGeoModel.GlobalTag

◆ MaxEvents

testGeoModel.MaxEvents

◆ NumConcurrentEvents

testGeoModel.NumConcurrentEvents

◆ NumThreads

testGeoModel.NumThreads

◆ setVerbose

testGeoModel.setVerbose

◆ ShowDataDeps

testGeoModel.ShowDataDeps

◆ ShowDataFlow

testGeoModel.ShowDataFlow