Skip to content

Commit

Permalink
Fix LHCb model name (#373)
Browse files Browse the repository at this point in the history
* Fix LHCb model name wrongly added

* Add test of model

* Actually add the dec file for the test!
  • Loading branch information
eduardo-rodrigues authored Sep 8, 2023
1 parent 974e34e commit c741c80
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/decaylanguage/data/decfile.lark
Original file line number Diff line number Diff line change
Expand Up @@ -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"|"FLATSQDALITZ"|"FOURBODYPHSP"|"GENERIC_DALITZ"|"GOITY_ROBERTS"|"HELAMP"|"HQET3"|"HQET2"|"HQET"|"imqp"|"ISGW2"|"ISGW"|"KS_PI0MUMU"|"Lb2Baryonlnu"|"Lb2plnuLCSR"|"Lb2plnuLQCD"|"LbAmpGen"|"LLSW"|"LNUGAMMA"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ALITZ"|"DToKpienu"|"ETAPRIME_DALITZ"|"ETA_DALITZ"|"ETA_FULLDALITZ"|"ETA_LLPIPI"|"ETA_PI0DALITZ"|"FLATQ2"|"FLATSQDALITZ"|"FOURBODYPHSP"|"GENERIC_DALITZ"|"GOITY_ROBERTS"|"HELAMP"|"HQET3"|"HQET2"|"HQET"|"imqp"|"ISGW2"|"ISGW"|"KS_PI0MUMU"|"Lb2Baryonlnu"|"Lb2plnuLCSR"|"Lb2plnuLQCD"|"LbAmpGen"|"LLSW"|"LNUGAMMA"|"LQCD"|"MELIKHOV"|"OMEGA_DALITZ"|"PARTWAVE"|"PHI_DALITZ"|"PHSPDECAYTIMECUT"|"PHSPFLATLIFETIME"|"PHSP"|"PI0_DALITZ"|"PROPSLPOLE"|"PTO3P"|"PVV_CPLH"|"PYCONT"|"PYTHIA"|"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"|"VLL"|"VSP_PWAVE"|"VSS_BMIX"|"VSS_MIX"|"VSS"|"VTOSLL"|"VUB"|"VVPIPI"|"VVP"|"VVS_PWAVE"|"XLL"|"YMSTOYNSPIPICLEO"|"YMSTOYNSPIPICLEOBOOST"

// model : model_generic
// model_helamp : "HELAMP" (SIGNED_NUMBER SIGNED_NUMBER)+
Expand Down
2 changes: 1 addition & 1 deletion src/decaylanguage/dec/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class PhotosEnum(IntEnum):
"D_DALITZ",
"D_hhhh",
"D0GAMMADALITZ",
"doKm",
"D0MIXDALITZ",
"DToKpienu",
"ETAPRIME_DALITZ",
"ETA_DALITZ",
Expand Down
14 changes: 14 additions & 0 deletions tests/data/models/model-D0MIXDALITZ.dec
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions tests/dec/test_known_decay_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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", ""),
Expand Down Expand Up @@ -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


Expand Down

0 comments on commit c741c80

Please sign in to comment.