# Modify the matrix element after 'output' command

Hello!

Is it possible to modify the matrix element that is used for the calculation before running the launch command, i.e. after the output command?

One reason I ask is because I have to calculate the phase-space for a 2->3 process with a constant matrix element. The latter comes from a manually calculate loop-process, which cannot be calculated in MadGraph itself. In a different scenario, I have to multiply the final matrix element by an additional momentum-dependent factor.

For the first problem, my current idea is to generate some process that has the correct initial and final states (but a non-constant matrix element), and afterwards simply set the matrix element to 1, as this should give me the phase-space contribution.

Is there an easy way of performing this modification of the matrix element? I know that there are files like matrix1_orig.f and myamp.f, which I can modify in principle. However, I am worried that this is not enough and may lead to inconsistent results.

Or is there maybe a general way to access the phase-space sampler of MadGraph with a custom matrix element?

Thanks a lot in advance for your help!

Best,

Marco

## Question information

- Language:
- English Edit question

- Status:
- Solved

- Assignee:
- No assignee Edit question

- Solved by:
- Olivier Mattelaer

- Solved:

- Last query:

- Last reply: