{"id":18952688,"url":"https://github.com/compwa/gluex-amplitude","last_synced_at":"2025-04-16T01:34:21.606Z","repository":{"id":185136784,"uuid":"673052651","full_name":"ComPWA/gluex-amplitude","owner":"ComPWA","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-07T21:14:21.000Z","size":210,"stargazers_count":7,"open_issues_count":6,"forks_count":1,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-07T22:25:40.234Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://compwa.github.io/gluex-amplitude","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ComPWA.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-31T19:00:13.000Z","updated_at":"2025-01-29T15:10:29.000Z","dependencies_parsed_at":"2024-10-28T14:55:16.056Z","dependency_job_id":"6c3a8754-9697-4d94-bd38-4d25a12802d6","html_url":"https://github.com/ComPWA/gluex-amplitude","commit_stats":null,"previous_names":["redeboer/gluex-amplitude","compwa/gluex-amplitude"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ComPWA%2Fgluex-amplitude","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ComPWA%2Fgluex-amplitude/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ComPWA%2Fgluex-amplitude/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ComPWA%2Fgluex-amplitude/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ComPWA","download_url":"https://codeload.github.com/ComPWA/gluex-amplitude/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249182589,"owners_count":21226093,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T13:34:19.474Z","updated_at":"2025-04-16T01:34:21.299Z","avatar_url":"https://github.com/ComPWA.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Comparison repository for GlueX amplitude models\n\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)\n\nThis repository was created during PWA working group meetings for GlueX at Jefferson Lab, July 31st to August 4th, 2023. Live notes for these discussions can be found [here](https://hackmd.io/@QHYjhejHTIWXL2MltV3WNQ/r17prtBo3) on HackMD. Each meeting was organised like a 'hackathon' and the results of these programming sessions can be found on [compwa.github.io/gluex-amplitude](https://compwa.github.io/gluex-amplitude).\n\nThe main target for the week was to implement a simple intensity function for two-pseudoscalar system with photo-production:\n\n![](docs/fig/eq-gluex-two-pseudoscalar.svg)\n\nwhere $Z_{l}^{m}(\\Omega,\\Phi)=Y_{l}^{m}(\\Omega)e^{-i\\Phi}$ is a phase-rotated spherical harmonic, $\\Omega$ is the solid angle, $\\Phi$ is the angle between the production and polarization planes, $P_{\\gamma}$ is the polarization magnitude, $[l]$ are the partial wave amplitudes, $m$ is the associated m-projection, $k$ refers to a spin flip ($k=1$) or non-flip ($k=0$) at the nucleon vertex, and $\\kappa$ is an overall phase space factor.\n\nThe details for this model have been worked out in [10.1103/PhysRevD.100.054017](https://doi.org/10.1103/PhysRevD.100.054017) (2019).\n\n![](docs/fig/feynman-gluex-two-pseudoscalar.svg)\n\nThe amplitude model is implemented in [AmpTools](https://github.com/mashephe/AmpTools) and symbolically in Python using [SymPy](https://docs.sympy.org) with additional tools from [`amptools`](https://ampform.rtfd.io) ([ComPWA Project](https://compwa.github.io)). Dynamics are not yet included (model-indepedent by binning over energy). So we are just comparing linar combinations of spherical harmonics, but the comparison can be extended by investigating final states with a vector meson and/or parametrizing dynamic lineshapes.\n\n![](docs/fig/feynman-gluex-vector-meson.svg)\n\n## Installation\n\n### C++ implementation\n\nThis repository comes with [AmpTools](https://github.com/mashephe/AmpTools) as a submodule. If you clone this repository as:\n\n```shell\ngit clone https://github.com/compwa/gluex-amplitude --recurse-submodules\n```\n\nyou should get AmpTools as well. Navigate to [`extern/AmpTools`](./extern/AmpTools) for further build instructions. Additionally, you need to have ROOT installed. Official installation instructions can be found [here](https://root.cern/install), but alternatively, you can install ROOT in your conda environment (see [Python implementation](#python-implementation)) as follows:\n\n```shell\nconda activate gluex-amplitude\nconda install root -c conda-forge\n```\n\nThe benefit of AmpTools as a sub-module and installing ROOT into the conda environment is that you have out-of-the-box [language navigation in VSCode](https://code.visualstudio.com/docs/cpp/cpp-ide#_navigate-source-code).\n\nTo build all source code, you first need to compile AmpTools. Either do this by cloning AmpTools and following the instructions, or with:\n\n```shell\ncd extern/AmpTools\nmake\n```\n\nYou can then compile the code for this repository by navigating back to the root directory (`cd ../../`) and running:\n\n```\nmake\n```\n\n### Python implementation\n\nInstall Conda (recommended: [Miniconda](https://docs.conda.io/en/latest/miniconda.html#linux-installers)), then just create a Conda environment from [`environment.yml`](./environment.yml):\n\n```shell\nconda env create\nconda activate gluex-amplitude\npre-commit install --install-hooks  # optional\n```\n\nThe Python implementation mainly consists of Jupyter notebooks located under the [`docs`](./docs) folder. It's best to view, run, and edit them with VSCode or with\n\n```shell\njupyter lab\n```\n\nYou can also run all notebooks and render them as static HTML pages with [Jupyter Book](https://jupyterbook.org) as follows:\n\n```shell\njb build docs/ -W\n```\n\nOpen `docs/_build/html/index.html` to view the resulting HTML pages. In VSCode, you can view the output HTML files by searching for \"Live Preview: Start Server\" through the [command pallette](https://code.visualstudio.com/api/ux-guidelines/command-palette) (`Ctrl+Shift+P`).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompwa%2Fgluex-amplitude","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcompwa%2Fgluex-amplitude","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompwa%2Fgluex-amplitude/lists"}