Defining Invariant mass in "kin_func.f" file

Asked by shibasipu

Dear Olivier,
                                Could you please tell why you have defined invariant mass for two particles in two places in "kin_func.f" ? Is there any specific reason ?

In First Place
============================

. double precision function mij(P1,P2)
c************************************************************************
c Invarient mass of 2 particles
c************************************************************************
      IMPLICIT NONE
      double precision p1(0:3),p2(0:3)
      double precision sumdot
      external sumdot

      mij = dsqrt(max(Sumdot(p1,p2,1d0),0d0))

      RETURN
      END

2. In Second Place
=============================
   double precision function SumDot(P1,P2,dsign)
c************************************************************************
c Invarient mass of 2 particles
c************************************************************************
      IMPLICIT NONE
      double precision p1(0:3),p2(0:3),dsign
      integer i
      double precision ptot(0:3)
      double precision dot
      external dot

      do i=0,3
         ptot(i)=p1(i)+dsign*p2(i)
      enddo
      SumDot = dot(ptot,ptot)

      RETURN
      END

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,

I did not.
Probably an historical reason since (I guess) mij was define before SumDot which is more general.
In any case this is not a problem to have multiple definition of the same stuff and this is inevitable in such large code with that many developers.

Cheers,

Olivier

> On Dec 4, 2015, at 12:12, shibasipu <email address hidden> wrote:
>
> Question #276662 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/276662
>
> Description changed to:
> Dear Olivier,
> Could you please tell why you have defined invariant mass for two particles in two places in "kin_func.f" ? Is there any specific reason ?
>
> In First Place
> ============================
>
> . double precision function mij(P1,P2)
> c************************************************************************
> c Invarient mass of 2 particles
> c************************************************************************
> IMPLICIT NONE
> double precision p1(0:3),p2(0:3)
> double precision sumdot
> external sumdot
>
> mij = dsqrt(max(Sumdot(p1,p2,1d0),0d0))
>
> RETURN
> END
>
> 2. In Second Place
> =============================
> double precision function SumDot(P1,P2,dsign)
> c************************************************************************
> c Invarient mass of 2 particles
> c************************************************************************
> IMPLICIT NONE
> double precision p1(0:3),p2(0:3),dsign
> integer i
> double precision ptot(0:3)
> double precision dot
> external dot
>
> do i=0,3
> ptot(i)=p1(i)+dsign*p2(i)
> enddo
> SumDot = dot(ptot,ptot)
>
> RETURN
> END
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
shibasipu (shibasipu) said :
#2

Thanks Olivier Mattelaer, that solved my question.