Skip to content

Commit

Permalink
test: Test KF direct navigation (acts-project#2922)
Browse files Browse the repository at this point in the history
Since this broke lately without noticing in ACTS but later on in ATHENA we would like to add this to the Python level tests
  • Loading branch information
andiwand authored and EleniXoch committed May 6, 2024
1 parent 6e717f5 commit 5f35ed0
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
16 changes: 16 additions & 0 deletions Examples/Python/tests/root_file_hashes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,19 @@ test_exatrkx[cpu-torch]__performance_track_finding.root: e0875db5eb3aa6b46ad4baf
test_exatrkx[gpu-onnx]__performance_track_finding.root: 4845dc9f62e287e20c80d479e246eb69d01b279964cfdff83543bea0ea9afbed
test_exatrkx[gpu-torch]__performance_track_finding.root: e0875db5eb3aa6b46ad4baf846d39b37b68f1efd3436448cc75919b637f8d8d9
test_ML_Ambiguity_Solver__performance_ambiML.root: 284ff5c3a08c0b810938e4ac2f8ba8fe2babb17d4c202b624ed69fff731a9006
test_truth_tracking_kalman[generic-False-0.0]__trackstates_fitter.root: 26640d70f7fab870e59666b0915569a6f8f82af68c63e5505548ffa9d24a3212
test_truth_tracking_kalman[generic-False-0.0]__tracksummary_fitter.root: 11b2e2a50343c636fa977175a30220805412d3200e164ae4c3f439fe2087fb88
test_truth_tracking_kalman[generic-False-1000.0]__trackstates_fitter.root: 476e0dca91e5168f0574b86aea797dc22900fd456b3c3fb24d5f571b4be804fc
test_truth_tracking_kalman[generic-False-1000.0]__tracksummary_fitter.root: fc82abfc4e3016cda806e743a270bf78b6d4cc404cd52145ea1eabed85d32feb
test_truth_tracking_kalman[generic-True-0.0]__trackstates_fitter.root: 26640d70f7fab870e59666b0915569a6f8f82af68c63e5505548ffa9d24a3212
test_truth_tracking_kalman[generic-True-0.0]__tracksummary_fitter.root: 11b2e2a50343c636fa977175a30220805412d3200e164ae4c3f439fe2087fb88
test_truth_tracking_kalman[generic-True-1000.0]__trackstates_fitter.root: 476e0dca91e5168f0574b86aea797dc22900fd456b3c3fb24d5f571b4be804fc
test_truth_tracking_kalman[generic-True-1000.0]__tracksummary_fitter.root: fc82abfc4e3016cda806e743a270bf78b6d4cc404cd52145ea1eabed85d32feb
test_truth_tracking_kalman[odd-False-0.0]__trackstates_fitter.root: cad01486e071ffdb614d15934354a1b17f2bfa95dd5d440215f606d8a79afe17
test_truth_tracking_kalman[odd-False-0.0]__tracksummary_fitter.root: f42d1cd850b78909b07cd6e412ae03c6e1ea8c99a02000892dd957319f0a825c
test_truth_tracking_kalman[odd-False-1000.0]__trackstates_fitter.root: 72c79be1458c4f9c9a1661778c900f0875d257f2d391c4183a698825448919a1
test_truth_tracking_kalman[odd-False-1000.0]__tracksummary_fitter.root: 3d424dec9b172f253c8c4ffbda470f678fd1081a3d36dcfea517ab0f94995ae4
test_truth_tracking_kalman[odd-True-0.0]__trackstates_fitter.root: cad01486e071ffdb614d15934354a1b17f2bfa95dd5d440215f606d8a79afe17
test_truth_tracking_kalman[odd-True-0.0]__tracksummary_fitter.root: f42d1cd850b78909b07cd6e412ae03c6e1ea8c99a02000892dd957319f0a825c
test_truth_tracking_kalman[odd-True-1000.0]__trackstates_fitter.root: 72c79be1458c4f9c9a1661778c900f0875d257f2d391c4183a698825448919a1
test_truth_tracking_kalman[odd-True-1000.0]__tracksummary_fitter.root: 3d424dec9b172f253c8c4ffbda470f678fd1081a3d36dcfea517ab0f94995ae4
14 changes: 13 additions & 1 deletion Examples/Python/tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,9 @@ def test_event_recording(tmp_path):


@pytest.mark.parametrize("revFiltMomThresh", [0 * u.GeV, 1 * u.TeV])
@pytest.mark.parametrize("directNavigation", [False, True])
def test_truth_tracking_kalman(
tmp_path, assert_root_hash, revFiltMomThresh, detector_config
tmp_path, assert_root_hash, revFiltMomThresh, directNavigation, detector_config
):
from truth_tracking_kalman import runTruthTrackingKalman

Expand All @@ -562,6 +563,7 @@ def test_truth_tracking_kalman(
digiConfigFile=detector_config.digiConfigFile,
outputDir=tmp_path,
reverseFilteringMomThreshold=revFiltMomThresh,
directNavigation=directNavigation,
s=seq,
)

Expand All @@ -577,6 +579,16 @@ def test_truth_tracking_kalman(
assert_has_entries(fp, tn)
assert_root_hash(fn, fp)

import ROOT

ROOT.PyConfig.IgnoreCommandLineOptions = True
ROOT.gROOT.SetBatch(True)
rf = ROOT.TFile.Open(str(tmp_path / "tracksummary_fitter.root"))
keys = [k.GetName() for k in rf.GetListOfKeys()]
assert "tracksummary" in keys
for entry in rf.Get("tracksummary"):
assert entry.hasFittedParams


def test_truth_tracking_gsf(tmp_path, assert_root_hash, detector_config):
from truth_tracking_gsf import runTruthTrackingGsf
Expand Down

0 comments on commit 5f35ed0

Please sign in to comment.