gibuu is hosted by Hepforge, IPPP Durham
GiBUU

TABLE OF CONTENTS


/rotation [ Modules ]

[ Top ] [ Modules ]

NAME

module rotation

PURPOSE

This module defines rotation matrices and evaluates the spherical coordinates of a vector.


rotation/rotateTo [ Functions ]

[ Top ] [ rotation ] [ Functions ]

NAME

function rotateTo (targ, v_in) result (v_out)

PURPOSE

Rotates the z-axis onto a vector 'targ'.

INPUTS

  • real, intent(in), dimension(1:3) :: targ ! Target vector
  • real, intent(in), dimension(1:3) :: v_in ! Vector before rotation

OUTPUT

  • real, dimension(1:3) :: v_out ! Vector after rotation


rotation/rotateYZ [ Functions ]

[ Top ] [ rotation ] [ Functions ]

NAME

function rotateYZ (theta, phi, v_in, cosTheta) result (v_out)

PURPOSE

Does first a rotation around the y-axis with angle theta, then around z with angle phi.

Rotates the z-axis on a vector which has the spherical coordinates theta and phi.

INPUTS

  • real :: phi ! Angle around z-axis
  • real :: theta ! Angle around y-Axis
  • real,dimension(1:3) :: v_in ! Vector before rotation
  • real, OPTIONAL :: cosTheta ! cos(theta)

OUTPUT

  • real,dimension(1:3) :: v_out ! Vector after rotation

NOTES

if optional parameter cosTheta is given, cosT and sinT are calculated using this parameter instead of theta


rotation/rotateZY [ Functions ]

[ Top ] [ rotation ] [ Functions ]

NAME

function rotateZY (theta, phi, v_in, cosTheta) result (v_out)

PURPOSE

Does first rotation around z and thereafter around y.

As a result, e.g. the vector which had originally the spherical coordinates theta and phi is now rotated on the z-Axis. It's basically the inverse of rotateYZ.

INPUTS

  • real :: phi ! Angle around z-axis [radian]
  • real :: theta ! Angle around y-Axis [radian]
  • real,dimension(1:3) :: v_in ! Vector before rotation
  • real, OPTIONAL :: cosTheta ! cos(theta)

OUTPUT

  • real,dimension(1:3) :: v_out ! Vector after rotation

NOTES

if optional parameter cosTheta is given, cosT and sinT are calculated using this parameter instead of theta


rotation/get_phi_theta [ Subroutines ]

[ Top ] [ rotation ] [ Subroutines ]

NAME

subroutine get_phi_theta (vector, theta, phi)

PURPOSE

Translate the input "vector" into spherical coordinates. Returns phi and theta of vector:

  • x-axis defines phi=0
  • z-axis defines theta=0

INPUTS

real, dimension(1:3) :: vector

OUTPUT

  • real :: phi [radian], range: 0 <= phi <= 2*pi
  • real :: theta [radian], range: 0 <= theta <= pi