In-beam positron emission tomography (in-beam PET) is based on the beta(+)-activation of the irradiated volume and of the beam itself by interactions between the incoming ions and the nuclei of the tissue. Due to the particular situation of in-beam PET, i.e. space for the rotating patient table and for the beam delivery has to be provided, the unique in-beam PET scanner cannot be a full ring device as in conventional PET imaging. It is necessary for patient evaluation to establish a relationship between the beta(+)-activity created during therapeutic treatment and the anatomy of the patient. Therefore, the PET images have to be superimposed onto the planning X-ray computed tomogram (CT) with sub-millimeter precision. Since in-beam PET images and planning CT are acquired at completely different devices, they are matched by means of stereotactic coordinates. To provide a high flexibility of the measurement the double head PET scanner is rotatable around the central beam. Due to the weight of the detectors, the PET gantry is deformed under rotation, resulting in a displacement of the crystal positions in comparison to those, which are expected when assuming a rigid body rotation. Therefore, a technical solution to define the exact detector positions at any rotation angles has been developed. An exemplary embodiment will be illustrated by means of the in-beam PET installation at GSI.