Skip to content

Restore massive RAMBO reshuffling in CUDACPP SA RAMBO path#1091

Draft
Copilot wants to merge 3 commits into
masterfrom
copilot/fix-physics-test-issues
Draft

Restore massive RAMBO reshuffling in CUDACPP SA RAMBO path#1091
Copilot wants to merge 3 commits into
masterfrom
copilot/fix-physics-test-issues

Conversation

Copilot AI commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

rambo.h in the CUDACPP SA plugin templates was missing the massive-particle reshuffling step, producing incorrect phase-space kinematics/weights for processes with non-zero final-state masses. This change restores the MG5_aMC@NLO-aligned massive branch and wires final-state masses through the sampling stack.

  • RAMBO algorithm: restore massive branch (rambo.h)

    • Reintroduced post-massless Newton-Raphson reshuffling (x solve) for non-zero final-state masses.
    • Applied momentum rescaling and energy recomputation for outgoing particles.
    • Added massive weight correction term (wtm) and warning counters for massive-path overflow/underflow.
    • Extended ramboGetMomentaFinal(...) signature with const fptype* massesFinal (defaulting to null for massless behavior).
  • Sampling kernel interface: carry mass data end-to-end

    • Extended SamplingKernelBase, RamboSamplingKernelHost, and RamboSamplingKernelDevice to accept/store final-state masses.
    • Host path now calls RAMBO with massesFinal.
    • Device path now allocates/copies/frees a device-side final-mass buffer and passes it to the kernel launcher.
  • Process integration: source final-state masses from process model

    • Enabled CPPProcess::getMasses() accessor in template process class.
    • In check_sa.cc, extracted final-state slice via process.getMasses().data() + CPPProcess::npari and passed it into RAMBO sampling kernel construction.
// rambo.h
ramboGetMomentaFinal( energy, rndmom, momenta, wgts, massesFinal );

// check_sa.cc
const fptype* massesFinal = process.getMasses().data() + CPPProcess::npari;
prsk.reset( new RamboSamplingKernelHost( energy, hstRndmom, hstMomenta, hstWeights, nevt, massesFinal ) );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants