diff --git a/src/decaylanguage/data/decfile.lark b/src/decaylanguage/data/decfile.lark index 1bb7746c..beeb467b 100644 --- a/src/decaylanguage/data/decfile.lark +++ b/src/decaylanguage/data/decfile.lark @@ -6,17 +6,17 @@ start : _NEWLINE* (line _NEWLINE+)* ("End" _NEWLINE+)? ?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 : LABEL_PYTHIA_PARAMETERS LABEL ":" LABEL "=" (LABEL | SIGNED_NUMBER) +pythia_def : LABEL_PYTHIA8_COMMANDS LABEL ":" LABEL "=" (LABEL | SIGNED_NUMBER) // Pythia 8 commands +LABEL_PYTHIA8_COMMANDS : "PythiaAliasParam" | "PythiaBothParam" | "PythiaGenericParam" -LABEL_PYTHIA_PARAMETERS : "PythiaBothParam" | "PythiaAliasParam" - -jetset_def : "JetSetPar" LABEL "=" SIGNED_NUMBER +jetset_def : "JetSetPar" LABEL "=" SIGNED_NUMBER // Old Pythia 6 commands ls_def : LABEL_LINESHAPE LABEL // Choose a lineshape for a particle +LABEL_LINESHAPE : "LSFLAT" | "LSNONRELBW" | "LSMANYDELTAFUNC" // Lineshape flat | non-relativistic BW, spikes -LABEL_LINESHAPE : "LSFLAT" | "LSNONRELBW" | "LSMANYDELTAFUNC" - -inc_factor: ("IncludeBirthFactor" | "IncludeDecayFactor") label ("yes" | "no") // Presence of the birth/decay momentum factor and form-factor +inc_factor: LABEL_INCLUDE_FACTOR LABEL BOOLEAN_INCLUDE_FACTOR // Presence of the birth/decay momentum factor and form-factor +LABEL_INCLUDE_FACTOR : "IncludeBirthFactor" | "IncludeDecayFactor" +BOOLEAN_INCLUDE_FACTOR : "yes" | "no" setlsbw : "BlattWeisskopf" LABEL SIGNED_NUMBER // Set Blatt-Weisskopf barrier factor for a lineshape @@ -26,7 +26,7 @@ cdecay : "CDecay" LABEL define : "Define" LABEL SIGNED_NUMBER -particle_def: "Particle" label value value // Set the mass and width of a particle (in GeV) +particle_def: "Particle" LABEL SIGNED_NUMBER SIGNED_NUMBER // Set the mass and width of a particle (in GeV) model_alias : "ModelAlias" model_label model @@ -35,7 +35,6 @@ alias : "Alias" LABEL LABEL chargeconj : "ChargeConj" LABEL LABEL changemasslimit : LABEL_CHANGE_MASS LABEL SIGNED_NUMBER // Set upper/lower mass cuts on a lineshape - LABEL_CHANGE_MASS : "ChangeMassMin" | "ChangeMassMax" ?commands : global_photos diff --git a/src/decaylanguage/dec/dec.py b/src/decaylanguage/dec/dec.py index c1997d5b..bdd7a726 100644 --- a/src/decaylanguage/dec/dec.py +++ b/src/decaylanguage/dec/dec.py @@ -384,14 +384,16 @@ def get_particle_property_definitions(self) -> dict[str, dict[str, float]]: def dict_pythia_definitions(self) -> dict[str, dict[str, str | float]]: """ - Return a dictionary of all Pythia definitions, with keys corresponding to the types - = "PythiaBothParam" and/or "PythiaAliasParam", - set in the input parsed file with statements of the form - " =