Skip to content

Commit

Permalink
Add model testing for BTOXSGAMMA and BTOXSLL
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardo-rodrigues committed Aug 10, 2023
1 parent d860498 commit 7380fe3
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 10 deletions.
7 changes: 7 additions & 0 deletions tests/data/models/model-BTOXSGAMMA.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 B+
0.0003118 Xsu gamma BTOXSGAMMA 2;
Enddecay

End
7 changes: 7 additions & 0 deletions tests/data/models/model-BTOXSLL.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 B+
0.0000025 Xsu mu+ mu- PHOTOS BTOXSLL 4.8 0.2 0.0 0.41;
Enddecay

End
28 changes: 18 additions & 10 deletions tests/dec/test_known_decay_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ def test_lark_file_model_list_consistency():
# TODO: actually test all models - takes time
parsed_models = (
("BaryonPCR", [1.0, 1.0, 1.0, 1.0]),
("BC_SMN", ""),
("BC_TMN", ""),
("BC_VHAD", ""),
("BC_VMN", ""),
("BCL", ""),
("BGL", ""),
("BLLNUL", ""),
("BC_SMN", ""), # No dec file found in EvtGen repository
("BC_TMN", ""), # No dec file found in EvtGen repository
("BC_VHAD", ""), # No dec file found in EvtGen repository
("BC_VMN", ""), # No dec file found in EvtGen repository
("BCL", ""), # No dec file found in EvtGen repository
("BGL", ""), # No dec file found in EvtGen repository
("BLLNUL", ""), # No dec file found in EvtGen repository
("BNOCB0TO4PICP", ""),
("BNOCBPTO3HPI0", ""),
("BNOCBPTOKSHHH", ""),
Expand All @@ -59,9 +59,9 @@ def test_lark_file_model_list_consistency():
("BTOSLLMS", ""),
("BTOSLLMSEXT", ""),
("BTOVLNUBALL", ""),
("BTOXSGAMMA", ""),
("BTOXSGAMMA", [2.0]),
("BTOXELNU", ""),
("BTOXSLL", ""),
("BTOXSLL", [4.8, 0.2, 0.0, 0.41]),
("BQTOLLLLHYPERCP", ""),
("BQTOLLLL", ""),
("CB3PI-MPP", ""),
Expand Down Expand Up @@ -169,7 +169,15 @@ def test_model_parsing(decay_model: str, expected_model_parameters: str):
are parsed with no errors but, most importantly, correctly.
"""
# TODO: actually test all models - takes time
if decay_model not in {"BaryonPCR", "GOITY_ROBERTS", "LNUGAMMA", "PHSP", "SSD_CP"}:
if decay_model not in {
"BaryonPCR",
"BTOXSGAMMA",
"BTOXSLL",
"GOITY_ROBERTS",
"LNUGAMMA",
"PHSP",
"SSD_CP",
}:
pass
else:
dfp = DecFileParser(DIR / f"../data/models/model-{decay_model}.dec")
Expand Down

0 comments on commit 7380fe3

Please sign in to comment.