How to run compute_widths in a script and read / write the branching ratios from param card for a scan

Asked by Samadrita Mukherjee

Hi,

I want to change a few parameters in the param_card.dat and wish to see how the branching ratios and width of a BSM particle are changing. For this I am using:

./bin/madevent (inside the output directory after generating the process)

compute_widths H+ --body_decay=2 (say for the charged Higgs in 2HDM)

then the param_card.dat is being re-written and we can find the branching ratios in it.

My specific question is how to do this in a script? I will change the required parameters in the card, run the "compute_widths H+ --body_decay=2" command, and then store the branching ratio values in a file!

I have followed the link https://answers.launchpad.net/mg5amcnlo/+faq/2186 regarding the cross-section run, but can you help with scripting the compute_widths command.

Thanks in advance!

Sincerely,
Samadrita

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

you can write this file

launch
# potentially option for shower/...
set mh+ XXXXXX
compute_widths H+ --body_decay=2
launch
set mh+ YYYYY
compute_widths H+ --body_decay=2

and then run this file via
./bin/madevent PATH_TO_THE_ABOVE_FILE

Cheers,

Olivier

> On 30 Jul 2021, at 08:10, Samadrita Mukherjee <email address hidden> wrote:
>
> New question #698197 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/698197
>
> Hi,
>
> I want to change a few parameters in the param_card.dat and wish to see how the branching ratios and width of a BSM particle are changing. For this I am using:
>
> ./bin/madevent (inside the output directory after generating the process)
>
> compute_widths H+ --body_decay=2 (say for the charged Higgs in 2HDM)
>
> then the param_card.dat is being re-written and we can find the branching ratios in it.
>
> My specific question is how to do this in a script? I will change the required parameters in the card, run the "compute_widths H+ --body_decay=2" command, and then store the branching ratio values in a file!
>
> I have followed the link https://answers.launchpad.net/mg5amcnlo/+faq/2186 regarding the cross-section run, but can you help with scripting the compute_widths command.
>
> Thanks in advance!
>
> Sincerely,
> Samadrita
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Samadrita Mukherjee (samadritamisti) said :
#2
Revision history for this message
Samadrita Mukherjee (samadritamisti) said :
#3

Thanks, Olivier for the prompt reply.

The script is working fine.

But are there any ways to store the values of the branching ratios from the param_card.dat after each run? Like MG5 automatically creates a .txt file with the cross-sections as follows:

in scan_run_[01-05].txt

#run_name mass#300 mass#302 cross
run_01 2.000000e+02 2.000000e+02 6.304825e-02
run_02 2.500000e+02 2.500000e+02 2.638965e-02
run_03 3.000000e+02 3.000000e+02 1.256763e-02
run_04 3.500000e+02 3.500000e+02 6.528170e-03
run_05 4.000000e+02 4.000000e+02 3.638745e-03

can we have similar things for branching ratios also?

I understand that it is written and stored in the run_0i_tag_1_banner.txt for each run in the "Events" directory.

Thanks in advance!

Sincerely,
Samadrita

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

No we do not provide script for that.
But since you have the information in the banner of each run,
it should be easy to create a bash/python/... script that create such type of output file.

Cheers,

Olivier

> On 30 Jul 2021, at 11:10, Samadrita Mukherjee <email address hidden> wrote:
>
> Question #698197 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/698197
>
> Samadrita Mukherjee gave more information on the question:
> Thanks, Olivier for the prompt reply.
>
> The script is working fine.
>
> But are there any ways to store the values of the branching ratios from
> the param_card.dat after each run? Like MG5 automatically creates a
> .txt file with the cross-sections as follows:
>
> in scan_run_[01-05].txt
>
> #run_name mass#300 mass#302 cross
> run_01 2.000000e+02 2.000000e+02 6.304825e-02
> run_02 2.500000e+02 2.500000e+02 2.638965e-02
> run_03 3.000000e+02 3.000000e+02 1.256763e-02
> run_04 3.500000e+02 3.500000e+02 6.528170e-03
> run_05 4.000000e+02 4.000000e+02 3.638745e-03
>
> can we have similar things for branching ratios also?
>
> I understand that it is written and stored in the
> run_0i_tag_1_banner.txt for each run in the "Events" directory.
>
> Thanks in advance!
>
> Sincerely,
> Samadrita
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Can you help with this problem?

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

To post a message you must log in.