C 18/10/85 510181700 MEMBER NAME AINVMS (FORT) FORTRAN77 C SUBROUTINE AINVMS(AM0,AM1,PIN0,PIN1,TOTMAS,PCMS) C C INPUT : AM0,1 -- MASS OF PARTICLE 0,1 C : PIN0,1-- MOM. OF PARTICLE 0,1 C OUTPUT: TOTMAS-- INVARIANT MASS C : PCMS -- MOMENTUM IN CENTER OF MASS SYSTEM C C GET INV.MASS OF TWO PARTICLE SYSTEM T.KAJITA, 18-OCT-85 C DIMENSION PIN0(3), PIN1(3) C PXTOT=PIN0(1)+PIN1(1) PYTOT=PIN0(2)+PIN1(2) PZTOT=PIN0(3)+PIN1(3) E0 = SQRT ( PIN0(1)**2 + PIN0(2)**2 + PIN0(3)**2 + AM0**2 ) E1 = SQRT ( PIN1(1)**2 + PIN1(2)**2 + PIN1(3)**2 + AM1**2 ) ETOT=E0+E1 C PTOT = SQRT ( PXTOT**2 + PYTOT**2 + PZTOT**2 ) TTMAS=ETOT**2 - PTOT**2 IF(TTMAS.LT.0.) TTMAS=0. TOTMAS=SQRT(TTMAS) C PCMS = SQRT( (TOTMAS**2-(AM0+AM1)**2)*(TOTMAS**2-(AM0-AM1)**2) & /(4.*TOTMAS**2) ) C C RETURN END