subroutine Had_to_HCM(nch) c c Fill the 4 momentum to feed cfilpagp c Implicit None #include "morsub.inc" integer nch,i,istable real PT,Theta,eta,Phi istable=100 c if(nch.gt.0) then do i=1,nch c--- PT=sqrt(p(1,istable+i)**2+p(2,istable+i)**2) Theta=acos(p(3,istable+i)/sqrt(PT**2+p(3,istable+i)**2)) eta=-alog(tan(theta/2.)) PHI=atan2(P(2,istable+i),P(1,istable+i)) if (PHI.lt.0.) then PHI = PHI + 2*3.141592654 endif p(6,istable+i)=ETA p(7,istable+i)=PT p(8,istable+i)=PHI c--- enddo endif c return end