massive bosons R distance and pseudorapidity cuts

Asked by Antonio Sandroni

Hi, im applyng cuts on the process pp>zzz, in particular on the max pseudorapidity of any pair of massive gauge bosons Z and on the minimum distance R between two of them. I wrote the following code to insert in cuts.f

C Cut on Z boson pseudo-rapidity
         do i=1,nexternal ! loop over all external particles
          if (istatus(i).eq.1 .and. abs(ipdg(i)).eq.23) then
                if ( abs(eta(p(0:3,i))) .gt. 2.5 ) then
                  passcuts_user=.false.
                  return
                endif
            endif
         enddo

C Condition on R2 distance between two Z bosons
         do i=1,nexternal ! loop over all external particles
            do j=1,nexternal
                if (istatus(i).eq.1 .and. istatus(j).eq.1 .and. abs(ipdg(i)).eq.23 .and. abs(ipdg(j)).eq.23) then
                     if (R2(p(0:3,i),p(0:3,j)) .lt. 0.5 ) then
                        passcuts_user=.false.
                        return
                     endif
                  endif
            enddo
         enddo

with only the firt cut it returns me this error:

WARNING: program path/SubProcesses/P0_uux_zzz/ajob1 1 all 0 0 launch ends with non zero status: 1. Stop all computation

with also the second a very long error with these parts:
gfortran -O -fno-automatic -ffixed-line-length-132 -c -I. -I../../lib/ cuts.f
    cuts.f:873:132:

      873 | 1 INDEX(I)=I
          | 1
    Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 1 at (1)
    cuts.f:876:132:

      876 | IF (MODE) 10,20,30
          | 1
    Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
    cuts.f:891:132:

      891 | 41 INDEX(K) = ISWAP
          | 1
    Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 41 at (1)
    cuts.f:905:132:

      905 | IF (I2) 3,3,2
          | 1
    Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
    cuts.f:911:132:

      911 | 3 INDEX (I3) = I33
          | 1
    Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 3 at (1)
    cuts.f:916:132:

      916 | IF (N-1) 12,12,5
          | 1
    Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
    cuts.f:920:132:

      920 | IF (I2-N) 7,9,11
          | 1
    Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
    cuts.f:922:132:

      922 | IF (A(I22)-A(I222)) 8,9,9
          | 1
    Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
    cuts.f:925:132:

      925 | 9 IF (AI-A(I22)) 10,11,11
          | 1
    Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
    cuts.f:946:132:
...........continue..........
Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
    cuts.f:139:25:

      139 | if (R2(p(0:3,i),p(0:3,j)) .lt. 0.5 ) then
          | 1
    Error: Function ‘r2’ at (1) has no IMPLICIT type
    make: *** [makefile:82: cuts.o] Errore 1
..........continue...........

why says that the r2 function has no implicit type?

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

The second error is a standard compilation error, since you have not specify at the beginning of the function what was the return type of the R2 function.
I guess that you checked that such function is defined within the code?

For the first, it is likely that your cut are too strong. Since you did not update the phase-space integrator.
It is possible that all event of the first iteration are returing 0 due to missing the cuts leading to such behavior.

Cheers,

Olivier

> On 9 Oct 2022, at 19:00, Antonio Sandroni <email address hidden> wrote:
>
> New question #703431 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/703431
>
> Hi, im applyng cuts on the process pp>zzz, in particular on the max pseudorapidity of any pair of massive gauge bosons Z and on the minimum distance R between two of them. I wrote the following code to insert in cuts.f
>
> C Cut on Z boson pseudo-rapidity
> do i=1,nexternal ! loop over all external particles
> if (istatus(i).eq.1 .and. abs(ipdg(i)).eq.23) then
> if ( abs(eta(p(0:3,i))) .gt. 2.5 ) then
> passcuts_user=.false.
> return
> endif
> endif
> enddo
>
> C Condition on R2 distance between two Z bosons
> do i=1,nexternal ! loop over all external particles
> do j=1,nexternal
> if (istatus(i).eq.1 .and. istatus(j).eq.1 .and. abs(ipdg(i)).eq.23 .and. abs(ipdg(j)).eq.23) then
> if (R2(p(0:3,i),p(0:3,j)) .lt. 0.5 ) then
> passcuts_user=.false.
> return
> endif
> endif
> enddo
> enddo
>
> with only the firt cut it returns me this error:
>
> WARNING: program path/SubProcesses/P0_uux_zzz/ajob1 1 all 0 0 launch ends with non zero status: 1. Stop all computation
>
> with also the second a very long error with these parts:
> gfortran -O -fno-automatic -ffixed-line-length-132 -c -I. -I../../lib/ cuts.f
> cuts.f:873:132:
>
> 873 | 1 INDEX(I)=I
> | 1
> Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 1 at (1)
> cuts.f:876:132:
>
> 876 | IF (MODE) 10,20,30
> | 1
> Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
> cuts.f:891:132:
>
> 891 | 41 INDEX(K) = ISWAP
> | 1
> Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 41 at (1)
> cuts.f:905:132:
>
> 905 | IF (I2) 3,3,2
> | 1
> Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
> cuts.f:911:132:
>
> 911 | 3 INDEX (I3) = I33
> | 1
> Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 3 at (1)
> cuts.f:916:132:
>
> 916 | IF (N-1) 12,12,5
> | 1
> Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
> cuts.f:920:132:
>
> 920 | IF (I2-N) 7,9,11
> | 1
> Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
> cuts.f:922:132:
>
> 922 | IF (A(I22)-A(I222)) 8,9,9
> | 1
> Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
> cuts.f:925:132:
>
> 925 | 9 IF (AI-A(I22)) 10,11,11
> | 1
> Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
> cuts.f:946:132:
> ...........continue..........
> Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
> cuts.f:139:25:
>
> 139 | if (R2(p(0:3,i),p(0:3,j)) .lt. 0.5 ) then
> | 1
> Error: Function ‘r2’ at (1) has no IMPLICIT type
> make: *** [makefile:82: cuts.o] Errore 1
> ..........continue...........
>
> why says that the r2 function has no implicit type?
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Antonio Sandroni (antoniosandroni) said :
#2

I have chosen to use R2_04 and eta_04 because they are already defined in the cuts.f and now the only kind of error is this one:

>WARNING: program path/SubProcesses/P0_uux_zzz/ajob1 1 all 0 0 launch ends with non zero status: 1. Stop all computation

so the problem is in the cuts?

What is the difference with R2 and eta defined in kin_functions and their 04 version? I think the 04 version allows a bigger array for the 4momentum (5 elements) but initialize it with 4 elements.

By the way R2 and R2_04 gives the distance squared so in the cut i need to put sqrt(R2_04), right?

Antonio

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

> so the problem is in the cuts?

Not really "in" but "with" the cuts.
See for example slide 44 of file:///Users/omattelaer/Downloads/22_06_20_Milan_MG5+merging.pdf <file:///Users/omattelaer/Downloads/22_06_20_Milan_MG5+merging.pdf>
where I explain the issue with adding strong cut within the code.

Cheers,

Olivier

Revision history for this message
Antonio Sandroni (antoniosandroni) said :
#4

Sorry where do i find the file?
Antonio

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

Sorry put the wrong link.
Here it is: https://cp3.irmp.ucl.ac.be/projects/madgraph/raw-attachment/wiki/Milan2022/22_06_20_Milan_MG5%2Bmerging.pdf <https://cp3.irmp.ucl.ac.be/projects/madgraph/raw-attachment/wiki/Milan2022/22_06_20_Milan_MG5+merging.pdf>

Cheers,

Olivier

> On 10 Oct 2022, at 12:25, Antonio Sandroni <email address hidden> wrote:
>
> Question #703431 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/703431
>
> Antonio Sandroni posted a new comment:
> Sorry where do i find the file?
> Antonio
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Antonio Sandroni (antoniosandroni) said (last edit ):
#6

I forget I had to put to zero the widhts of Higgs and top, now for the process pp>ee works; for pp>ZZZ i modified the custom cut on R2 adding a condition

C Condition on R2 distance between two Z bosons
         do i=1,nexternal ! loop over all external particles
            do j=1,nexternal
                if (istatus(i).eq.1 .and. istatus(j).eq.1 .and. abs(ipdg(i)).eq.23 .and. abs(ipdg(j)).eq.23) then
 line added-> if (i.ne.j) then
                           if (R2_04(p(0,i),p(0,j)).lt.(0.5)**2 ) then
                                 passcuts_user=.false.
                                 return
                           endif
                        endif
                  endif
            enddo
         enddo

Still don't know why the problems comes from the evaluation of R2 between the same particle.

Revision history for this message
Antonio Sandroni (antoniosandroni) said :
#7