parameters that incorporate if statements

Asked by Peter Winslow

Hi,

I have a model which I'd like to implement but there are a few parameters that inherently depend on what the values of other parameters are, i.e., their definitions involved if statements. Of course, step functions could also be used if thats easier. I've seen a previous thread with someone else interested in this (151288) but this was way back in 2011. Do you know if this is now possible to incorporate at any level (feynrules, python, or fortran) so that it works consistently all the way through to the level of generating events?

Best,
Peter Winslow

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,

yes you can edit the python UFO model with the following syntax
expr1 if condition else expr2
and it should work for parameter/coupling (it will not work for lorentz structure)

Cheers,

Olivier

On 21 Feb 2015, at 20:01, Peter Winslow <email address hidden> wrote:

> New question #262561 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/262561
>
> Hi,
>
> I have a model which I'd like to implement but there are a few parameters that inherently depend on what the values of other parameters are, i.e., their definitions involved if statements. Of course, step functions could also be used if thats easier. I've seen a previous thread with someone else interested in this (151288) but this was way back in 2011. Do you know if this is now possible to incorporate at any level (feynrules, python, or fortran) so that it works consistently all the way through to the level of generating events?
>
> Best,
> Peter Winslow
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Peter Winslow (pwinslow-0) said :
#2

Hi Olivier,

That solved that problem! Thanks very much!

However, I have another problem which you may be able to help me with: Is it possible to define a parameter in terms of an interpolated function? For instance, I can create an interpolation in mathematica from a set of values as

a = {{90.1211, 0.0022482}, {90.607, 0.002248}, {91.0956, 0.0022477}, {91.5869, 0.0022474}, {92.0807, 0.0022472}, {92.5773, 0.0022469}, {93.0765, 0.0023162}, {93.5784, 0.0023159}, {94.083, 0.0023157}, {94.5903, 0.0023154}, {95.1004, 0.0023151}, {95.6132, 0.0023865}};
b = Interpolation[a];

Is it then possible to define a parameter which includes in its definition the function b[x]?

Cheers,
Peter

> On Feb 21, 2015, at 4:46 PM, Olivier Mattelaer <email address hidden> wrote:
>
> Your question #262561 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/262561
>
> Status: Open => Answered
>
> Olivier Mattelaer proposed the following answer:
> Hi,
>
> yes you can edit the python UFO model with the following syntax
> expr1 if condition else expr2
> and it should work for parameter/coupling (it will not work for lorentz structure)
>
> Cheers,
>
> Olivier
>
>
> On 21 Feb 2015, at 20:01, Peter Winslow <email address hidden> wrote:
>
>> New question #262561 on MadGraph5_aMC@NLO:
>> https://answers.launchpad.net/mg5amcnlo/+question/262561
>>
>> Hi,
>>
>> I have a model which I'd like to implement but there are a few parameters that inherently depend on what the values of other parameters are, i.e., their definitions involved if statements. Of course, step functions could also be used if thats easier. I've seen a previous thread with someone else interested in this (151288) but this was way back in 2011. Do you know if this is now possible to incorporate at any level (feynrules, python, or fortran) so that it works consistently all the way through to the level of generating events?
>>
>> Best,
>> Peter Winslow
>>
>> --
>> You received this question notification because you are an answer
>> contact for MadGraph5_aMC@NLO.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/mg5amcnlo/+question/262561/+confirm?answer_id=0
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/mg5amcnlo/+question/262561
>
> You received this question notification because you asked the question.

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

Hi Peter,

For the lorentz structure it is possible to call external function.
Those function then need to be define in
UFOMODELSPATH/Fortran/functions.f
This of course limit the possibility to use the model in fortran usage (the model is ill define in any other language)
More details on this page: https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/FormFactors (method2)

I’m not sure if this is also working for couplings/parameter but the easiest is to give it a try.

Cheers,

Olivier

On 22 Feb 2015, at 11:16, Peter Winslow <email address hidden> wrote:

> Question #262561 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/262561
>
> Status: Answered => Open
>
> Peter Winslow is still having a problem:
> Hi Olivier,
>
> That solved that problem! Thanks very much!
>
> However, I have another problem which you may be able to help me with:
> Is it possible to define a parameter in terms of an interpolated
> function? For instance, I can create an interpolation in mathematica
> from a set of values as
>
> a = {{90.1211, 0.0022482}, {90.607, 0.002248}, {91.0956, 0.0022477}, {91.5869, 0.0022474}, {92.0807, 0.0022472}, {92.5773, 0.0022469}, {93.0765, 0.0023162}, {93.5784, 0.0023159}, {94.083, 0.0023157}, {94.5903, 0.0023154}, {95.1004, 0.0023151}, {95.6132, 0.0023865}};
> b = Interpolation[a];
>
> Is it then possible to define a parameter which includes in its
> definition the function b[x]?
>
> Cheers,
> Peter
>
>> On Feb 21, 2015, at 4:46 PM, Olivier Mattelaer <email address hidden> wrote:
>>
>> Your question #262561 on MadGraph5_aMC@NLO changed:
>> https://answers.launchpad.net/mg5amcnlo/+question/262561
>>
>> Status: Open => Answered
>>
>> Olivier Mattelaer proposed the following answer:
>> Hi,
>>
>> yes you can edit the python UFO model with the following syntax
>> expr1 if condition else expr2
>> and it should work for parameter/coupling (it will not work for lorentz structure)
>>
>> Cheers,
>>
>> Olivier
>>
>>
>> On 21 Feb 2015, at 20:01, Peter Winslow <email address hidden> wrote:
>>
>>> New question #262561 on MadGraph5_aMC@NLO:
>>> https://answers.launchpad.net/mg5amcnlo/+question/262561
>>>
>>> Hi,
>>>
>>> I have a model which I'd like to implement but there are a few parameters that inherently depend on what the values of other parameters are, i.e., their definitions involved if statements. Of course, step functions could also be used if thats easier. I've seen a previous thread with someone else interested in this (151288) but this was way back in 2011. Do you know if this is now possible to incorporate at any level (feynrules, python, or fortran) so that it works consistently all the way through to the level of generating events?
>>>
>>> Best,
>>> Peter Winslow
>>>
>>> --
>>> You received this question notification because you are an answer
>>> contact for MadGraph5_aMC@NLO.
>>
>> --
>> If this answers your question, please go to the following page to let us
>> know that it is solved:
>> https://answers.launchpad.net/mg5amcnlo/+question/262561/+confirm?answer_id=0
>>
>> If you still need help, you can reply to this email or go to the
>> following page to enter your feedback:
>> https://answers.launchpad.net/mg5amcnlo/+question/262561
>>
>> You received this question notification because you asked the question.
>
> --
> 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 Peter Winslow for more information if necessary.

To post a message you must log in.