# Scanning Table Coordinate System and Projections

For the coordinates in the scanned detector and the two PSD positions, a single global coordinate system can be used. A quite convenient choice of coordinate system is to place the origin in the rotation axis of the scanning table such that its projection is in the center of the PSD in both positions. During the measurement the PSD is kept a fixed distance from the source (d1) and also the distance from the rotation axis to the source is fixed (d2). In case theses distances are different for the side and the front scan, a more general approach has to be considered. Also, here only the case is considered where the side position is rotated by 90° with respect to the front position.

## Projections (scanned detector position -> front / side coordinates)

For a given position (x,y,z) in the scanned detector, the projections onto the front and side PSD are given by:

P_Front(x,y,z) = ( d1+d2 , -y*d2/(d1*x) , -z*d2/(d1-x) )
P_Side(x,y,z) = ( -x*d2/(d1-y) , d1+d2 , -z*d2/(d1-y) )

## Distance between trajectories (front / side cordinates -> scanned detector position?)

Given one event from the front scan and one event from the side scan, it is very unlikely that the corresponding trajectories cross. However, the distance of closest approach of the two trajectories can be used as measure of how likely it is that the two events originate from the same point in the scanned detector.

The trajectories can be written as:

T_Front(fy,fz) = (d1+d2,fy,fz) + λ (-d2,-fy,-fz) = **a** + λ**b**
T_Side(sx,sz) = (sx,d1+d2,sz) + λ (-sx,-d2,-sz) = **c** + λ**d**

And the distance can be calculated via (cf. eg.

http://en.wikipedia.org/wiki/Skew_lines#Distance):

**n** = **b** x **d **/ |**b **x** d**|

dist = |(**a**-**c**).**n**|

Due to the position uncertainty in the PSD, the two trajectories do not cross, even if the two events originate from the same interaction position. Given one event from the side scan and one from the front scan, they "most likely" originate from the same interaction position, when the two signals differ only by noise. The "most likely" interaction position is given by the point that is 1/2 dist apart from each of the trajectories (cf. eg.

http://de.wikipedia.org/wiki/Windschiefe):

**X** = 1/2 [ **F1 ** + **F2** ]
**F1** = **d** (**a**. **n1** - **c**. **n1**)/(**d**. **n1**) + **c**
**F2** = **b** (**c**. **n2** - **a**. **n2**)/(**b**. **n2**) + **a**
**n1** = **b** x (**b** x **d**)
**n2** = **d** x (**b** x **d**)