LinacAccLattice#
- class orbit.py_linac.lattice.LinacAccLattice(name=None)[source]#
Bases:
orbit.lattice.AccLattice.AccLatticeThe subclass of the AccLattice class. In the beginning the lattcie is empty.
Methods Summary
addSequence(seq)It is a convenience method.
getNodesOfClass(Class[, seq_names])Returns the list of all nodes which are instances of Class or these nodes which are also belong to a particular sequence.
getNodesOfClasses(Classes[, seq_names])Returns the list of all nodes which are instances of any Class in Classes array or these nodes which are also belong to a particular sequence.
getQuads([seq])Returns the list of all quads or just quads belong to a particular sequence.
Returns the array with RF cavities.
getRF_Cavity(name)Returns the cavity instance according to the name
getRF_Gaps([rf_cav])Returns the list of all RF gaps or just gaps belong to a particular RF cavity.
getSequence(name)Returns the sequence instance according to the name
Returns the array with sequences.
getSubLattice([index_start, index_stop])It returns the new LinacAccLattice with children with indexes between index_start and index_stop inclusive.
Method.
This method is used for a lattice reversal and a bunch backtracking.
setLinacTracker([switch])This method will switch tracker module to the linac specific traker for each node on the first level.
trackActions(actionsContainer[, paramsDict, ...])Method.
trackBunch(bunch[, paramsDict, ...])It tracks the bunch through the lattice.
trackDesignBunch(bunch_in[, paramsDict, ...])This will track the design bunch through the linac and set up RF Cavities times of arrivals.
Methods Documentation
- getNodeForPosition(z)[source]#
It is a convenience method. It returns the node which coordinates cover the z-position.
- getNodesOfClass(Class, seq_names=[])[source]#
Returns the list of all nodes which are instances of Class or these nodes which are also belong to a particular sequence.
- getNodesOfClasses(Classes, seq_names=[])[source]#
Returns the list of all nodes which are instances of any Class in Classes array or these nodes which are also belong to a particular sequence.
- getQuads(seq=None)[source]#
Returns the list of all quads or just quads belong to a particular sequence.
- getRF_Gaps(rf_cav=None)[source]#
Returns the list of all RF gaps or just gaps belong to a particular RF cavity.
- getSubLattice(index_start=- 1, index_stop=- 1)[source]#
It returns the new LinacAccLattice with children with indexes between index_start and index_stop inclusive. UNFORTUNATELY: At this moment it is not possible because the lattice has RF gap with unique references to RF cavities and Sequences which are bidirectional.
- initialize()[source]#
Method. Initializes the linac lattice, child node structures, and calculates the one turn matrix.
- reverseOrder()[source]#
This method is used for a lattice reversal and a bunch backtracking. This method will reverse the order of the children nodes. It will apply the reverse recursively to the all children nodes.
- setLinacTracker(switch=True)[source]#
This method will switch tracker module to the linac specific traker for each node on the first level.
- trackActions(actionsContainer, paramsDict={}, index_start=- 1, index_stop=- 1)[source]#
Method. Tracks the actions through all nodes in the lattice. The indexes are inclusive. The method from the parent class was overloaded to provide the ability to stop tracking if necessary. In the linac, the synchronous particle could start to move backwards in the lattice because of the RF parameters are far away from the design values (acceptance scans).