From ebda2a730a60093aedd2ab1dae0fe5f6d60248fd Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 12 Jun 2023 23:11:59 -0400 Subject: [PATCH 1/4] chore: update pre-commit hooks (#333) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 04239065..83a34473 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,7 +24,7 @@ repos: - id: end-of-file-fixer - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: "v0.0.270" + rev: "v0.0.272" hooks: - id: ruff args: ["--fix", "--show-fixes"] From b2a61bebd97d801cbe0a041ffc4ed1b7a57f6cea Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 20 Jun 2023 09:52:48 +0200 Subject: [PATCH 2/4] chore: update pre-commit hooks (#334) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/codespell-project/codespell: v2.2.4 → v2.2.5](https://github.com/codespell-project/codespell/compare/v2.2.4...v2.2.5) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 83a34473..c70557db 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -37,7 +37,7 @@ repos: additional_dependencies: [attrs, particle, importlib_resources, numpy, types-deprecated] - repo: https://github.com/codespell-project/codespell - rev: v2.2.4 + rev: v2.2.5 hooks: - id: codespell args: ["-L", "vertexes,unkown,te"] From b12f211c5e0f4bf1229c6534c9aacc3212a4151e Mon Sep 17 00:00:00 2001 From: Adam Morris Date: Wed, 28 Jun 2023 16:14:59 +0200 Subject: [PATCH 3/4] More EvtGen models and keywords (mostly for LHCb) (#336) * more models * Update enums.py * restore manual ordering of model names * annotate some keywords, add 2 missing ones * Fix little type --------- Co-authored-by: Eduardo Rodrigues --- src/decaylanguage/data/decfile.lark | 21 ++++++++++---- src/decaylanguage/dec/enums.py | 44 ++++++++++++++++++++++++++++- 2 files changed, 59 insertions(+), 6 deletions(-) diff --git a/src/decaylanguage/data/decfile.lark b/src/decaylanguage/data/decfile.lark index ce99265a..8fe48783 100644 --- a/src/decaylanguage/data/decfile.lark +++ b/src/decaylanguage/data/decfile.lark @@ -4,24 +4,34 @@ // or https://github.com/scikit-hep/decaylanguage for details. start : _NEWLINE* (line _NEWLINE+)+ ("End" _NEWLINE+)? -?line : define | pythia_def | jetset_def | model_alias | alias | chargeconj | commands | decay | cdecay | copydecay | setlspw +?line : define | particle_def | pythia_def | jetset_def | ls_def | model_alias | alias | chargeconj | commands | decay | cdecay | copydecay | setlspw | setlsbw | changemasslimit | inc_factor -pythia_def : "PythiaBothParam" LABEL ":" LABEL "=" (LABEL | SIGNED_NUMBER) +pythia_def : ("PythiaBothParam" | "PythiaAliasParam") LABEL ":" LABEL "=" (LABEL | SIGNED_NUMBER) jetset_def : "JetSetPar" LABEL "=" SIGNED_NUMBER +ls_def : ("LSFLAT" | "LSNONRELBW") label // Choose a lineshape for a particle + +inc_factor: ("IncludeBirthFactor" | "IncludeDecayFactor") label ("yes" | "no") // Presence of the birth/decay factor and form-factor + +setlsbw : "BlattWeisskopf" label value // Set Blatt-Weisskopf barrier factor for a lineshape + setlspw : "SetLineshapePW" label label label value cdecay : "CDecay" label define : "Define" label value +particle_def: "Particle" label value value // Set the mass and width of a paricle (in GeV) + model_alias : "ModelAlias" model_label model alias : "Alias" label label chargeconj : "ChargeConj" label label +changemasslimit : ("ChangeMassMin" | "ChangeMassMax") label value // Set upper/lower mass cuts on a lineshape + ?commands : global_photos global_photos : boolean_photos @@ -41,7 +51,7 @@ particle : LABEL // Add full particle parsing here model_label : LABEL model : (model_label _SEMICOLON+ | MODEL_NAME_AND_SC | MODEL_NAME_AND_WS model_options _SEMICOLON+) -model_options : (value | LABEL | _NEWLINE)+ +model_options : (value | LABEL | _NEWLINE | _COMMA)+ // model : model_generic // model_helamp : "HELAMP" (SIGNED_NUMBER SIGNED_NUMBER)+ @@ -55,6 +65,7 @@ model_options : (value | LABEL | _NEWLINE)+ // Disregard comments, (multiple) newlines and whitespace in parser tree _NEWLINE: ( /\r?\n[\t ]*/ | COMMENT ) _SEMICOLON: /;/ +_COMMA: /,/ _WS: WS_INLINE // Model names must either be followed by at least one whitespace (when they have model parameters) or a semicolon (without model parameters) @@ -63,9 +74,9 @@ _WS: WS_INLINE MODEL_NAME_AND_WS.2: MODEL_NAME _WS+ MODEL_NAME_AND_SC.2: MODEL_NAME _WS* _SEMICOLON+ -MODEL_NAME : "BaryonPCR"|"BCL"|"BGL"|"BT02PI_CP_ISO"|"BTO3PI_CP"|"BTOSLLALI"|"BTOSLLBALL"|"BTOXSGAMMA"|"BTOXSLL"|"CB3PI-MPP"|"CB3PI-P00"|"D_DALITZ"|"ETAPRIME_DALITZ"|"ETA_DALITZ"|"ETA_FULLDALITZ"|"ETA_PI0DALITZ"|"FLATQ2"|"GENERIC_DALITZ"|"GOITY_ROBERTS"|"HELAMP"|"HQET3"|"HQET2"|"HQET"|"ISGW2"|"ISGW"|"LbAmpGen"|"LLSW"|"MELIKHOV"|"OMEGA_DALITZ"|"PARTWAVE"|"PHSP"|"PI0_DALITZ"|"PROPSLPOLE"|"PVV_CPLH"|"PYCONT"|"PYTHIA"|"SLBKPOLE"|"SLN"|"SLPOLE"|"SSD_CP"|"SSD_DirectCP"|"SSS_CP"|"SSS_CP_PNG"|"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"|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_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" -LABEL : /[a-zA-Z0-9\/\-+*_()']+/ +LABEL : /[a-zA-Z0-9\/\-+*_()'~]+/ COMMENT : /[#][^\n]*/ // We should ignore comments diff --git a/src/decaylanguage/dec/enums.py b/src/decaylanguage/dec/enums.py index 43dc5142..4b023f2e 100644 --- a/src/decaylanguage/dec/enums.py +++ b/src/decaylanguage/dec/enums.py @@ -21,48 +21,86 @@ class PhotosEnum(IntEnum): # 'decaylanguage/data/decfile.lark'! known_decay_models = ( "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", + "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", "SSS_CP_PNG", + "SSS_CP", "SSS_CPT", "STS_CP", "STS", @@ -81,8 +119,10 @@ class PhotosEnum(IntEnum): "SVVHELCPMIX", "TAUHADNU", "TAULNUNU", + "TAUOLA", "TAUSCALARNU", "TAUVECTORNU", + "THREEBODYPHSP", "TSS", "TVP", "TVS_PWAVE", @@ -91,10 +131,12 @@ class PhotosEnum(IntEnum): "VSS_BMIX", "VSS_MIX", "VSS", + "VTOSLL", "VUB", "VVPIPI", "VVP", "VVS_PWAVE", + "XLL", "YMSTOYNSPIPICLEO", "YMSTOYNSPIPICLEOBOOST", ) From 8f52f3edae0b5f85c4fc6a21668b00664795bc06 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Wed, 28 Jun 2023 16:16:12 +0200 Subject: [PATCH 4/4] docs: add admorris as a contributor for code (#337) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> --- .all-contributorsrc | 12 +++++++++++- README.md | 3 +++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 05d666cb..0cf504bb 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -73,6 +73,15 @@ "code", "doc" ] + }, + { + "login": "admorris", + "name": "Adam Morris", + "avatar_url": "https://avatars.githubusercontent.com/u/15155249?v=4", + "profile": "https://gitlab.cern.ch/users/admorris", + "contributions": [ + "code" + ] } ], "contributorsPerLine": 7, @@ -80,5 +89,6 @@ "repoType": "github", "repoHost": "https://github.com", "projectName": "decaylanguage", - "projectOwner": "scikit-hep" + "projectOwner": "scikit-hep", + "commitType": "docs" } diff --git a/README.md b/README.md index 2564feeb..e441f168 100644 --- a/README.md +++ b/README.md @@ -275,6 +275,9 @@ We hereby acknowledge the contributors that made this project possible ([emoji k Moritz Bauer
Moritz Bauer

💻 FlorianReiss
FlorianReiss

💻 📖 + + Adam Morris
Adam Morris

💻 +