"Productivity" Tutorial

Asked by Bjoern Penning

Dear Madgraph Authors

I have made in the past feeble attempts to move on from the 'old' way to run MG to the new MG5_aMC way and every time I bounce right back because the changes introduced to the system are different enough to break productivity and yet there are enough similarities that the entire ordeal becomes frustrating.
Also there is a need for more consistent documentation aiming for 'productivity' use. Many of my colleagues (exp. & theory) have had the similar experiences.

Typically we experimentalists receive some UFO files from our theory colleagues, plug it into an copy of the old 'Template' directory and run generation with 'bin/newprocess' and 'bin/generate_events' with some changes to params, run files etc.

Trying to move to MG5_aMC there we see the changed structure in Template that now contains a Common directory with some 'bin' and some card files, but the crucial commands (newprocess, generate_events) and also the crucial process and params files are not there(?!).

Looking up tutorials one find only trivial examples using the MG5 shell, unfortunately not that useful if one want to produce large datasets and/or a range of parameters.

So, a bunch of questions and one suggestion:

* How can I run MG5_aMC in an automated fashion? What and where are the equivalents of process and params files, are the Card files in 'Template/Common/Cards/' still the relevant ones. Can I still use 'Template' as base of all processes?

it seems to be intellectually lazy to mourn the passing of the old way to run it. But the absence of a consistent and prominent manual make it appear that there is a steep learning curve consisting mainly out of trial & error. Perhaps you can help?

Thank you, Best
 Bjoern

Question information

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

Dear Bjoern,

The use of the “Template” directory is the method of MG4 which was indeed still supported for retro-compatibility up to MG5.1.5.11.
Since MG5 1.5.5 (not sure of the exact version number) it was clearly indicate that this retro-compatible mode would be dropped
and indication on how to move to the more modern way was indicated on the screen.

> Looking up tutorials one find only trivial examples using the MG5 shell, unfortunately not that useful if one want to produce large datasets and/or a range of parameters.

That is actually not True most of my tutorial (if not all) have one exercise showing how to
1) bypass the shell interface
2) perform a scan on one parameter
see for example:
https://cp3.irmp.ucl.ac.be/projects/madgraph/attachment/wiki/MGTalks/13_06_10_tutomg_tasi.pdf
(exercise 5)

> * How can I run MG5_aMC in an automated fashion? What and where are the equivalents of process and params files, are the Card files in 'Template/Common/Cards/' still the relevant ones. Can I still use 'Template' as base of all processes?

In MG4, the correct way to generate a process was:

cp -r Template PATH
cd PATH
EDIT ./Cards/proc_card.dat
./bin/newprocess
EDIT ./Cards/run_card.dat
EDIT ./Cards/param_card.dat
./bin/generate_events OPTIONS

Some comment
# with MG5.1.X, you can do the same with either proc_card.dat or proc_card_mg5.dat (the only one present in the Template of that version)

Since MG5.1.X the official way is (and only way since MG5.2.X)
EDIT proc_card.dat
./bin/mg5_aMC proc_card.dat

cd PATH # PATH output is define in proc_card.dat
EDIT ./Cards/run_card.dat
EDIT ./Cards/param_card.dat
./bin/generate_events OPTIONS

Note that
- the file proc_card.dat has the same syntax as of the proc_card_mg5.dat (it can also be a v4 format for the proc_card actually).
- you can rename that file, or start from a fresh file if you want to, the name of the file is not important.
- PATH is define in proc_card.dat with the command “output PATH”
- a lot of script of MG4 present in the bin directory (survey/refine/pythia/combine/multi_run) have been moved to be part of the ./bin/madevent shell.
  (since MG5.1.4.X) Those can be scriptable as well (one exa.
- The edition of the card is scriptable inside MG (since MG5.1.5.X) and you can therefore make scan easily.
one example of scan (+use of one of those removed script) is
1) edit a file lest’s call it “cmd.txt"
generate_events
 set mt 175
        set decay 6 Auto
multi_run 3
       set nevents 50000
       set mt 180
       set decay 6 Auto
2) run the code ./bin/madevent cmd.txt

> it seems to be intellectually lazy to mourn the passing of the old way to run it. But the absence of a consistent and prominent manual make it appear that there is a steep learning curve consisting mainly out of trial & error. Perhaps you can help?

All of this is actually explained in our two last paper.
MG5 paper: arXiv:1106.0522
MG5_aMC paper: arXiv:1405.0301
we also have most of the above information include in one of our FAQ:
https://answers.launchpad.net/mg5amcnlo/+faq/2186
The manual is actually the code itself (with the help command) and this launchpad website.

Cheers,

Olivier

On 11 Feb 2015, at 12:11, Bjoern Penning <email address hidden> wrote:

> New question #261959 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/261959
>
> Dear Madgraph Authors
>
> I have made in the past feeble attempts to move on from the 'old' way to run MG to the new MG5_aMC way and every time I bounce right back because the changes introduced to the system are different enough to break productivity and yet there are enough similarities that the entire ordeal becomes frustrating.
> Also there is a need for more consistent documentation aiming for 'productivity' use. Many of my colleagues (exp. & theory) have had the similar experiences.
>
> Typically we experimentalists receive some UFO files from our theory colleagues, plug it into an copy of the old 'Template' directory and run generation with 'bin/newprocess' and 'bin/generate_events' with some changes to params, run files etc.
>
> Trying to move to MG5_aMC there we see the changed structure in Template that now contains a Common directory with some 'bin' and some card files, but the crucial commands (newprocess, generate_events) and also the crucial process and params files are not there(?!).
>
> Looking up tutorials one find only trivial examples using the MG5 shell, unfortunately not that useful if one want to produce large datasets and/or a range of parameters.
>
> So, a bunch of questions and one suggestion:
>
> * How can I run MG5_aMC in an automated fashion? What and where are the equivalents of process and params files, are the Card files in 'Template/Common/Cards/' still the relevant ones. Can I still use 'Template' as base of all processes?
>
> it seems to be intellectually lazy to mourn the passing of the old way to run it. But the absence of a consistent and prominent manual make it appear that there is a steep learning curve consisting mainly out of trial & error. Perhaps you can help?
>
> Thank you, Best
> Bjoern
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Bjoern Penning (penning-bjoern) said :
#2

Dear Olivier

Thank you very much for the answer, I think I was using a way too outdated workflow and then got completely thrown of. With the information you provided I was able to get it running quickly and agree. It's a way better set up. I could have saved a lot of time changing earlier.

Thanks
 Bjoern