Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:01

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 from __future__ import print_function
0017 
0018 import math
0019 
0020 beam = eval(str(input("beam energy in GeV: ")))
0021 betastar = eval(str(input("beta-star in m: ")))
0022 normemittance = eval(str(input("normalized emittance in m: ")))
0023 
0024 gamma = beam/0.9383
0025 
0026 emittance = normemittance/(gamma*math.sqrt(1.-1/(gamma*gamma)))
0027 
0028 width = math.sqrt(emittance*betastar)
0029 
0030 print(" emittance in m: " + str(emittance))
0031 print(" beam width in m: " + str(width))
0032