User defined form factor written in functions.f is not working, always returning the value 1.0

Asked by Arka Santra on 2017-11-15

Hello,
  I am writing a form factor for my model where the form factor depends on the speed of a final particle. The speed of the final particle is defined as sqrt(1 - m^2/ (p^2+m^2)) where m is the mass of the final particle and p is the three momentum of the final particle.

  To achieve this, I follow the prescription here (Method 2: Fortran Way):
  https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/FormFactors#Method2:FortranWay

  I modify the lorentz.py structure here:
https://github.com/asantra/MadGraphModels/blob/master/mono_spinhalf_beta/lorentz.py#L54-L56

'MMM' is the mass of the final particle defined in the parameters.py here:
https://github.com/asantra/MadGraphModels/blob/master/mono_spinhalf_beta/parameters.py#L188-L194

 I define the functions.f file here:
https://github.com/asantra/MadGraphModels/blob/master/mono_spinhalf_beta/Fortran/functions.f

The MadGraph code is compiling fine and computing the cross-section. But strangely I see that the cross-section value is the same as what I was getting without the form factor. It seems the form factor value is taken to be 1, even though it has different functional structure.
 Is there any problem with the Fortran compiler? What is the way out? Any help is appreciated.

 Thank you,
 Arka

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
Olivier Mattelaer
Solved:
2017-11-17
Last query:
2017-11-17
Last reply:
2017-11-17

Hi,

What is the process that you are considering?
Either the vertex that you modify is not used for that process or you have P^2>>MMM^2 in this case (making your prefactor equal to one)

Cheers,

Olivier

> On Nov 15, 2017, at 17:14, Arka Santra <email address hidden> wrote:
>
> New question #660791 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/660791
>
> Hello,
> I am writing a form factor for my model where the form factor depends on the speed of a final particle. The speed of the final particle is defined as sqrt(1 - m^2/ (p^2+m^2)) where m is the mass of the final particle and p is the three momentum of the final particle.
>
> To achieve this, I follow the prescription here (Method 2: Fortran Way):
> https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/FormFactors#Method2:FortranWay
>
>
> I modify the lorentz.py structure here:
> https://github.com/asantra/MadGraphModels/blob/master/mono_spinhalf_beta/lorentz.py#L54-L56
>
> 'MMM' is the mass of the final particle defined in the parameters.py here:
> https://github.com/asantra/MadGraphModels/blob/master/mono_spinhalf_beta/parameters.py#L188-L194
>
>
> I define the functions.f file here:
> https://github.com/asantra/MadGraphModels/blob/master/mono_spinhalf_beta/Fortran/functions.f
>
>
>
> The MadGraph code is compiling fine and computing the cross-section. But strangely I see that the cross-section value is the same as what I was getting without the form factor. It seems the form factor value is taken to be 1, even though it has different functional structure.
> Is there any problem with the Fortran compiler? What is the way out? Any help is appreciated.
>
>
> Thank you,
> Arka
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Arka Santra (santra-arka) said : #2

Hi Olivier,
  I made sure that my I am using the right vertex by replacing the form factor by a number (0.5) here:
 https://github.com/asantra/MadGraphModels/blob/master/mono_spinhalf_beta/lorentz.py#L56
  and then the cross-section of the process indeed changed in the right direction.

  I wanted to see the value of the form factor by writing a print statement here:
  https://github.com/asantra/MadGraphModels/blob/master/mono_spinhalf_beta/Fortran/functions.f#L17

 But then I get this error from MadGraph:

Survey return zero cross section.
   Typical reasons are the following:
   1) A massive s-channel particle has a width set to zero.
   2) The pdf are zero for at least one of the initial state particles
      or you are using maxjetflavor=4 for initial state b:s.
   3) The cuts are too strong.
   Please check/correct your param_card and/or your run_card.
Zero result detected: See https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/FAQ-General-14

 Is there any way I can print out the value of the form factor ( and corresponding PSQUARE) and understand what is going wrong?

 Thanks,
 Arka

HI,

If you go the web page and click on the cross-section, you will arrive to a second webpage, with the details of the computation.
There you will see a bunch of cross-section for a given number of channel (in your last case, those should all be zero). You can click on those 0 value
and you will see the detail log of that particular computation, this is where your print statement should appear.

Cheers,

Olivier

> On Nov 16, 2017, at 11:58, Arka Santra <email address hidden> wrote:
>
> Question #660791 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/660791
>
> Status: Answered => Open
>
> Arka Santra is still having a problem:
> Hi Olivier,
> I made sure that my I am using the right vertex by replacing the form factor by a number (0.5) here:
> https://github.com/asantra/MadGraphModels/blob/master/mono_spinhalf_beta/lorentz.py#L56
> and then the cross-section of the process indeed changed in the right direction.
>
> I wanted to see the value of the form factor by writing a print statement here:
> https://github.com/asantra/MadGraphModels/blob/master/mono_spinhalf_beta/Fortran/functions.f#L17
>
>
> But then I get this error from MadGraph:
>
>
> Survey return zero cross section.
> Typical reasons are the following:
> 1) A massive s-channel particle has a width set to zero.
> 2) The pdf are zero for at least one of the initial state particles
> or you are using maxjetflavor=4 for initial state b:s.
> 3) The cuts are too strong.
> Please check/correct your param_card and/or your run_card.
> Zero result detected: See https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/FAQ-General-14
>
>
> Is there any way I can print out the value of the form factor ( and corresponding PSQUARE) and understand what is going wrong?
>
>
> Thanks,
> Arka
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Arka Santra (santra-arka) said : #4

Hi Olivier,
  The print out of the form factor is indeed 0. This is because the function value pp(i,particle) [i goes from 0 to 3] are all 0. I do not understand the reason. Is it possible that the functions.f cannot get hold of any colliding particle? Can you look into this matter?

  The model file is here:
  https://github.com/asantra/MadGraphModels/tree/master/mono_spinhalf_beta

  This is the functions.f file:
  https://github.com/asantra/MadGraphModels/blob/master/mono_spinhalf_beta/Fortran/functions.f#L17

  This is the print out of the functions.f file:
  https://github.com/asantra/MadGraphModels/blob/master/log.txt

 Please let me know if you need more information to debug this issue.

 Thank you,
 Arka

To have that pp tables fill inside the code, you have to have configure your run_card accordingly:

You should have those two lines in your run_card (the second is actually default) the other is actually a retro compatibility mode for MG4 where such momenta dependence was supported.
Therefore you have to fully add the line, since that parameter is now a hidden parameter of the run_card.

False = fixed_couplings
False = fixed_ren_scale

Cheers,

Olivier

> On Nov 16, 2017, at 14:38, Arka Santra <email address hidden> wrote:
>
> Question #660791 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/660791
>
> Status: Answered => Open
>
> Arka Santra is still having a problem:
> Hi Olivier,
> The print out of the form factor is indeed 0. This is because the function value pp(i,particle) [i goes from 0 to 3] are all 0. I do not understand the reason. Is it possible that the functions.f cannot get hold of any colliding particle? Can you look into this matter?
>
> The model file is here:
> https://github.com/asantra/MadGraphModels/tree/master/mono_spinhalf_beta
>
> This is the functions.f file:
> https://github.com/asantra/MadGraphModels/blob/master/mono_spinhalf_beta/Fortran/functions.f#L17
>
> This is the print out of the functions.f file:
> https://github.com/asantra/MadGraphModels/blob/master/log.txt
>
>
> Please let me know if you need more information to debug this issue.
>
>
> Thank you,
> Arka
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Arka Santra (santra-arka) said : #6

Thanks Olivier Mattelaer, that solved my question.