Madgraph running with default setting

Asked by Jayita

Hi Authors,

  I am running Madgraph in a loop, by changing values in the run_card/param_card iteratively. But during each run, it asks for switches for pythia/delphes etc to be ON or OFF and also for editing the run_card and param_card. I do not need these switches and want to fix them to the default value 0 for every run. Is there a way to do that?

Thanks and best regards,
Jayita

Question information

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

Hi,

If you run inside the same directory output, then the previous choice are kept (including the value for pythia/delphes).

If in your loop you always re-create the directory then in that case, then yes we do not have a user friendly way to enforce a different default for pythia/delphes. One option is to use a PLUGIN defining a new output mode where the only difference compare to the standard mode is to remove the Cards/pythia8_card.dat and Cards/delphes_card.dat /...
which will then turn those option by default then.

For having default for the run_card this is possible:
you can define parameter in the file
input/default_run_card_lo.dat

For the param_card this is also possible.
The best is typically to include in the UFO model a file
restrict_XXXXX.dat
which contains the exact benchmark that you want to use.
(see https://answers.launchpad.net/mg5amcnlo/+faq/2312)
and then instead of doing
import model YYYY
do
import model YYYY-XXXXX
(in top of having the default parameter, the computation will also be more optimised)

Cheers,

Olivier

> On 31 May 2024, at 02:00, Jayita <email address hidden> wrote:
>
> New question #816130 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/816130
>
> Hi Authors,
>
> I am running Madgraph in a loop, by changing values in the run_card/param_card iteratively. But during each run, it asks for switches for pythia/delphes etc to be ON or OFF and also for editing the run_card and param_card. I do not need these switches and want to fix them to the default value 0 for every run. Is there a way to do that?
>
> Thanks and best regards,
> Jayita
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Jayita (jlahiri29) said :
#2

Hi Olivier,

  Thanks a lot for your response. Yes, I understand. I am running the loop every time in the same directory. So it is true that the switch that I choose the first time remains. However, during each run(generate_events), it does go to the user interface to ask, which switch to choose and it takes 60 seconds (to choose phythia/delphes switch) + 90 seconds (for editing param_card or run_card), to ultimately follow the default setting, if I do not manually choose the switch every time. Is there a way to avoid this user interface step?

Thanks and best regards,
Jayita

Revision history for this message
Best Olivier Mattelaer (olivier-mattelaer) said :
#3

Yes,

This depend on how you run the code (they are many variation).
if you are running with ./bin/generate_events
you can switch to
./bin/generate_events -f

if you run from the "launch" command form the "./bin/mg5_aMC" executable
then you can switch to
"launch -f"

But if you are looping, you might be interested in the scripting mode of MG5aMC:
https://answers.launchpad.net/mg5amcnlo/+faq/2186 : How to script MG5 run?
https://answers.launchpad.net/mg5amcnlo/+faq/2735: How to make a parameter scan.

Cheers,

Olivier
FAQ #2186: “How to script MG5 run?”.

Revision history for this message
Jayita (jlahiri29) said :
#4

Hi Olivier,

It works. Thanks a lot for the solution.

Best regards,
Jayita