ROT–DEFIni

Summary

Defines rotations and translations to be applied to binnings. ​​

​

See also EVENTBIN, ROTPRBIN, USRBIN, and LATTICE (in Combinatorial Geometry)

WHAT(1) :

assigns a transformation index and the corresponding rotation axis

≤ 0.0:

the card is ignored if SDUM is empty, otherwise SDUM is kept as the rotation name, and the first free rotation number is used

> 1000.0: interpreted as j+i*1000

> 100.0 and < 1000.0: interpreted as i+j*100

(Note the inversion of i and j!)

> 0.0 and ≤ 100.0: interpreted as i, and j assumed to be = 0

where

i

=

index of the rotation

j

=

1

rotation with respect to x axis

=

2

rotation with respect to y axis

=

3 or 0

rotation with respect to z axis

(see Note 4)

Default

= 0.0  (no transformation defined)

WHAT(2) =

polar angle of the rotation (\(\theta\) = 0 …180 degrees)

Default

:  no default

WHAT(3) =

azimuthal angle of the rotation (\(\phi\) = -180 …180 degrees)

Default

:  no default

WHAT(4) =

X\(_{offset}\) for the translation

Default

:  no default

WHAT(5) =

Y\(_{offset}\) for the translation

Default

:  no default

WHAT(6) =

Z\(_{offset}\) for the translation

Default

:  no default

SDUM

: name of the transformation

Default

:  a name will provided by the program

Default

(option ROT–DEFIni not given): no transformation is defined

Notes

  1. FLUKA binnings (spatial meshes independent of the problem geometry, designed to score average or event-by-event quantities) are generally defined as Cartesian structures parallel to the coordinate axes, or as cylindrical structures parallel to the z-axis. However, it is possible to define binnings with any arbitrary position and direction in space, by means of transformations described by commands ROT–DEFIni and ROTPRBIN.​

    Command ROT–DEFIni defines rotations/translations to be applied to binnings (requested by the user by means of EVENTBIN or USRBIN). Each transformation defined by ROT–DEFIni is assigned a number WHAT(1) which can be applied to one or more binnings. The correspondence between transformation index and binning number is assigned via option ROTPRBIN.

  2. Command ROT–DEFIni can be used also to define roto-translations to be applied to lattice cells. Command LATTICE (see description in LATTICE card) sets the correspondence between transformation index and lattice cell.

  3. Command ROT–DEFIni can be used also to define roto-translations to be applied to bodies in the geometry, as requested by the $Start_transform.....$End_transform directive (see Roto-translation transformation).

  4. The transformation matrices​ are:

    j = 1:

    \[\begin{split}\left| \begin{array}{c} X_{new} \\ Y_{new} \\ Z_{new} \end{array} \right|~=~\left| \begin{array}{ccc} \cos\theta & \sin\theta & 0 \\ -\sin\theta & \cos\theta & 0 \\ 0 & 0 & 1 \end{array} \right| \left| \begin{array}{ccc} 1 & 0 & 0 \\ 0 & \cos\phi & \sin\phi \\ 0 & -\sin\phi & \cos\phi \end{array} \right| \left| \begin{array}{c} X_{old}+X_{offset} \\ Y_{old}+Y_{offset} \\ Z_{old}+Z_{offset} \end{array} \right|\end{split}\]

    j = 2:

    \[\begin{split}\left| \begin{array}{c} X_{new} \\ Y_{new} \\ Z_{new} \end{array} \right|~=~\left| \begin{array}{ccc} 1 & 0 & 0 \\ 0 & \cos\theta & \sin\theta \\ 0 & -\sin\theta & \cos\theta \end{array} \right| \left| \begin{array}{ccc} \cos\phi & 0 & -\sin\phi \\ 0 & 1 & 0 \\ \sin\phi & 0 & \cos\phi \end{array} \right| \left| \begin{array}{c} X_{old}+X_{offset} \\ Y_{old}+Y_{offset} \\ Z_{old}+Z_{offset} \end{array} \right|\end{split}\]

    j = 3:

    \[\begin{split}\left| \begin{array}{c} X_{new} \\ Y_{new} \\ Z_{new} \end{array} \right|~=~\left| \begin{array}{ccc} \cos\theta & 0 & -\sin\theta \\ 0 & 1 & 0 \\ \sin\theta & 0 & \cos\theta \end{array} \right| \left| \begin{array}{ccc} \cos\phi & \sin\phi & 0 \\ -\sin\phi & \cos\phi & 0 \\ 0 & 0 & 1 \end{array} \right| \left| \begin{array}{c} X_{old}+X_{offset} \\ Y_{old}+Y_{offset} \\ Z_{old}+Z_{offset} \end{array} \right|\end{split}\]

    \(R_{ij}~=~T_{ik} P_{kj}\):

    \[\begin{split}\left| \begin{array}{c} X_{new} \\ Y_{new} \\ Z_{new} \end{array} \right|~=~\left| \begin{array}{ccc} \cos\phi \times \cos\theta & \sin\phi \times \cos\theta & -\sin\theta \\ -\sin\phi & \cos\phi & 0 \\ \cos\phi \times \sin\theta & \sin\phi \times \sin\theta & \cos\theta \end{array} \right| \left| \begin{array}{c} X_{old}+X_{offset} \\ Y_{old}+Y_{offset} \\ Z_{old}+Z_{offset} \end{array} \right|\end{split}\]

    and the inverse \(R^{-1}_{ij}~=~P^{-1}_{ik} T^{-1}_{kj}\):

    \[\begin{split}\left| \begin{array}{c} X_{old} \\ Y_{old} \\ Z_{old} \\ \end{array} \right|~=~\left| \begin{array}{ccc} \cos\phi & -\sin\phi & 0 \\ \sin\phi & \cos\phi & 0 \\ 0 & 0 & 1 \end{array} \right| \left| \begin{array}{ccc} \cos\theta & 0 & \sin\theta \\ 0 & 1 & 0 \\ -\sin\theta & 0 & \cos\theta \\ \end{array} \right| \left| \begin{array}{c} X_{new} \\ Y_{new} \\ Z_{new} \end{array} \right| - \left| \begin{array}{c} X_{offset} \\ Y_{offset} \\ Z_{offset} \end{array} \right|\end{split}\]
    \[\begin{split}\left| \begin{array}{c} X_{old} \\ Y_{old} \\ Z_{old} \\ \end{array} \right|~=~\left| \begin{array}{ccc} \cos\phi \times \cos\theta & -\sin\phi & \cos\phi \times \sin\theta \\ \sin\phi \times \cos\theta & \cos\phi & \sin\phi \times \sin\theta \\ -\sin\theta & 0 & \cos\theta \end{array} \right| \left| \begin{array}{c} X_{new} \\ Y_{new} \\ Z_{new} \end{array} \right| - \left| \begin{array}{c} X_{offset} \\ Y_{offset} \\ Z_{offset} \end{array} \right|\end{split}\]
  5. For example (assume zero offset and \([x,y,z]\) = old frame, \([x',y',z']\) = new frame):
    \(\theta~=~\pi/2, \phi~=~0\):

    j = 1:

    \[\begin{split}\begin{aligned} x' & = & y \\ y' & = &-x \\ z' & = & z \end{aligned}\end{split}\]

    j = 2:

    \[\begin{split}\begin{aligned} x' & = & x \\ y' & = & z \\ z' & = & -y \end{aligned}\end{split}\]
    j = 3:
    \[\begin{split}\begin{aligned} x' & = & -z \\ y' & = & y \\ z' & = & x \end{aligned}\end{split}\]
    \(\theta~=~0, \phi~=~\pi/2\):

    j = 1:

    \[\begin{split}\begin{aligned} x' & = & x \\ y' & = & z \\ z' & = & -y \end{aligned}\end{split}\]

    j = 2:

    \[\begin{split}\begin{aligned} x' & = & -z \\ y' & = & y \\ z' & = & x \end{aligned}\end{split}\]
    j = 3:
    \[\begin{split}\begin{aligned} x' & = & y \\ y' & = & -x \\ z' & = & z \end{aligned}\end{split}\]
    That is, the vector which has position angles \(\theta\) and \(\phi\) with respect to the j\(_{th}\) axis in the original system, will become the j\(_{th}\) axis in the rotated system. For the special case \(\theta~=~0\) this implies a rotation of \(-\phi\) in the original frame. In practice it is more convenient to think about the inverse rotation, the one which takes the j\(_{th}\) versor into the versor with \(\theta\) and \(\phi\).
  6. Note that a transformation can be defined recursively​, for example with two cards pointing to the same transformation. If P\(_{ij}\) is the rotation corresponding to the first card and T\(_{ij}\) the one corresponding to the second card, the overall rotation will be \(R_{ij}~=~T_{ik} P_{kj}\)

Example (number based):

*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+...
ROT-DEFI       201.0       0.0      90.0    -100.0      80.0    -500.0
USRBIN          11.0     201.0      70.0      30.0       0.0    1000.0tot-dose
USRBIN           0.0       0.0       0.0      10.0       1.0       6.0&
ROTPRBIN        -1.0       1.0                 1.0       1.0       1.0
*  Here the transformation is applied to a cylindrical binning.
*  Track-lengths are scored in the binning with its axis
*  parallel to the x-axis of the coordinate frame:
*    Xmin = 100.0, Xmax = 1100.0
*    Rmin =   0.0, Rmax =   30.0
*    ( Y , Z ) coordinate of the binning axis = ( -80.0 , 500.0 )

The same example, name based:

*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+...
ROT-DEFI       201.0       0.0      90.0    -100.0      80.0    -500. FromZtoX
USRBIN          11.0     201.0      70.0      30.0       0.0    1000.0tot-dose
USRBIN           0.0       0.0       0.0      10.0       1.0       6.0&
ROTPRBIN        -1.0  FromZtoX       0.0  tot-dose       0.0       0.0