ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonValidation
MuonPRDTest
python
BasicMuonTest.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2
3
4
def
MuonHitValAlgCfg
(flags, name="MuonValAlg",
5
outFile="BasicMuonTest.root",**kwargs):
6
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
7
from
AthenaConfiguration.ComponentFactory
import
CompFactory
8
from
MuonConfig.MuonConfigUtils
import
setupHistSvcCfg
9
result = ComponentAccumulator()
10
result.merge(setupHistSvcCfg(flags, outFile=outFile, outStream=
"MUONVALIDSTREAM"
))
11
kwargs.setdefault(
"ExtraInputs"
, [ (
'MuonGM::MuonDetectorManager'
,
'ConditionStore+MuonDetectorManager'
)])
12
the_alg = CompFactory.MuonVal.MuonTesterAlg(name, **kwargs)
13
result.addEventAlgo(the_alg, primary =
True
)
14
return
result
15
16
17
if
__name__ ==
"__main__"
:
18
from
MuonGeoModelTest.testGeoModel
import
SetupArgParser
19
from
AthenaConfiguration.AllConfigFlags
import
initConfigFlags
20
from
MuonConfig.MuonConfigUtils
import
executeTest, SetupMuonStandaloneCA
21
22
23
args = SetupArgParser().parse_args()
24
flags = initConfigFlags()
25
flags.Concurrency.NumThreads = args.threads
26
flags.Concurrency.NumConcurrentEvents = args.threads
# Might change this later, but good enough for the moment.
27
from
MuonConfig.MuonConfigUtils
import
prepareInput
28
prepareInput
(flags, args.inputFile)
29
flags.GeoModel.AtlasVersion = args.geoTag
30
flags.IOVDb.GlobalTag = args.condTag
31
flags.Scheduler.ShowDataDeps =
True
32
flags.Scheduler.ShowDataFlow =
True
33
flags.Exec.MaxEvents = -1
34
flags.lock()
35
flags.dump(evaluate =
True
)
36
37
38
cfg = SetupMuonStandaloneCA(flags)
39
from
MuonConfig.MuonGeometryConfig
import
MuonGeoModelCfg
40
cfg.merge(MuonGeoModelCfg(flags))
41
42
cfg.merge(
MuonHitValAlgCfg
(flags, outFile = args.outRootFile))
43
executeTest(cfg)
prepareInput
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)
Definition
SaltModelTriton.cxx:22
BasicMuonTest.MuonHitValAlgCfg
MuonHitValAlgCfg(flags, name="MuonValAlg", outFile="BasicMuonTest.root", **kwargs)
Definition
BasicMuonTest.py:5
Generated on
for ATLAS Offline Software by
1.17.0