b.addParticle(0.0,0.0,0.0,1.0e-3,0.0,0.0) b.addParticle(0.0,0.0,0.0,0.0,1.0,0.0) b.addParticle(0.0,0.0,0.0,0.0,0.0,1.0e-3) b.compress() syncPart = b.getSyncParticle() energy = 1.0 #energy in GeV #p = syncPart.energyToMomentum(energy) #syncPart.pz(p) syncPart.kinEnergy(energy) lattice = AccLattice("test_lattice") elem0 = teapot.DriftTEAPOT("drift0") lattice.addNode(elem0) #----------------------------- # Set TEAPOT nodes parameters #----------------------------- elem0.setLength(4.0) lattice.initialize() #/////////////////////////////////////////////////////////// ZtoPhi = 2.0 * math.pi / lattice.getLength() dESync = 0.0 RFHNum = 1.0 RFVoltage = 0.1 RFPhase = 0.0
import math import posix from orbit.lattice import AccLattice, AccNode, AccActionsContainer lattice = AccLattice("test_lattice") elem1 = AccNode("el-1") elem2 = AccNode("el-2") elem3 = AccNode("el-3") elem1.setLength(1.1) elem2.setLength(2.1) elem3.setLength(3.1) lattice.addNode(elem1) lattice.addNode(elem2) lattice.addNode(elem3) elem1_1 = AccNode("el-1-1") elem1_1.setnParts(2) elem1_1_1 = AccNode("el-1-1-1") elem1_1_2 = AccNode("el-1-1-2") elem1_1_3 = AccNode("el-1-1-3") elem1_1_4 = AccNode("el-1-1-4") elem1.addChildNode(elem1_1, AccNode.ENTRANCE) elem1_1.addChildNode(elem1_1_1, AccNode.ENTRANCE) elem1_1.addChildNode(elem1_1_2, AccNode.BODY, 0) elem1_1.addChildNode(elem1_1_3, AccNode.BODY, 1) elem1_1.addChildNode(elem1_1_4, AccNode.EXIT)
import math import posix from orbit.lattice import AccLattice, AccNode, AccActionsContainer lattice = AccLattice("test_lattice") elem1 = AccNode("el-1") elem2 = AccNode("el-2") elem3 = AccNode("el-3") elem1.setLength(1.1) elem2.setLength(2.1) elem3.setLength(3.1) lattice.addNode(elem1) lattice.addNode(elem2) lattice.addNode(elem3) elem1_1 = AccNode("el-1-1") elem1_1.setnParts(2) elem1_1_1 = AccNode("el-1-1-1") elem1_1_2 = AccNode("el-1-1-2") elem1_1_3 = AccNode("el-1-1-3") elem1_1_4 = AccNode("el-1-1-4") elem1.addChildNode(elem1_1,AccNode.ENTRANCE) elem1_1.addChildNode(elem1_1_1,AccNode.ENTRANCE) elem1_1.addChildNode(elem1_1_2,AccNode.BODY,0) elem1_1.addChildNode(elem1_1_3,AccNode.BODY,1) elem1_1.addChildNode(elem1_1_4,AccNode.EXIT)
b.addParticle(0.0, 0.0, 0.0, 0.0, 1.2, 0.0) b.addParticle(0.0, 0.0, 0.0, 0.0, 1.5, 0.0) b.addParticle(0.0, 0.0, 0.0, 0.0, 1.8, 0.0) b.compress() syncPart = b.getSyncParticle() energy = 1.0 #energy in GeV #p = syncPart.energyToMomentum(energy) #syncPart.pz(p) syncPart.kinEnergy(energy) lattice = AccLattice("test_lattice") elem0 = teapot.DriftTEAPOT("drift0") lattice.addNode(elem0) #----------------------------- # Set TEAPOT nodes parameters #----------------------------- elem0.setLength(4.0) lattice.initialize() #/////////////////////////////////////////////////////////// ZtoPhi = 2.0 * math.pi / lattice.getLength() RFVoltage = 0.1 RFPhasep = 150.0 RFPhasem = -150.0 dRFPhasep = 30.0