From c741c80a3a81f44e20dd038fc5d703aa874b13aa Mon Sep 17 00:00:00 2001 From: Eduardo Rodrigues Date: Fri, 8 Sep 2023 17:49:55 +0200 Subject: [PATCH] Fix LHCb model name (#373) * Fix LHCb model name wrongly added * Add test of model * Actually add the dec file for the test! --- src/decaylanguage/data/decfile.lark | 2 +- src/decaylanguage/dec/enums.py | 2 +- tests/data/models/model-D0MIXDALITZ.dec | 14 ++++++++++++++ tests/dec/test_known_decay_models.py | 4 ++-- 4 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 tests/data/models/model-D0MIXDALITZ.dec diff --git a/src/decaylanguage/data/decfile.lark b/src/decaylanguage/data/decfile.lark index 2dc14577..fd78653c 100644 --- a/src/decaylanguage/data/decfile.lark +++ b/src/decaylanguage/data/decfile.lark @@ -65,7 +65,7 @@ MODEL_NAME_AND_WS.2: MODEL_NAME _WS+ MODEL_NAME_AND_SC.2: MODEL_NAME _WS* _SEMICOLON+ MODEL_NAME_MULTILINE.2: MODEL_NAME NEWLINE _WS* -MODEL_NAME : "BaryonPCR"|"BC_SMN"|"BC_TMN"|"BC_VHAD"|"BC_VMN"|"BCL"|"BGL"|"BLLNUL"|"BNOCB0TO4PICP"|"BNOCBPTO3HPI0"|"BNOCBPTOKSHHH"|"BS_MUMUKK"|"BSTOGLLISRFSR"|"BSTOGLLMNT"|"BT02PI_CP_ISO"|"BTO3PI_CP"|"BTODDALITZCPK"|"BToDiBaryonlnupQCD"|"BTOSLLALI"|"BTOSLLBALL"|"BTOSLLMS"|"BTOSLLMSEXT"|"BTOVLNUBALL"|"BTOXSGAMMA"|"BTOXELNU"|"BTOXSLL"|"BQTOLLLLHYPERCP"|"BQTOLLLL"|"CB3PI-MPP"|"CB3PI-P00"|"D_DALITZ"|"D_hhhh"|"D0GAMMADALITZ"|"doKm"|"DToKpienu"|"ETAPRIME_DALITZ"|"ETA_DALITZ"|"ETA_FULLDALITZ"|"ETA_LLPIPI"|"ETA_PI0DALITZ"|"FLATQ2"|"FL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VS_PWAVE"|"XLL"|"YMSTOYNSPIPICLEO"|"YMSTOYNSPIPICLEOBOOST" // model : model_generic // model_helamp : "HELAMP" (SIGNED_NUMBER SIGNED_NUMBER)+ diff --git a/src/decaylanguage/dec/enums.py b/src/decaylanguage/dec/enums.py index 4b023f2e..946a8d8e 100644 --- a/src/decaylanguage/dec/enums.py +++ b/src/decaylanguage/dec/enums.py @@ -53,7 +53,7 @@ class PhotosEnum(IntEnum): "D_DALITZ", "D_hhhh", "D0GAMMADALITZ", - "doKm", + "D0MIXDALITZ", "DToKpienu", "ETAPRIME_DALITZ", "ETA_DALITZ", diff --git a/tests/data/models/model-D0MIXDALITZ.dec b/tests/data/models/model-D0MIXDALITZ.dec new file mode 100644 index 00000000..09d627e2 --- /dev/null +++ b/tests/data/models/model-D0MIXDALITZ.dec @@ -0,0 +1,14 @@ +# File for testing purposes. Contains a single decay mode with a specific model. + +# Mixing and CPV in mixing parameters. +Define x 0.00 +Define y 0.00 +Define reqp 1.00 +Define imqp 0.00 +Define doKm 0 + +Decay my-D0 +1.0 my-K_S0 pi+ pi- D0MIXDALITZ x y reqp imqp doKm; +Enddecay + +End diff --git a/tests/dec/test_known_decay_models.py b/tests/dec/test_known_decay_models.py index 58164b0d..bf487f62 100644 --- a/tests/dec/test_known_decay_models.py +++ b/tests/dec/test_known_decay_models.py @@ -69,7 +69,7 @@ def test_lark_file_model_list_consistency(): ("D_DALITZ", ""), ("D_hhhh", [11.0]), ("D0GAMMADALITZ", ""), - # ("doKm", ""), + ("D0MIXDALITZ", [0.0, 0.0, 1.0, 0.0, 0.0]), ("DToKpienu", ""), ("ETAPRIME_DALITZ", [-0.047, -0.069, 0.0, 0.073]), ("ETA_DALITZ", ""), @@ -160,7 +160,7 @@ def test_lark_file_model_list_consistency(): def test_parsing_of_all_known_models_are_tested(): assert ( - len(parsed_models) == len(known_decay_models) - 76 + len(parsed_models) == len(known_decay_models) - 75 ) # subtract for now the number of models not yet tested