Esempio n. 1
0
from orbit.py_linac.overlapping_fields import JPARC_EngeFunctionFactory

from jparc_linac_bunch_generator import JPARC_Linac_BunchGenerator

from orbit_utils import bunch_utils_functions
from bunch_utils_functions import copyCoordsToInitCoordsAttr

random.seed(100)


#---- Define the list of subsecuences for the lattice
names = ["LI_MEBT1",]

#---- create the factory instance
jparc_linac_factory = JPARC_LinacLatticeFactory()
jparc_linac_factory.setMaxDriftLength(0.01)

#---- the XML file name with the structure
xml_file_name = "../jparc_linac_lattice_xml/jparc_linac.xml"

#---- make lattice from XML file 
accLattice = jparc_linac_factory.getLinacAccLattice(names,xml_file_name)

seq_names = names

print "Linac lattice is ready. L=",accLattice.getLength()

#----set up RF Gap Model -------------
#---- There are three available models at this moment
#---- BaseRfGap  uses only E0TL*cos(phi)*J0(kr) with E0TL = const
Esempio n. 2
0
    names.append(seq_name)

#---- add MEBT2
names.append("LI_MEBT2")

#---- add ACS cavities
for ind in range(21):
    seq_name = "LI_ACS" + "%02d" % (ind + 1)
    names.append(seq_name)
"""
#---- add L3BT
names.append("LI_L3BT")
"""

#---- create the factory instance
jparc_linac_factory = JPARC_LinacLatticeFactory()

#---- the XML file name with the structure
xml_file_name = "../jparc_linac_lattice_xml/jparc_linac.xml"

#---- make lattice from XML file
accLattice = jparc_linac_factory.getLinacAccLattice(names, xml_file_name)

seq_names = names

print "Linac lattice is ready. L=", accLattice.getLength()

#----set up RF Gap Model -------------
#---- There are three available models at this moment
#---- BaseRfGap  uses only E0TL*cos(phi)*J0(kr) with E0TL = const
#---- MatrixRfGap uses a matrix approach like envelope codes