A multi-ener multi-dosage accelerator comprising: an electron gun, an accelerating tube and a target; the electron gun configured to provide a first voltage, a second voltage and a third voltage to an electron beam and to inject the electron beam into the accelerating tube; and the accelerating tube configured to accelerate the injected electron beam into the target, thus generating either a first X-ray having a first dosage and a first energy according to the first voltage of the electron gun, or a second X-ray having a second dosage and a second energy according to the second voltage of the electron gun, or a third X-ray having a third dosage and a third energy according to the third voltage of the electron gun under constant power of a microwave pulse injected into the accelerating tube wherein the first dosage is a dosage not larger than 0.25μSv and is much less than the second and the third dosage, and the second energy is different from the third energy, the multi-energy multi-dosage accelerator is configured to use the first X-ray for inspecting a first area where a person is located, and the second X-ray for inspecting a second area where goods are located, or the second X-ray and the third X-ray alternatively for inspecting the second area where the goods are located; and one of the following conditions is fulfilled: - the first voltage of the electron gun is lower than the second voltage and the third voltage of the electron gun, and the first energy is higher than the second energy and the third energy; or - the first voltage of the electron gun is higher than the second voltage and the third voltage of the electron gun, and the first energy is lower than the second energy and the third energy. an electron gun, an accelerating tube and a target; the electron gun configured to provide a first voltage, a second voltage and a third voltage to an electron beam and to inject the electron beam into the accelerating tube; and the accelerating tube configured to accelerate the injected electron beam into the target, thus generating either a first X-ray having a first dosage and a first energy according to the first voltage of the electron gun, or a second X-ray having a second dosage and a second energy according to the second voltage of the electron gun, or a third X-ray having a third dosage and a third energy according to the third voltage of the electron gun under constant power of a microwave pulse injected into the accelerating tube wherein the first dosage is a dosage not larger than 0.25μSv and is much less than the second and the third dosage, and the second energy is different from the third energy, the multi-energy multi-dosage accelerator is configured to use the first X-ray for inspecting a first area where a person is located, and the second X-ray for inspecting a second area where goods are located, or the second X-ray and the third X-ray alternatively for inspecting the second area where the goods are located; and one of the following conditions is fulfilled: - the first voltage of the electron gun is lower than the second voltage and the third voltage of the electron gun, and the first energy is higher than the second energy and the third energy; or - the first voltage of the electron gun is higher than the second voltage and the third voltage of the electron gun, and the first energy is lower than the second energy and the third energy. - the first voltage of the electron gun is lower than the second voltage and the third voltage of the electron gun, and the first energy is higher than the second energy and the third energy; or - the first voltage of the electron gun is higher than the second voltage and the third voltage of the electron gun, and the first energy is lower than the second energy and the third energy.