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

Test suite to verify all EvtGen models are parsed correctly - take 5 #380

Merged
merged 2 commits into from
Oct 13, 2023
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
7 changes: 7 additions & 0 deletions tests/data/models/model-BCL.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+sig
0.000078 pi0 e+ nu_e PHOTOS BCL 0.419 -0.495 -0.43 0.22 0.510 -1.700 1.53 4.52;
Enddecay

End
7 changes: 7 additions & 0 deletions tests/data/models/model-BGL.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 anti-B0sig
0.051100000 D*+sig mu- anti-nu_mu BGL 0.02596 -0.06049 0.01311 0.01713 0.00753 -0.09346;
Enddecay

End
7 changes: 7 additions & 0 deletions tests/data/models/model-BLLNUL.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+
1.000 e- e+ nu_mu mu+ BLLNUL 0.026 0.01 2.9;
Enddecay

End
7 changes: 7 additions & 0 deletions tests/data/models/model-BNOCBPTOKSHHH.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 B0
1.0 K+ K- pi+ pi- BNOCBPTOKSHHH;
Enddecay

End
31 changes: 31 additions & 0 deletions tests/data/models/model-BSTOGLLISRFSR.dec
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# File for testing purposes. Contains a single decay mode with a specific model.


# Documentation:
# ISR contribution only
# Input parameters mu - the scale parameter (in GeV's)
# Nf - number of "effective" flavors (for b-quark Nf=5)
# sr - state radiation type
# res_swch - resonant switching parameter
# ias - switching parameter for \alpha_s(M_Z) value
# Wolfenstein parameterization for CKM matrix
# Egamma - minimum energy of the photon (in GeV)
# mumumass_min - minimum invariant mass of the two muons (in GeV)
# EndDocumentation
Define mu 5.0
Define Nf 5
Define sr 0
Define res_swch 0
Define ias 1
Define Egamma 0.000001
Define A 0.8250
Define lambda 0.22509
Define barrho 0.1598
Define bareta 0.3499
Define mumumass_min 4.5

Decay B0
1.000 gamma mu+ mu- BSTOGLLISRFSR mu Nf sr res_swch ias Egamma A lambda barrho bareta mumumass_min;
Enddecay

End
17 changes: 17 additions & 0 deletions tests/data/models/model-BSTOGLLMNT.dec
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# File for testing purposes. Contains a single decay mode with a specific model.

Define mu 5.0
Define Nf 5
Define res_swch 1
Define ias 1
Define Egamma 0.02
Define A 0.88
Define lambda 0.227
Define barrho 0.22
Define bareta 0.34

Decay B_s0
1.000 gamma e+ e- BSTOGLLMNT mu Nf res_swch ias Egamma A lambda barrho bareta;
Enddecay

End
7 changes: 7 additions & 0 deletions tests/data/models/model-BS_MUMUKK.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_s0
1.0 mu+ mu- K+ K- BS_MUMUKK 0., 0., -0.03, 1., 0.11, 3.315, -0.03, 1., 0.5241, 0., -0.03, 1., 0.2504, 0.06159, -0.03, 1., -3.26, -0.03, 1., 0.6603, 0.0805, 17.7, 0.9499, 1.2, 1;
Enddecay

End
10 changes: 10 additions & 0 deletions tests/data/models/model-BTO3PI_CP.dec
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# File for testing purposes. Contains a single decay mode with a specific model.

Define dm 0.507e12
Define alpha 1.365

Decay B0sig
1.0 pi+ pi- pi0 BTO3PI_CP dm alpha;
Enddecay

End
12 changes: 12 additions & 0 deletions tests/data/models/model-BTODDALITZCPK.dec
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# File for testing purposes. Contains a single decay mode with a specific model.

# CPV parameters.
Define gamma 1.22 # 70 degrees
Define delta 2.27 # 130 degrees
Define rB 0.10

Decay B+sig
1.000 my-anti-D0 K+ BTODDALITZCPK gamma delta rB;
Enddecay

End
7 changes: 7 additions & 0 deletions tests/data/models/model-BToDiBaryonlnupQCD.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-
1.0 p+ anti-p- tau- anti-nu_tau PHOTOS BToDiBaryonlnupQCD 67.7 -280.0 -38.3 -840.0 -10.1 -157.0 800000;
Enddecay

End
56 changes: 44 additions & 12 deletions tests/dec/test_known_decay_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,51 @@ def test_lark_file_model_list_consistency():
("BC_TMN", [3.0]),
("BC_VHAD", [1.0]),
("BC_VMN", [2.0]),
# ("BCL", ""),
# ("BGL", ""),
# ("BLLNUL", ""),
("BCL", [0.419, -0.495, -0.43, 0.22, 0.51, -1.70, 1.53, 4.52]),
("BGL", [0.02596, -0.06049, 0.01311, 0.01713, 0.00753, -0.09346]),
("BLLNUL", [0.026, 0.01, 2.9]),
("BNOCB0TO4PICP", [-1.507964474, 0.5065e12, 0.0, 1.1, 0.0, 1.86965]),
("BNOCBPTO3HPI0", [0.0, 2.0, 0.0, 2.0]),
# ("BNOCBPTOKSHHH", ""),
# ("BS_MUMUKK", ""),
# ("BSTOGLLISRFSR", ""),
# ("BSTOGLLMNT", ""),
# ("BT02PI_CP_ISO", ""),
# ("BTO3PI_CP", ""),
# ("BTODDALITZCPK", ""),
# ("BToDiBaryonlnupQCD", ""),
("BNOCBPTOKSHHH", ""),
(
"BS_MUMUKK",
[
0.0,
0.0,
-0.03,
1.0,
0.11,
3.315,
-0.03,
1.0,
0.5241,
0.0,
-0.03,
1.0,
0.2504,
0.06159,
-0.03,
1.0,
-3.26,
-0.03,
1.0,
0.6603,
0.0805,
17.7,
0.9499,
1.2,
1,
],
),
(
"BSTOGLLISRFSR",
[5.0, 5, 0, 0, 1, 0.000001, 0.8250, 0.22509, 0.1598, 0.3499, 4.5],
),
("BSTOGLLMNT", [5.0, 5, 1, 1, 0.02, 0.88, 0.227, 0.22, 0.34]),
# ("BT02PI_CP_ISO", ""), # No dec file available from LHCb or Belle-II
("BTO3PI_CP", [0.507e12, 1.365]),
("BTODDALITZCPK", [1.22, 2.27, 0.10]),
("BToDiBaryonlnupQCD", [67.7, -280.0, -38.3, -840.0, -10.1, -157.0, 800000]),
# ("BTOSLLALI", ""),
# ("BTOSLLBALL", ""),
("BTOSLLMS", [5.0, 5.0, 0.0, 1.0, 0.88, 0.227, 0.22, 0.34]),
Expand Down Expand Up @@ -160,7 +192,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) - 75
len(parsed_models) == len(known_decay_models) - 65
) # subtract for now the number of models not yet tested


Expand Down