# Coordinate System

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

## Basic Coordinate System

The following picture is the basic coordinate system in E05115. We have three coordinate systems, HKS, HES and Global. and coordinate system is right-handed.

The global coordinate system is same as a coordinate system that of target variables (mom, x' and y').

HKS coordinate system is just rotate the global coordinate system.

```X : high momentum side is +
Y : gravity direction is -
Z : kaon direction is +
```

A number of a detector is increasing with higher momentum side.

HES coordinate system is tricky as follows;

```X : high momentum side is +
Y : gravity direction is +
Z : e' direction is +
```

A number of a detector is decreasing with higher momentum side.

We have to be careful when calculate MM. When we translate FP variables into target variables in HES with usual matrix, the direction of X and Y should be unparalleled to global coordinate system. Then we need to translate X' -> -X' and Y' -> -Y' at target.

ENGINE used this coordinate system.

## Coordinate system in Geant4

The coordinate system in G4 is different from basic one.

Though the definition of global and HKS is same as basic one, the definition of HES is as following;

```X : high momentum side is -
Y : gravity direction is -
Z : e' direction is +
phi=atan(px/py)
theta=acos(pz/p)
```

Therefore, we don't need to translate target variables when we calculate MM in G4.