SCANNING TANBETA IN FLOAT STEPS IN MADGRAPH

Asked by Eric Gyabeng Fuakye

Hello All,

I am trying to scan tangent beta in Madgraph using the 2HDM Type II Model.

I want my choice of range to be in steps of 0.29 which is a float, so I used the following syntax and got this error

set frblock 1 scan:range(1,30,0.29)

*******************************************************************************************
Command "generate_events run_02" interrupted with error:
TypeError : range() integer step argument expected, got float.
Please report this bug on https://bugs.launchpad.net/mg5amcnlo
More information is found in '/home/eric/MG5_aMC_v3_0_0/bin/DAMN_II/run_02_tag_1_debug.log'.
Please attach this file to your report.
********************************************************************************************
I guess this means I should set my steps in integers and not float. I will be glad if anyone can give an idea on solivng this error.
Thanks

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
Best Olivier Mattelaer (olivier-mattelaer) said :
#1

Hi,

indeed the range function does not take float argument in python.

But you can use comprehension list something like

> set frblock 1 scan:[ 1+0.29*i for i in range(100) if 1+0.29*i< 30]

Cheers,

Olivier

> On 29 May 2019, at 15:09, Eric Gyabeng Fuakye <email address hidden> wrote:
>
> New question #681127 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/681127
>
> Hello All,
>
> I am trying to scan tangent beta in Madgraph using the 2HDM Type II Model.
>
> I want my choice of range to be in steps of 0.29 which is a float, so I used the following syntax and got this error
>
> set frblock 1 scan:range(1,30,0.29)
>
>
> *******************************************************************************************
> Command "generate_events run_02" interrupted with error:
> TypeError : range() integer step argument expected, got float.
> Please report this bug on https://bugs.launchpad.net/mg5amcnlo
> More information is found in '/home/eric/MG5_aMC_v3_0_0/bin/DAMN_II/run_02_tag_1_debug.log'.
> Please attach this file to your report.
> ********************************************************************************************
> I guess this means I should set my steps in integers and not float. I will be glad if anyone can give an idea on solivng this error.
> Thanks
>
>
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Eric Gyabeng Fuakye (efuakye) said :
#2

Hi Olivier,

Perfect!

That solves my problem.

Thanks

Revision history for this message
Eric Gyabeng Fuakye (efuakye) said :
#3

Thanks Olivier Mattelaer, that solved my question.