next up previous index
Next: PHYS430 Ionisation processes Up: PHYS410 Rotations and Previous: PHYS410 Rotations and

Subroutines

CALL GLOREN (BETA,PA,PB*) GLOREN transforms the momentum and the energy from one Lorentz frame (A) to another (B). It uses the following input and output:

BETA(4)
( REAL) velocity components in light units of frame B in frame A, BETA(1... 3) = β , BETA(4)=(1-β2)-1/2= γ ;
PA(4)
( REAL) momentum components in the frame (A);
PB(4)
( REAL) momentum components in the frame (B).

GLOREN is called from the routine GDECAY. The momentum pA and energy EA in reference frame A are transformed into the momentum pB and energy EB in reference frame B which translates with velocity β with respect to A:
EB = γ(EA- βpA)

pB = pAβ({ γβpAγ+1}- EA)

CALL GDROT (P*,COSTH,SINTH,COSPH,SINPH) GDROT rotates a vector from one reference system to another.

P(3)
( REAL) vector to rotate, overwritten on output;
COSTH
( REAL) cosine of the polar angle;
SINTH
( REAL) sine of the polar angle;
COSPH
( REAL) cosine of the azimuthal angle;
SINPH
( REAL) sine of the azimuthal angle;

GDROT is called from several routines to rotate a particle from in the center-of-mass system to the GEANT (laboratory) system. The following rotation matrix is used:

(
cosθcosφ -sinφ sinθcosφ

cosθsinφ cosφ sinθsinφ

- sinθ 0 cosθ

)=(
cosφ -sinφ 0

sinφ cosφ 0

0 0 1

)Rφ(
cosθ 0 sinθ

0 1 0

-sinθ 0 cosθ

)Rθ

Rθ is a counterclockwise rotation around axis y by an angle θ , and Rφ is a counterclockwise rotation around axis z' (rotated by an angle θ from the initial position) by an angle φ .

CALL GFANG (P,COSTH*,SINTH*,COSPH*,SINPH*,ROTATE*)

P(3)
( REAL) input direction;
COSTH
( REAL) cosine of the polar angle;
SINTH
( REAL) sine of the polar angle;
COSPH
( REAL) cosine of the azimuthal angle;
SINPH
( REAL) sine of the azimuthal angle;
ROTATE
( LOGICAL) rotation flag, the rotation matrix is the unit matrix if ROTATE=.FALSE., i.e. no rotation is needed;

Find the sine and cosine of the polar and azimuthal angle of the direction defined by the vector P. If P is along the z axis, ROTATE=.FALSE..

CALL GVROT (DCOSIN,PART*)

PART(3)
( REAL) direction to be rotated, overwritten on output;
DCOSIN(3)
( REAL) direction of the new z axis;

Given the direction PART in a system of reference O, it returns the same direction in the system of reference where the z axis of O is along DCOSIN. This routine is very useful when the θ

angle of a secondary particle is sampled in a reference frame where the parent particle moves along the z axis. Then the direction of the secondary product in the MRS is returned by GVROT if DCOSIN is the direction of the parent particle.

A call to GVROT is equivalent to the following code:

      DIMENSION PART(3), DCOSIN(3)
      LOGICAL ROTATE
      .
      .
      .
      CALL GFANG(DCOSIN,COSTH,SINTH,COSPH,SINPH,ROTATE)
      IF(ROTATE) CALL GDROT(PART,COSTH,SINTH,COSPH,SINPH)

with the advantage that inside GVROT all calculations are performed in double precision.

PHYS430



next up previous index
Next: PHYS430 Ionisation processes Up: PHYS410 Rotations and Previous: PHYS410 Rotations and


Janne Saarela
Mon Apr 3 12:46:29 METDST 1995