Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Correct handling of buildITkGeometry return value #4115

Merged
merged 3 commits into from
Mar 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Examples/Scripts/Python/full_chain_itk.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
outputDir = pathlib.Path.cwd() / "itk_output"
# acts.examples.dump_args_calls(locals()) # show acts.examples python binding calls

detector, trackingGeometry, decorators = acts.examples.itk.buildITkGeometry(geo_dir)
detector = acts.examples.itk.buildITkGeometry(geo_dir)
trackingGeometry = detector.trackingGeometry()
field = acts.examples.MagneticFieldMapXyz(str(geo_dir / "bfield/ATLAS-BField-xyz.root"))
rnd = acts.examples.RandomNumbers(seed=42)

Expand Down
3 changes: 2 additions & 1 deletion Examples/Scripts/Python/full_chain_itk_Gbts.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
outputDir = pathlib.Path.cwd() / "itk_output"
# acts.examples.dump_args_calls(locals()) # show acts.examples python binding calls

detector, trackingGeometry, decorators = acts.examples.itk.buildITkGeometry(geo_dir)
detector = acts.examples.itk.buildITkGeometry(geo_dir)
trackingGeometry = detector.trackingGeometry()
field = acts.examples.MagneticFieldMapXyz(str(geo_dir / "bfield/ATLAS-BField-xyz.root"))
rnd = acts.examples.RandomNumbers(seed=42)

Expand Down
4 changes: 3 additions & 1 deletion Examples/Scripts/Python/full_chain_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,14 @@ def full_chain(args):
seedingConfigFile = geo_dir / "itk-hgtd/geoSelection-ITk.json"
# args.material_config defaulted in itk.buildITkGeometry: geo_dir / "itk-hgtd/material-maps-ITk-HGTD.json"
bFieldFile = geo_dir / "bfield/ATLAS-BField-xyz.root"
detector, trackingGeometry, decorators = itk.buildITkGeometry(
detector = itk.buildITkGeometry(
geo_dir,
customMaterialFile=args.material_config,
material=not args.bf_constant,
logLevel=acts.logging.Level(args.loglevel),
)
trackingGeometry = detector.trackingGeometry()
decorators = detector.contextDecorators()
# fmt: on

if args.bf_constant:
Expand Down
4 changes: 3 additions & 1 deletion Examples/Scripts/Python/itk.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,12 @@ def runITk(
assert geo_example_dir.exists(), "Detector example input directory missing"
from acts.examples.itk import buildITkGeometry

detector, trackingGeometry, decorators = buildITkGeometry(
detector = buildITkGeometry(
geo_example_dir,
material=not args.no_material,
)
trackingGeometry = detector.trackingGeometry()
decorators = detector.contextDecorators()

runITk(
trackingGeometry=trackingGeometry,
Expand Down
3 changes: 2 additions & 1 deletion Examples/Scripts/Python/itk_seeding.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ def runITkSeedingFromCsv(detector, trackingGeometry, field, outputDir):
geo_dir = pathlib.Path("acts-itk")
outputDir = pathlib.Path.cwd() / "itk_output"

detector, trackingGeometry, decorators = acts.examples.itk.buildITkGeometry(geo_dir)
detector = acts.examples.itk.buildITkGeometry(geo_dir)
trackingGeometry = detector.trackingGeometry()
field = acts.examples.MagneticFieldMapXyz(
str(geo_dir / "bfield/ATLAS-BField-xyz.root")
)
Expand Down
6 changes: 3 additions & 3 deletions Examples/Scripts/Python/material_mapping_itk.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ def runMaterialMapping(

from acts.examples.itk import buildITkGeometry

detector, trackingGeometry, decorators = buildITkGeometry(
geo_example_dir, customMaterialFile=args.material
)
detector = buildITkGeometry(geo_example_dir, customMaterialFile=args.material)
trackingGeometry = detector.trackingGeometry()
decorators = detector.contextDecorators()

runMaterialMapping(
trackingGeometry,
Expand Down
6 changes: 3 additions & 3 deletions Examples/Scripts/Python/material_validation_itk.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ def runMaterialValidation(

from acts.examples.itk import buildITkGeometry

detector, trackingGeometry, decorators = buildITkGeometry(
geo_example_dir, customMaterialFile=args.material
)
detector = buildITkGeometry(geo_example_dir, customMaterialFile=args.material)
trackingGeometry = detector.trackingGeometry()
decorators = detector.contextDecorators()

field = acts.ConstantBField(acts.Vector3(0, 0, 2 * acts.UnitConstants.T))

Expand Down
Loading