Skip to content

Module description

The main configuration file (described here), after calling the build_sequence.madx and the optics.madx files, executes the following modules:

module_01_orbit.madx

  • Defines the MAD-X beams
  • Performs a twiss for the sequences as loaded by the build_machine script (user-defined knobs are not applied)
  • Applies the user-defined orbit knobs (crossing, separations, experimental magnets)1 and twiss again
  • Save the crossing configuration (saves states of IP knobs and dispersion correction knob, using crossing_save macro from the toolkit).
  • Performs a twiss with flat orbit by running the crossing_disable macro from the toolkit (no crossings nor separation)
  • Performs a twiss with the user-defined orbit (using the crossing_restore macro)
  • NB: Octupoles, tunes and chromaticity are taken from the build_machine. Those defined by the user are introduced later by module_05_tuning.

This module is divided in the following files (sub-modules):

module_02_lumilevel.madx

  • Separates IP8 (in the horizontal plane) to achieve the target luminosity.
  • Run the final crossing save (overwrites states of IP knobs, using crossing_save macro).

module_03_beambeam.madx

  • Forces on_disp=0
  • Configures and installs the beam-beam lenses
  • Generates bb_lenses.dat (to be replaced in the sixtrack input generated by mad)
  • Installs the the crab cavities (if enabled)
  • NB: the beam-beam kicks are left disabled (can be enabled by setting on_bb_charge = 1)
  • NB: module_03_beambeam requires that module_02_lumilevel is run before.

module_04_errors.madx

  • Loads the error tables
  • Introduces misalignments
  • Introduces corrections

Warning

After this stage the USE command cannot be called anymore (it would wipe out the errors), we will work always with the same sequence.

This module is divided in the following files (sub-modules):

module_05_tuning.madx

  • Restores the crossing knobs as saved by module_01_orbit or module_02_lumilevel (using crossing_save)
  • Power the octupoles as defined by the user
  • Matches tunes and chromaticity 2
  • Corrects the linear coupling
  • Clips corrector strengths to maximum allowed
  • Switches on the beam-beam lenses (on_bb_charge = 1)
  • Introduces RF voltage and lags.

This module is divided in the following files (sub-modules):

module_06_generate.madx

  • Produces sixtrack input (call sixtrack command of madx)
  • If BB enabled, inserts beam-beam lenses from bb_lenses.dat into fc.3
  • Performs a twiss on the last machine configuration.

This module is divided in the following files (sub-modules):

Warning

The order of the modules has to be respected but some of the modules (e.g., module_03_beambeam or module_04_errors) can be commented out (it depends on the user's need).


  1. If crab cavities are enabled and the crabbing angle (par_xing_ang_15) exceeds the crossing angle, the crabbing angle is reduced to match the crossing angle 

  2. Done with beam-beam (on_bb_charge = 1) only if par_on_collision=1