  The Beijing Electron Spectrometer III (BESIII) is a multipurpose detector
operating on the Beijing Electron Positron Collider II (BEPCII). After more
than ten year's operation, the efficiency of the inner layers of the Main Drift
Chamber (MDC) decreased significantly. To solve this issue, the BESIII
collaboration is planning to replace the inner part of the MDC with three
layers of Cylindrical triple Gas Electron Multipliers (CGEM). The transverse
plane spatial resolution of CGEM is required to be 120 $\mu$m or better. To
meet this goal, a careful calibration of the detector is necessary to fully
exploit the potential of the CGEM detector. In all the calibrations, the
detector alignment plays an important role to improve the detector precision.
The track-based alignment for the CGEM detector with the Millepede algorithm is
implemented to reduce the uncertainties of the hit position measurement. Using
the cosmic-ray data taken in 2020 with the two layers setup, the displacement
and rotation of the outer layer with respect to the inner layer is determined
by a simultaneous fit applied to more than 160000 tracks. A good alignment
precision has been achieved that guarantees the design request could be
satisfied in the future. A further alignment is going to be performed using the
combined information of tracks from cosmic-ray and collisions after the CGEM is
installed into the BESIII detector.
