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
str _baseFilePath = "root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/data-art/large-input/MuonRecRTT/"
 Directory where the large files are stored.
 checkGeo
 Ensure consistent translation of the geometry.
 dumpGeo
 setVerbose

Function Documentation

◆ GeoModelCscTestCfg()

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]

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]

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

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

130def GeoModelMdtTestCfg(flags, name = "GeoModelMdtTest", localMezzanineJSON="", localCablingJSON="", doPlots=True,**kwargs):
131 result = ComponentAccumulator()
132 from MuonConfig.MuonCablingConfig import MDTCablingConfigCfg
133 result.merge(MDTCablingConfigCfg(flags,MezzanineJSON=localMezzanineJSON, CablingJSON=localCablingJSON))
134 if not doPlots:
135 kwargs["visualizeTubes"] = False
136 kwargs["visualizeStaggering"] = False
137 the_alg = CompFactory.MuonGMR4.GeoModelMdtTest(name, **kwargs)
138 result.addEventAlgo(the_alg, primary = True)
139 return result
140

◆ GeoModelMmTestCfg()

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]

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]

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

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

141def GeoModelRpcTestCfg(flags, name = "GeoModelRpcTest", doPlots=True,**kwargs):
142 result = ComponentAccumulator()
143 if not doPlots:
144 kwargs["visualizePlanes"] = False
145 the_alg = CompFactory.MuonGMR4.GeoModelRpcTest(name, **kwargs)
146 result.addEventAlgo(the_alg, primary = True)
147 return result
148

◆ GeoModelsTgcTestCfg()

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()

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()

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

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

167def NswGeoPlottingAlgCfg(flags, name="NswGeoPlotting", **kwargs):
168 result = ComponentAccumulator()
169 kwargs.setdefault("TestActsSurface", True)
170 kwargs.setdefault("plotTgc", flags.Detector.GeometryTGC)
171 kwargs.setdefault("plotStgc", flags.Detector.GeometrysTGC)
172 kwargs.setdefault("plotMm", flags.Detector.GeometryMM)
173
174 the_alg = CompFactory.MuonGMR4.NswGeoPlottingAlg(name, **kwargs)
175 result.addEventAlgo(the_alg, primary = True)
176 return result
177

◆ SetupArgParser()

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()

setupGeoR4TestCfg ( args,
flags = None )

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

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

setupServicesCfg ( flags)

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

112def setupServicesCfg(flags):
113 from AthenaConfiguration.MainServicesConfig import MainServicesCfg
114 result = MainServicesCfg(flags)
115
116 from AthenaConfiguration.Enums import Format
117 if flags.Input.Format is Format.POOL:
118 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
119 result.merge(PoolReadCfg(flags))
120 elif flags.Input.Format == Format.BS:
121 from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
122 result.merge(ByteStreamReadCfg(flags))
123
124 from PerfMonComps.PerfMonCompsConfig import PerfMonMTSvcCfg
125 result.merge(PerfMonMTSvcCfg(flags))
126 from MuonConfig.MuonGeometryConfig import MuonIdHelperSvcCfg
127 result.merge(MuonIdHelperSvcCfg(flags))
128 return result
129

Variable Documentation

◆ _baseFilePath

str testGeoModel._baseFilePath = "root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/data-art/large-input/MuonRecRTT/"
protected

Directory where the large files are stored.

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

◆ args

testGeoModel.args = SetupArgParser().parse_args()

◆ AtlasVersion

testGeoModel.AtlasVersion

◆ cfg

testGeoModel.cfg = SetupMuonStandaloneCA(flags)

◆ chambToExclude

testGeoModel.chambToExclude = args.excludedChambers

◆ chambToTest

int chambToTest = 0 else []

◆ checkGeo

testGeoModel.checkGeo

Ensure consistent translation of the geometry.

Definition at line 294 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