بنقرة واحدة
madgraph
MadGraph5_aMC@NLO — process generation, card writing/editing, event generation, LHE parsing, parameter scans
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
MadGraph5_aMC@NLO — process generation, card writing/editing, event generation, LHE parsing, parameter scans
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Numerically evaluate a FormCalc-reduced one-loop amplitude with LoopTools 2.16 (Passarino-Veltman integrals via the Wolfram/LoopTools MathLink) and emit a scattering/v1 JSON (σ_SI, σ_SD) for direct detection. Unblocks the 2HDM+a loop-only DD path. Self-heals via _shared/installs/looptools preflight.
Reduce a FeynArts amplitude list with FormCalc 9.10. Produces amp_reduced.m and amp_reduced.meta.json sidecar conforming to amp_reduced.meta/v1. Self-heals via _shared/installs/formcalc preflight.
Generate Feynman diagrams and amplitudes using FeynArts 3.11. Supports built-in models (SM, SMQCD, THDM, MSSM) and SARAH-generated models. Outputs FeynAmpList.m, diagrams.pdf, topologies.json, and metadata sidecar.
Compute direct-detection likelihoods and 90%-CL exclusion verdicts using DDCalc 2.2.0. Leaf consumer of scattering/v1 JSON from /micromegas or /formcalc.
MadDM — dark matter relic density, direct detection cross-sections, indirect detection rates, parameter scans with experimental limit comparison
Run HiggsBounds-5 + HiggsSignals-2 constraint checks on a model SLHA file. Computes hb_allowed (per-channel AND), hs_consistent (Δχ² < 6.18), p-values, and per-channel CSV. Supports single-point and scan-directory modes.
| name | madgraph |
| description | MadGraph5_aMC@NLO — process generation, card writing/editing, event generation, LHE parsing, parameter scans |
Full interface for MadGraph5_aMC@NLO (MG5): define processes, write cards, generate events, parse LHE output, and run parameter scans. Covers leading-order and next-to-leading-order generation with any UFO model.
MG5 is the starting point of the HEP Monte Carlo chain. It computes hard-process matrix elements and generates parton-level events in LHE format. Parton showering and hadronization of the LHE output is left to an external Pythia8 driver (a dedicated pythia-config skill is on the roadmap). For dark matter relic density and detection rates using a MG5 plugin, use the maddm skill.
Before any other action, run:
bash plugins/hep-ph-toolkit/_shared/installs/madgraph/detect.sh
plugins/hep-ph-toolkit/_shared/installs/madgraph/INSTALL.md into context and follow it (or
invoke /install madgraph). When the install completes, re-run
detect.sh before proceeding. If it still fails, halt with the
blocker code from the install reference.What are you trying to do?
If the user says use <name>, /madgraph use dark_su3, or --model <name>,
resolve registered paths before writing any MG5 script:
UFO = python3 scripts/resolve_named_model.py <name> --key ufo
SLHA = python3 scripts/resolve_named_model.py <name> --key latest_slha
UFO is non-empty, use import model <UFO> in the generated MG5 script.SLHA is non-empty, supply it as param_card.dat during launch.Example generated MG5 script (passed as a script-file, NOT via -c):
# /tmp/dark_su3_run.mg5
import model /home/user/.local/share/hephaestus/models/dark_su3/ufo/DarkSU3
generate p p > psiD psiD~
output /tmp/dark_su3_out
launch /tmp/dark_su3_out
/home/user/.local/share/hephaestus/models/dark_su3/latest_slha/LesHouches.out
done
Invoke with:
mg5_aMC /tmp/dark_su3_run.mg5
See references/generation.md — "Named-model handoff" for the full callout.
Read: references/setup.md
Covers: source install, conda, Docker options, importing UFO models (FeynRules, HEPMDB, GitHub), CUDACPP GPU backend compilation, Python/Fortran environment requirements, linking Pythia8 as a shower plugin.
Read: references/generation.md
Covers: generate / add process syntax, multiparticle labels, model import conventions, excluding particles with / syntax, proc_card.dat structure, param_card.dat SLHA format, run_card.dat field reference, launch workflow, NLO generation with [QCD]/[QED] and MadLoop.
Read: references/analysis.md
Covers: LHE XML structure (<init>, <event> blocks), banner files, cross-section extraction from stdout and banner, parameter scanning (generating param_card grids, batch submission, merging results).
| Process | MG5 syntax |
|---|---|
| Drell-Yan | generate p p > e+ e- |
| tt̄ (LO) | generate p p > t t~ |
| tt̄ (NLO QCD) | generate p p > t t~ [QCD] |
| W+jets (merged) | generate p p > w+ j then add process p p > w+ j j |
| Single top (t-ch) | generate p p > t j $$ w+ w- |
| Higgs via ggF | generate g g > h [QCD] |
| BSM stop pair | import model mssm then generate p p > t1 t1~ |
| Exclude particle | generate p p > t t~ / a (no photon in s-channel) |
| Z+bb | generate p p > z b b~ |
| 4-lepton | generate p p > e+ e- mu+ mu- |
Multiparticle labels (p, j, l+, vl, …) and the full run_card
field reference (beam, cuts, scale, matching) live in references/generation.md
— consult it when writing cards.
| PDF set | lhaid |
|---|---|
| NNPDF4.0 NLO (central) | 331100 |
| NNPDF4.0 NNLO (central) | 331300 |
| NNPDF3.1 NLO | 303200 |
| NNPDF3.1 NNLO | 303400 |
| CT18 NLO | 14000 |
| CT18 NNLO | 14200 |
| MSHT20 NLO | 27400 |
| MSHT20 NNLO | 27000 |
| Particle | MG5 name | PDG ID |
|---|---|---|
| electron | e- / e+ | 11 |
| muon | mu- / mu+ | 13 |
| tau | ta- / ta+ | 15 |
| e-neutrino | ve / ve~ | 12 |
| μ-neutrino | vm / vm~ | 14 |
| τ-neutrino | vt / vt~ | 16 |
| up | u / u~ | 2 |
| down | d / d~ | 1 |
| strange | s / s~ | 3 |
| charm | c / c~ | 4 |
| bottom | b / b~ | 5 |
| top | t / t~ | 6 |
| gluon | g | 21 |
| photon | a | 22 |
| Z boson | z | 23 |
| W boson | w+ / w- | 24 |
| Higgs | h | 25 |
Non-obvious UFO-import failure modes are catalogued in
references/mg5-model-import-gotchas.md:
import model <bare-name> can silently resolve to a $MG5_HOME/models/
stub with a completely different particle set. Always pass the absolute
path to the SARAH-output UFO (or config.json's models.<name>.ufo), never
the bare name.Chi1 → chi1). Use the
lowercased name in all MG5/MadDM commands — this is why the singlet-doublet
workflow passes dm_candidate = "chi1".| Path | Description |
|---|---|
references/setup.md | Installation, environment, GPU backend, Pythia8 linking |
references/generation.md | Process definition → event output, full card reference (multiparticle labels, run_card fields) |
references/analysis.md | LHE parsing, scanning, cross-section extraction |
references/mg5-model-import-gotchas.md | UFO-import failure modes (bare-name stub resolution, particle-name lowercasing) |
scripts/resolve_named_model.py | Named-model resolver: looks up UFO/SLHA paths from config.json |
scripts/card_io.py | SLHA param_card + run_card read/write/update functions |
scripts/lhe_parser.py | LHE XML parser, cross-section extraction, kinematics |
scripts/mg5_batch.py | proc_card content and bash launch script generation |
assets/example_cards/sm_ttbar/ | Known-good SM pp→tt̄ card set at 13.6 TeV NLO |