Generating multiple events from the same txt file

Asked by HB

Hello,

I am pretty new to mad graph and thanks for the great tool.

I want to be able to generate various events from the same .txt file and then save the info from each run.

The script that I have so far is this:

generate p p > t t~ j
    output MYDIRECTORY
    launch MYDIRECTORY
       set mt 170 # changing the top mass
   launch
       set mt 180 # changing the top mass

launch MYDIRECTORY -i
   print_results --path=./cross_section_top.txt --format=short

generate ta- > e- ve~ vt
 output MYDIRECTORY2
 launch

launch MYDIRECTORY2 -i
   print_results --path=./cross_section_top2.txt --format=short

But it isn't able to generate the second cross_section_top2.txt file and exits with the following error:

Command "import /Users/hengameh/Downloads/MG5_aMC_v3_5_3/tst.txt" interrupted in sub-command:
"launch MYDIRECTORY2 -i" with error:
InvalidCmd : Too many argument for survey command

Is there a way to do what I have in mind?

Best,
HB

Question information

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

Hi,

a simple change to your script is the following:
generate p p > t t~ j
    output MYDIRECTORY
    launch MYDIRECTORY
       set mt 170 # changing the top mass
   launch
       set mt 180 # changing the top mass

launch MYDIRECTORY -i
   print_results --path=./cross_section_top.txt --format=short
   quit # quit interactive/advance interface mode for the MYDIRECTORY

generate ta- > e- ve~ vt
 output MYDIRECTORY2
 launch

launch MYDIRECTORY2 -i
   print_results --path=./cross_section_top2.txt --format=short

now the above command can also be simplified like this:

generate p p > t t~ j
    output MYDIRECTORY
    launch MYDIRECTORY
       set mt scan:[170,180] # changing the top mass
generate ta- > e- ve~ vt
 output MYDIRECTORY2
 launch
launch MYDIRECTORY2 -i
   print_results --path=./cross_section_top2.txt --format=short

In the first case, you are in a real scan mode, so a summary script will be created with name:
MYDIRECTORY/Events/scan_run_0[1-2].txt
with content (which is slightly more useful than the print_cross format --I guess--):
#run_name mass#6 cross
run_01 1.700000e+02 5.488480e+02
run_02 1.800000e+02 4.187730e+02

For the second process, you can also "fake" the scan mode by doing
set mt scan:[175]
but the automatic created file will then also contains the mass of the top, which does not make much sense here.

Can you help with this problem?

Provide an answer of your own, or ask HB for more information if necessary.

To post a message you must log in.