Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-27 03:17:52

0001 #!/usr/bin/env python
0002 ############################################################################
0003 #
0004 # Author: Francisco Yumiceva
0005 # yumiceva@fnal.gov
0006 #
0007 # Fermilab, 2009
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