# 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):

I modify the lorentz.py structure here:

'MMM' is the mass of the final particle defined in the parameters.py here:

I define the functions.f file here:

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:
Assignee:
No assignee Edit question
Solved by:
Olivier Mattelaer
Solved:
2017-11-17
Last query:
2017-11-17
2017-11-17
 Olivier Mattelaer (olivier-mattelaer) said on 2017-11-15: #1

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:
>
> 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):
>
>
> I modify the lorentz.py structure here:
>
> 'MMM' is the mass of the final particle defined in the parameters.py here:
>
>
> I define the functions.f file here:
>
>
>
> 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
>
> --

 Arka Santra (santra-arka) said on 2017-11-16: #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:
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:

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.

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

 Olivier Mattelaer (olivier-mattelaer) said on 2017-11-16: #3

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:
>
>
> 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:
> 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:
>
>
> 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.
> 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
>
> --

 Arka Santra (santra-arka) said on 2017-11-16: #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:

This is the functions.f file:

This is the print out of the functions.f file:

Thank you,
Arka

 Olivier Mattelaer (olivier-mattelaer) said on 2017-11-17: #5

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:
>
>
> 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:
>
> This is the functions.f file:
>
> This is the print out of the functions.f file:
>
>
>
>
> Thank you,
> Arka
>
> --