From afa6449469b9451d332ca52f2057df9d37c27bb8 Mon Sep 17 00:00:00 2001 From: Eduardo Rodrigues Date: Tue, 9 Jan 2024 17:49:13 +0100 Subject: [PATCH] Test the new functionality --- tests/data/defs-aliases-chargeconj.dec | 3 +++ tests/dec/test_dec.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/data/defs-aliases-chargeconj.dec b/tests/data/defs-aliases-chargeconj.dec index a5478a39..aa9692d4 100644 --- a/tests/data/defs-aliases-chargeconj.dec +++ b/tests/data/defs-aliases-chargeconj.dec @@ -280,6 +280,9 @@ LSNONRELBW rho0 BlattWeisskopf rho0 3.0 IncludeBirthFactor rho0 no IncludeDecayFactor rho0 yes +# Redefined particles only need to specify the mass, and the width is optional +Alias MyRho0 rho0 +Particle MyRho0 0.8 # Pythia 8 parameter modifications # (Very important that there are no blank spaces in the parameter string!) diff --git a/tests/dec/test_dec.py b/tests/dec/test_dec.py index 21a01f4d..e6399bff 100644 --- a/tests/dec/test_dec.py +++ b/tests/dec/test_dec.py @@ -157,7 +157,7 @@ def test_aliases_parsing(): p = DecFileParser(DIR / "../data/defs-aliases-chargeconj.dec") p.parse() - assert len(p.dict_aliases()) == 135 + assert len(p.dict_aliases()) == 136 def test_model_aliases_parsing(): @@ -197,6 +197,7 @@ def test_particle_property_definitions(): "MyK*0": {"mass": 0.892, "width": 0.051}, "MyPhi": {"mass": 1.02, "width": 0.004}, "rho0": {"mass": 0.8, "width": 0.2}, + "MyRho0": {"mass": 0.8, "width": 149.1}, }