diff --git a/src/decaylanguage/data/decfile.lark b/src/decaylanguage/data/decfile.lark index 086ae520..70bd5f5b 100644 --- a/src/decaylanguage/data/decfile.lark +++ b/src/decaylanguage/data/decfile.lark @@ -61,7 +61,7 @@ model_options : (value | LABEL | _NEWLINE | _COMMA)+ // Model names must either be followed by at least one whitespace (when they have model parameters) or a semicolon (without model parameters) // We must set priorities here to use lalr - match model name above label, and label above something else -MODEL_NAME.2 : ("B_TO_2BARYON_SCALAR"|"B_TO_LAMBDA_PBAR_GAMMA"|"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"|"D0MIXDALITZ"|"DToKpienu"|"ETAPRIME_DALITZ"|"ETA_DALITZ"|"ETA_FULLDALITZ"|"ETA_LLPIPI"|"ETA_PI0DALITZ"|"FLATQ2"|"FLATSQDALITZ"|"FOURBODYPHSP"|"GENERIC_DALITZ"|"GOITY_ROBERTS"|"HELAMP"|"HQET3"|"HQET2"|"HQET"|"ISGW2"|"ISGW"|"KS_PI0MUMU"|"Lb2Baryonlnu"|"Lb2plnuLCSR"|"Lb2plnuLQCD"|"LbAmpGen"|"LLSW"|"LNUGAMMA"|"MELIKHOV"|"OMEGA_DALITZ"|"PARTWAVE"|"PHI_DALITZ"|"PHSPDECAYTIMECUT"|"PHSPFLATLIFETIME"|"PHS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ALITZ"|"D0MIXDALITZ"|"DToKpienu"|"ETAPRIME_DALITZ"|"ETA_DALITZ"|"ETA_FULLDALITZ"|"ETA_LLPIPI"|"ETA_PI0DALITZ"|"FLATQ2"|"FLATSQDALITZ"|"FOURBODYPHSP"|"GENERIC_DALITZ"|"GOITY_ROBERTS"|"HELAMP"|"HQET3"|"HQET2"|"HQET"|"ISGW2"|"ISGW"|"KNUNU"|"KSTARNUNU_REV"|"KS_PI0MUMU"|"Lb2Baryonlnu"|"Lb2plnuLCSR"|"Lb2plnuLQCD"|"LbAmpGen"|"LLSW"|"LNUGAMMA"|"MELIKHOV"|"OMEGA_DALITZ"|"PARTWAVE"|"PHI_DALITZ"|"PHSPDECAYTIMECUT"|"PHSPFLATLIFETIME"|"PHSP_BB_MIX"|"PHSP_B_MIX"|"PHSP_CP"|"PHSP"|"PI0_DALITZ"|"PROPSLPOLE"|"PTO3P"|"PVV_CPLH"|"PYCONT"|"PYTHIA"|"RareLbToLll"|"SLBKPOLE"|"SLL"|"SLN"|"SLPOLE"|"SSD_CP"|"SSD_DirectCP"|"SSS_CP_PNG"|"SSS_CP"|"SSS_CPT"|"STS_CP"|"STS"|"SVP_CP"|"SVP_HELAMP"|"SVP"|"SVS_CP_ISO"|"SVS_CPLH"|"SVS_CP"|"SVS_NONCPEIGEN"|"SVS"|"SVV_CPLH"|"SVV_CP"|"SVV_HELAMP"|"SVV_NONCPEIGEN"|"SVVHELCPMIX"|"TAUHADNU"|"TAULNUNU"|"TAUOLA"|"TAUSCALARNU"|"TAUVECTORNU"|"THREEBODYPHSP"|"TSS"|"TVP"|"TVS_PWAVE"|"VECTORISR"|"VLL"|"VSP_PWAVE"|"VSS_BMIX"|"VSS_MIX"|"VSS"|"VTOSLL"|"VUB_BLNP"|"VUB"|"VVPIPI"|"VVP"|"VVS_PWAVE"|"XLL"|"YMSTOYNSPIPICLEO"|"YMSTOYNSPIPICLEOBOOST")/\b/ // Terminal definitions // To use a fast parser, we need to avoid conflicts diff --git a/src/decaylanguage/dec/enums.py b/src/decaylanguage/dec/enums.py index 45a94e19..8d8465ed 100644 --- a/src/decaylanguage/dec/enums.py +++ b/src/decaylanguage/dec/enums.py @@ -33,6 +33,8 @@ class PhotosEnum(IntEnum): "BNOCB0TO4PICP", "BNOCBPTO3HPI0", "BNOCBPTOKSHHH", + "BSTD_2HDMTYPE2", + "BSTD", "BS_MUMUKK", "BSTOGLLISRFSR", "BSTOGLLMNT", @@ -45,9 +47,10 @@ class PhotosEnum(IntEnum): "BTOSLLMS", "BTOSLLMSEXT", "BTOVLNUBALL", - "BTOXSGAMMA", "BTOXELNU", + "BTOXSGAMMA", "BTOXSLL", + "BTOXSNUNU_FERMI", "BQTOLLLLHYPERCP", "BQTOLLLL", "CB3PI-MPP", @@ -73,6 +76,8 @@ class PhotosEnum(IntEnum): "HQET", "ISGW2", "ISGW", + "KNUNU", + "KSTARNUNU_REV", "KS_PI0MUMU", "Lb2Baryonlnu", "Lb2plnuLCSR", @@ -86,6 +91,9 @@ class PhotosEnum(IntEnum): "PHI_DALITZ", "PHSPDECAYTIMECUT", "PHSPFLATLIFETIME", + "PHSP_BB_MIX", + "PHSP_B_MIX", + "PHSP_CP", "PHSP", "PI0_DALITZ", "PROPSLPOLE", @@ -127,12 +135,14 @@ class PhotosEnum(IntEnum): "TSS", "TVP", "TVS_PWAVE", + "VECTORISR", "VLL", "VSP_PWAVE", "VSS_BMIX", "VSS_MIX", "VSS", "VTOSLL", + "VUB_BLNP", "VUB", "VVPIPI", "VVP", diff --git a/tests/data/models/model-BSTD.dec b/tests/data/models/model-BSTD.dec new file mode 100644 index 00000000..69309d48 --- /dev/null +++ b/tests/data/models/model-BSTD.dec @@ -0,0 +1,47 @@ +# File for testing purposes. Contains a single decay mode with a specific model. + +# Wilson coefficients for New Physics contributions +# Each Wilson coefficient is calculated by +# CXX = MagCXX * exp( ArgCXX * i ) +# Negative value of MagCXX is allowed. +# all CXX = 0 --> Standard Model +Define MagCV1 0 +Define ArgCV1 0 +Define MagCV2 0 +Define ArgCV2 0 +Define MagCS1 0 +Define ArgCS1 0 +Define MagCS2 0 +Define ArgCS2 0 +Define MagCT 0 +Define ArgCT 0 + +# quark masses at the m_b scale +# taken from PRD77, 113016 (2008) +# m_b = 4.20+/-0.07 GeV/c^2 +# m_c = 0.901+0.111-0.113 GeV/c^2 +Define m_b 4.20 +Define m_c 0.901 + +# HQET Form Factor parameters from B->D(*)lnu data +# taken from HFAG End Of Year 2011 +# rho_1^2 = 1.186 +/- 0.036 +/- 0.041 +# rho_A1^2 = 1.207 +/- 0.015 +/- 0.021 +# R_1(1) = 1.403 +/- 0.033 +# R_2(1) = 0.854 +/- 0.020 +Define rho12 1.186 +Define rhoA12 1.207 +Define R11 1.403 +Define R21 0.854 + +# Parameters related to the O(1/m_q) correction in the scalar form factors +# The authors of PRD87,034028 use 1 +/- 1 for these values to take into account the theoretical error. +Define aS1 1.0 +Define aR3 1.0 + +Decay B- +0.5 D*0 tau- anti-nu_tau BSTD rhoA12 R11 R21 aR3 m_b m_c MagCV1 ArgCV1 MagCV2 ArgCV2 MagCS1 ArgCS1 MagCS2 ArgCS2 MagCT ArgCT; +#0.5 D0 tau- anti-nu_tau BSTD rho12 aS1 m_b m_c MagCV1 ArgCV1 MagCV2 ArgCV2 MagCS1 ArgCS1 MagCS2 ArgCS2 MagCT ArgCT; +Enddecay + +End diff --git a/tests/data/models/model-BSTD_2HDMTYPE2.dec b/tests/data/models/model-BSTD_2HDMTYPE2.dec new file mode 100644 index 00000000..099f63ec --- /dev/null +++ b/tests/data/models/model-BSTD_2HDMTYPE2.dec @@ -0,0 +1,34 @@ +# File for testing purposes. Contains a single decay mode with a specific model. + +# HQET Form Factor parameters from B->D(*)lnu data +# taken from HFAG End Of Year 2011 +# rho_1^2 = 1.186 +/- 0.036 +/- 0.041 +# rho_A1^2 = 1.207 +/- 0.015 +/- 0.021 +# R_1(1) = 1.403 +/- 0.033 +# R_2(1) = 0.854 +/- 0.020 +Define rho12 1.186 +Define rhoA12 1.207 +Define R11 1.403 +Define R21 0.854 + +# Parameters related to the O(1/m_q) correction in the scalar form factors +# The authors of PRD87,034028 use 1 +/- 1 for these values to take into account the theoretical error. +Define aS1 1.0 +Define aR3 1.0 + +# quark masses at the m_b scale +# taken from PRD77, 113016 (2008) +# m_b = 4.20+/-0.07 GeV/c^2 +# m_c = 0.901+0.111-0.113 GeV/c^2 +Define m_b 4.20 +Define m_c 0.901 + +# (GeV/c^2)^-1 +Define tanBeta/m_H+ 0.5 + +Decay B0 +0.5 D*- tau+ nu_tau BSTD_2HDMTYPE2 rhoA12 R11 R21 aR3 m_b m_c tanBeta/m_H+; +#0.5 D- tau+ nu_tau BSTD_2HDMTYPE2 rho12 aS1 m_b m_c tanBeta/m_H+; +Enddecay + +End diff --git a/tests/data/models/model-BTOXSNUNU_FERMI.dec b/tests/data/models/model-BTOXSNUNU_FERMI.dec new file mode 100644 index 00000000..58928bdd --- /dev/null +++ b/tests/data/models/model-BTOXSNUNU_FERMI.dec @@ -0,0 +1,7 @@ +# File for testing purposes. Contains a single decay mode with a specific model. + +Decay B0sig + 1.0 Xsd anti-nu_e nu_e BTOXSNUNU_FERMI 0.1 0.0 0.461 1.1 4.68 0.1; +Enddecay + +End diff --git a/tests/data/models/model-KNUNU.dec b/tests/data/models/model-KNUNU.dec new file mode 100644 index 00000000..b27acaa4 --- /dev/null +++ b/tests/data/models/model-KNUNU.dec @@ -0,0 +1,7 @@ +# File for testing purposes. Contains a single decay mode with a specific model. + +Decay B0sig + 1.0 K0 nu_e anti-nu_e KNUNU; +Enddecay + +End diff --git a/tests/data/models/model-KSTARNUNU_REV.dec b/tests/data/models/model-KSTARNUNU_REV.dec new file mode 100644 index 00000000..9ce789c1 --- /dev/null +++ b/tests/data/models/model-KSTARNUNU_REV.dec @@ -0,0 +1,7 @@ +# File for testing purposes. Contains a single decay mode with a specific model. + +Decay B0 + 1.0 K*0 nu_e anti-nu_e KSTARNUNU_REV; +Enddecay + +End diff --git a/tests/data/models/model-PHSP_BB_MIX.dec b/tests/data/models/model-PHSP_BB_MIX.dec new file mode 100644 index 00000000..dceed878 --- /dev/null +++ b/tests/data/models/model-PHSP_BB_MIX.dec @@ -0,0 +1,9 @@ +# File for testing purposes. Contains a single decay mode with a specific model. + +Define dm_B0 0.5065e12 + +Decay Upsilon(5S) + 0.20219 B0heavy anti-B0heavy PHSP_BB_MIX dm_B0 -1; +Enddecay + +End diff --git a/tests/data/models/model-PHSP_B_MIX.dec b/tests/data/models/model-PHSP_B_MIX.dec new file mode 100644 index 00000000..ab7e6f98 --- /dev/null +++ b/tests/data/models/model-PHSP_B_MIX.dec @@ -0,0 +1,9 @@ +# File for testing purposes. Contains a single decay mode with a specific model. + +Define dm_B0 0.5065e12 + +Decay Upsilon(5S) +0.00013 B0long B- pi+ anti-B0long PHSP_B_MIX dm_B0 ; +Enddecay + +End diff --git a/tests/data/models/model-PHSP_CP.dec b/tests/data/models/model-PHSP_CP.dec new file mode 100644 index 00000000..66a768a3 --- /dev/null +++ b/tests/data/models/model-PHSP_CP.dec @@ -0,0 +1,10 @@ +# File for testing purposes. Contains a single decay mode with a specific model. + +Define minusTwoBeta -0.78 +Define dm 0.507e12 + +Decay B0 +1.0 K_S0 K_S0 K_S0 PHSP_CP minusTwoBeta dm 1 1.0 0.0 1.0 0.0; +Enddecay + +End diff --git a/tests/data/models/model-VECTORISR.dec b/tests/data/models/model-VECTORISR.dec new file mode 100644 index 00000000..8fe48b94 --- /dev/null +++ b/tests/data/models/model-VECTORISR.dec @@ -0,0 +1,7 @@ +# File for testing purposes. Contains a single decay mode with a specific model. + +Decay vpho + 1.0 Upsilon(4S) gamma VECTORISR -1 1; +Enddecay + +End diff --git a/tests/data/models/model-VUB_BLNP.dec b/tests/data/models/model-VUB_BLNP.dec new file mode 100644 index 00000000..b41cd68f --- /dev/null +++ b/tests/data/models/model-VUB_BLNP.dec @@ -0,0 +1,7 @@ +# File for testing purposes. Contains a single decay mode with a specific model. + +Decay B0sig + 0.002050 Xu- mu+ nu_mu PHOTOS VUB_BLNP 4.2281 0.7535 0.4366 1.5 1.5 1 1 1 1 1; +Enddecay + +End diff --git a/tests/dec/test_known_decay_models.py b/tests/dec/test_known_decay_models.py index c57f7de2..ab4c3230 100644 --- a/tests/dec/test_known_decay_models.py +++ b/tests/dec/test_known_decay_models.py @@ -81,6 +81,8 @@ def test_lark_file_model_list_consistency(): 1, ], ), + ("BSTD_2HDMTYPE2", [1.207, 1.403, 0.854, 1.0, 4.20, 0.901, 0.5]), + ("BSTD", [1.207, 1.403, 0.854, 1.0, 4.20, 0.901, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), ( "BSTOGLLISRFSR", [5.0, 5, 0, 0, 1, 0.000001, 0.8250, 0.22509, 0.1598, 0.3499, 4.5], @@ -98,7 +100,6 @@ def test_lark_file_model_list_consistency(): ("BTOSLLMS", [5.0, 5.0, 0.0, 1.0, 0.88, 0.227, 0.22, 0.34]), ("BTOSLLMSEXT", [5.0, 5.0, 0.0, 1.0, 0.88, 0.227, 0.22, 0.34, 1.0, 0.0, -1.0, 0.0]), ("BTOVLNUBALL", [0.308, 36.54, -0.054, 0.288, 48.94, 1.484, -1.049, 39.52]), - ("BTOXSGAMMA", [2.0]), ( "BTOXELNU", [ @@ -116,7 +117,9 @@ def test_lark_file_model_list_consistency(): 1.907, ], ), + ("BTOXSGAMMA", [2.0]), ("BTOXSLL", [4.8, 0.2, 0.0, 0.41]), + ("BTOXSNUNU_FERMI", [0.1, 0.0, 0.461, 1.1, 4.68, 0.1]), ( "BQTOLLLLHYPERCP", [ @@ -160,6 +163,8 @@ def test_lark_file_model_list_consistency(): ("HQET", [0.77, 1.33, 0.92]), ("ISGW2", ""), ("ISGW", ""), + ("KNUNU", ""), + ("KSTARNUNU_REV", ""), ("KS_PI0MUMU", [1.2, 0.49, -3.9, 0.2, 2.5]), ("Lb2Baryonlnu", [1.0, 1.0, 1.0, 1.0]), ("Lb2plnuLCSR", [1.0, 1.0, 1.0, 1.0]), @@ -173,6 +178,9 @@ def test_lark_file_model_list_consistency(): ("PHI_DALITZ", ""), ("PHSPDECAYTIMECUT", [0.29]), ("PHSPFLATLIFETIME", [12]), + ("PHSP_BB_MIX", [0.5065e12, -1]), + ("PHSP_B_MIX", [0.5065e12]), + ("PHSP_CP", [-0.78, 0.507e12, 1, 1.0, 0.0, 1.0, 0.0]), ("PHSP", ""), ("PI0_DALITZ", ""), ( @@ -414,12 +422,14 @@ def test_lark_file_model_list_consistency(): ("TSS", ""), ("TVP", ""), ("TVS_PWAVE", [0, 0, 1, 0, 0, 0.0]), + ("VECTORISR", [-1, 1]), ("VLL", ""), ("VSP_PWAVE", ""), ("VSS_BMIX", [507000000000.0]), ("VSS_MIX", [507000000000.0]), ("VSS", ""), ("VTOSLL", ""), + ("VUB_BLNP", [4.2281, 0.7535, 0.4366, 1.5, 1.5, 1, 1, 1, 1, 1]), ("VUB", [4.691, 1.869, 0.22, 1.0, 0.28, 1.0]), ("VVPIPI", ""), ("VVP", [1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]),