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

Add support for EvtGen model HypNonLepton #440

Merged
merged 2 commits into from
May 29, 2024
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
1 change: 1 addition & 0 deletions src/decaylanguage/dec/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class PhotosEnum(IntEnum):
"HQET3",
"HQET2",
"HQET",
"HypNonLepton",
"ISGW2",
"ISGW",
"KNUNU",
Expand Down
7 changes: 7 additions & 0 deletions tests/data/models/model-HypNonLepton.dec
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# File for testing purposes. Contains a single decay mode with a specific model.

Decay Lambda0sig
1.0 p+ pi- HypNonLepton 0.748 -6.5;
Enddecay

End
10 changes: 5 additions & 5 deletions tests/dec/test_known_decay_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
DIR = Path(__file__).parent.resolve()


# TODO: actually test all models - takes time
parsed_models = (
("B_TO_2BARYON_SCALAR", ""),
("B_TO_LAMBDA_PBAR_GAMMA", ""),
Expand Down Expand Up @@ -140,6 +139,7 @@
("HQET3", [0.920, 1.205, 1.21, 1.404, 0.854]),
("HQET2", [1.18, 1.074]),
("HQET", [0.77, 1.33, 0.92]),
("HypNonLepton", [0.748, -6.5]),
("ISGW2", ""),
("ISGW", ""),
("KNUNU", ""),
Expand Down Expand Up @@ -419,10 +419,6 @@
)


def test_parsing_of_all_known_models_are_tested():
assert len(parsed_models) == len(known_decay_models)


@pytest.mark.parametrize(("decay_model", "expected_model_parameters"), parsed_models)
def test_model_parsing(decay_model: str, expected_model_parameters: str):
"""
Expand All @@ -437,3 +433,7 @@ def test_model_parsing(decay_model: str, expected_model_parameters: str):

assert get_model_name(parsed_Tree) == decay_model
assert get_model_parameters(parsed_Tree) == expected_model_parameters


def test_parsing_of_all_known_models_are_tested():
assert len(parsed_models) == len(known_decay_models)
Loading