Scanning over range of cuts with a script.

Asked by Richard Ruiz on 2016-04-12

Dear Experts,

I was wondering if it is possible to scan over a range of cuts in an automated fashion similar to scanning over a range of input parameters. For example: in a script one can have for p p > t t~ j process:

launch pp_ttBarj_LO
set mt scan:range(160,180,1)

and collect all the cross sections in a nice little text output. I would like to do this but with, say, a pT cut on the jet, e.g.,

launch pp_ttBarj_LO
set pTj scan:range(20,200,20)

If this is possible, what is the correct syntax? In either case, thank you for looking into this.

cheers,
Richard

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
Richard Ruiz
Solved:
2016-04-12
Last query:
2016-04-12
Last reply:
2016-04-12

This question was reopened

No this is not possible with the "nice" syntax.
However you can basically have the same effect with a bit more work as showed in the following FAQ

Cheers,

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

Richard Ruiz (rruiz) said : #2

Thanks for the quick response, Olivier! I did not notice the instructions at the bottom before. This should be good enough for what I want to do.

best,
richard

Richard Ruiz (rruiz) said : #3

Hi Olivier,

I think that the syntax my be off a little. Here is what I am getting:

> print_results --path=./cross_section_top.txt --format=short
Command "print_results --path=./cross_section_top.txt --format=short" interrupted with error:
TypeError : print_results_in_file() takes at most 4 arguments (5 given)
Please report this bug on https://bugs.launchpad.net/madgraph5
More information is found in '.../run_02_tag_1_debug.log'.
Please attach this file to your report.

To be clear,
>print_results
works just great. However, when signaling write to file, I get the above. Here is the relevant log information:

print_results --path=./cross_section_top.txt --format=short
Traceback (most recent call last):
  File ".../madgraph/interface/extended_cmd.py", line 889, in onecmd
    return self.onecmd_orig(line, **opt)
  File ".../madgraph/interface/extended_cmd.py", line 882, in onecmd_orig
    return func(arg, **opt)
  File ".../madgraph/interface/common_run_interface.py", line 1231, in do_print_results
    self.print_results_in_file(one_result, options['path'], options['mode'], options['format'])
TypeError: print_results_in_file() takes at most 4 arguments (5 given)

cheers
richard

Richard Ruiz (rruiz) said : #4

Okay, found a solution: I was using v2.3.2.2, tried with a more recent version of MG5mcatNLO, and now the problem is nonexistent. Out of curiosity, is there a list of possible arguments one can use, e.g., --format=short or --format=long (which apparently does not work).

cheers,
Richard