![]() |
FairShip
|
Functions | |
| make_point (class_name, z, track_id) | |
| write_input (path, muons) | |
| write_output (path, identities) | |
| read_events (path) | |
| inputs (tmp_path) | |
| test_material_labels_used_by_the_test_exist () | |
| test_restores_hits_upstream_of_each_vertex (tmp_path, inputs) | |
| test_start_entry_counts_across_input_files (tmp_path, inputs) | |
| test_mismatch_raises_and_leaves_output_unchanged (tmp_path, inputs, identities) | |
| test_more_output_events_than_interactions_raises (tmp_path, inputs) | |
Variables | |
| ROOT = pytest.importorskip("ROOT") | |
| list | MATERIALS = [str(label) for label in ROOT.NewMuDISGenerator.GetMaterialNames()] |
| float | MUON_MASS = 0.10566 |
| list | FIRST_FILE |
| list | SECOND_FILE |
| list | REPLAY_FROM_START = [(0, "HE", 0), (0, "HE", 1), (2, "AIR", 0)] |
| float | SIMULATED_Z = 9999.0 |
Round trip of the NewMuDIS post-processing on small hand-made files. ``post_process`` pairs each simulated event with the DIS interaction it was generated from by walking the MuonDIS input in replay order, then copies the incoming muon's hits upstream of the vertex into that event. These tests build a MuonDIS input split over two files, with uneven DIS counts per material and a muon without any interaction, plus a matching ``cbmsim`` output carrying the ``muDIS_*`` identity branches that ``NewMuDISGenerator`` writes. They check that hits land on the right events, that a non-zero start entry is counted across files, and that a mismatch stops the run without touching the output.
| test_mudis_postprocessing.inputs | ( | tmp_path | ) |
Definition at line 137 of file test_mudis_postprocessing.py.
| test_mudis_postprocessing.make_point | ( | class_name, | |
| z, | |||
| track_id ) |
Definition at line 50 of file test_mudis_postprocessing.py.
| test_mudis_postprocessing.read_events | ( | path | ) |
Return, per output entry, the identity and the z and track ID of every point.
Definition at line 116 of file test_mudis_postprocessing.py.
| test_mudis_postprocessing.test_material_labels_used_by_the_test_exist | ( | ) |
Definition at line 145 of file test_mudis_postprocessing.py.
| test_mudis_postprocessing.test_mismatch_raises_and_leaves_output_unchanged | ( | tmp_path, | |
| inputs, | |||
| identities ) |
Definition at line 196 of file test_mudis_postprocessing.py.
| test_mudis_postprocessing.test_more_output_events_than_interactions_raises | ( | tmp_path, | |
| inputs ) |
Definition at line 208 of file test_mudis_postprocessing.py.
| test_mudis_postprocessing.test_restores_hits_upstream_of_each_vertex | ( | tmp_path, | |
| inputs ) |
Definition at line 149 of file test_mudis_postprocessing.py.
| test_mudis_postprocessing.test_start_entry_counts_across_input_files | ( | tmp_path, | |
| inputs ) |
Definition at line 175 of file test_mudis_postprocessing.py.
| test_mudis_postprocessing.write_input | ( | path, | |
| muons ) |
Write a MuonDIS tree with only the branches post_process reads.
Definition at line 57 of file test_mudis_postprocessing.py.
| test_mudis_postprocessing.write_output | ( | path, | |
| identities ) |
Write a cbmsim tree as the simulation leaves it, one entry per identity.
Definition at line 85 of file test_mudis_postprocessing.py.
| list test_mudis_postprocessing.FIRST_FILE |
Definition at line 34 of file test_mudis_postprocessing.py.
| list test_mudis_postprocessing.MATERIALS = [str(label) for label in ROOT.NewMuDISGenerator.GetMaterialNames()] |
Definition at line 29 of file test_mudis_postprocessing.py.
| float test_mudis_postprocessing.MUON_MASS = 0.10566 |
Definition at line 30 of file test_mudis_postprocessing.py.
| list test_mudis_postprocessing.REPLAY_FROM_START = [(0, "HE", 0), (0, "HE", 1), (2, "AIR", 0)] |
Definition at line 45 of file test_mudis_postprocessing.py.
| test_mudis_postprocessing.ROOT = pytest.importorskip("ROOT") |
Definition at line 20 of file test_mudis_postprocessing.py.
| list test_mudis_postprocessing.SECOND_FILE |
Definition at line 41 of file test_mudis_postprocessing.py.
| float test_mudis_postprocessing.SIMULATED_Z = 9999.0 |
Definition at line 47 of file test_mudis_postprocessing.py.