Accelerator for acceleration of charged particles