File indexing completed on 2024-11-27 03:17:52
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 """
0012 given beta-star and beam energy estimate: gamma, emittance, and beam width
0013 at Z = 0
0014
0015 """
0016
0017 import math
0018
0019 beam = eval(str(input("beam energy in GeV: ")))
0020 betastar = eval(str(input("beta-star in m: ")))
0021 normemittance = eval(str(input("normalized emittance in m: ")))
0022
0023 gamma = beam/0.9383
0024
0025 emittance = normemittance/(gamma*math.sqrt(1.-1/(gamma*gamma)))
0026
0027 width = math.sqrt(emittance*betastar)
0028
0029 print(" emittance in m: " + str(emittance))
0030 print(" beam width in m: " + str(width))
0031