! GeP3rot.f90 ! ! Axel Drees, Uni Heidelberg, September 1997 ! ! Rotate vector into new coordinate system ! function GeP3rot (p3old, costh, sinth, cosph, sinph) use genesis_m, self=>GeP3rot use f90_kind use mom_m implicit none type(mom3) :: GeP3rot type (mom3), intent(in) :: p3old real (kind=double), intent(in) :: costh, sinth, cosph, sinph ! make new vector by rotating old one with anti-clockwise Euler angles GeP3rot%px = p3old%px*costh*cosph - p3old%py*sinph + p3old%pz*sinth*cosph GeP3rot%py = p3old%px*costh*sinph + p3old%py*cosph + p3old%pz*sinth*sinph GeP3rot%pz = -p3old%px*sinth + p3old%pz*costh end function GeP3rot