Question on standalone cpp mode

Asked by Carlos Vico Villalba

Dear experts,

I'm interested in learning about the workflow of generating events from a set of matrix elements, and for that I'm making use of the standalone_cpp mode in madgraph, since as far as I understand this mode will only provide the matrix element, and the rest has to be worked out by oneself (and I'm more familiar with c++).

With this in mind I'm trying to generate the following process:

```
import model sm
generate p p > w+ w-
output standalone_cpp ppww
```

However I'm having a bit of trouble trying to sync with which step of the whole chain I'm currently on. As far as I understand, now I'm able to compute matrix elements for random phase space points which are seeded by rambo. Therefore, the next step would be (I assumme) preparing a driver that essentially replicates what's done in the madevent driver as in [1], that at some point generates events by calling a phase space integrator like [2]. I understand the result of that would be one event that is finally written in the LHE (provided it has physical meaning of course)?

By no means I'm trying to "over simplify" how the whole machinery in madgraph works, as this is something that has been very refined over the years and I'm no expert on the delicate aspects of madgraph. I'm just trying to learn how the procedure would be for the integration of a given process :).

Best regards,
Carlos Vico

[1]: https://github.com/mg5amcnlo/mg5amcnlo/blob/59b4b9c1238978f39a32b8bc83244328187704b6/madgraph/iolibs/template_files/madevent_driver.f#L395
[2]: https://github.com/mg5amcnlo/mg5amcnlo/blob/59b4b9c1238978f39a32b8bc83244328187704b6/Template/LO/Source/dsample.f#L4

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
Carlos Vico Villalba
Solved:
Last query:
Last reply:
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#1

Hi,

I guess that you would be interested in the lectures that I gave last week (in Japan)
on how the phase-space integrator does work.

https://cp3.irmp.ucl.ac.be/projects/madgraph/attachment/wiki/Japan24/
Cheers,

Olivier

> On 4 Mar 2024, at 13:00, Carlos Vico Villalba <email address hidden> wrote:
>
> New question #709475 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/709475
>
>
> Dear experts,
>
> I'm interested in learning about the workflow of generating events from a set of matrix elements, and for that I'm making use of the standalone_cpp mode in madgraph, since as far as I understand this mode will only provide the matrix element, and the rest has to be worked out by oneself (and I'm more familiar with c++).
>
> With this in mind I'm trying to generate the following process:
>
> ```
> import model sm
> generate p p > w+ w-
> output standalone_cpp ppww
> ```
>
> However I'm having a bit of trouble trying to sync with which step of the whole chain I'm currently on. As far as I understand, now I'm able to compute matrix elements for random phase space points which are seeded by rambo. Therefore, the next step would be (I assumme) preparing a driver that essentially replicates what's done in the madevent driver as in [1], that at some point generates events by calling a phase space integrator like [2]. I understand the result of that would be one event that is finally written in the LHE (provided it has physical meaning of course)?
>
> By no means I'm trying to "over simplify" how the whole machinery in madgraph works, as this is something that has been very refined over the years and I'm no expert on the delicate aspects of madgraph. I'm just trying to learn how the procedure would be for the integration of a given process :).
>
> Best regards,
> Carlos Vico
>
>
> [1]: https://github.com/mg5amcnlo/mg5amcnlo/blob/59b4b9c1238978f39a32b8bc83244328187704b6/madgraph/iolibs/template_files/madevent_driver.f#L395
> [2]: https://github.com/mg5amcnlo/mg5amcnlo/blob/59b4b9c1238978f39a32b8bc83244328187704b6/Template/LO/Source/dsample.f#L4
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Carlos Vico Villalba (cvico) said :
#2

Thanks for the references! This are very useful indeed :)