Routines for modeling extraction from the synchrotron

The programs and files in the darkphoton directory tree are a starting point for the study of resonant extraction. The program resonantextraction.f90 and related subroutines read and parse the synchrotron lattice file.

Instructions for acquiring darkphoton code and bmad routines, and building executables



Acquisition Within Wilson Lab of code from the Wilson accelerator code repository


  1. If you have not done this already, make a directory for your local copy of the Bmad darkphoton distribution, programs, etc. Henceforth this directory will be referred to as < DIR >. A possible name might be: "root_dir". Substitute the appropriate directory name for " < DIR >" in the following steps.

  2. To make a local copy of a directory, the commands:

       cd < DIR >
       svn co https://accserv.lepp.cornell.edu/svn/<REPOS_PATH>.

    To find the correct < REPOS_PATH >, use the repository web viewer. For example. to make a local copy of the darkphoton directory tree, use the commands:


      cd <DIR>
      svn co https://accserv.lepp.cornell.edu/svn/trunk/src/darkphoton

    This will create the directory <DIR>/darkphoton

  3. To update your local copy of a library and/or executable so that it has all the revisions that have been introduced into the repository, go to the directory containing the library and/or executable and use the command:

       svn update

  4. To compile the library: (see Environment Variables)

    cd <DIR>/darkphoton
    mk          # Produces production libraries and/or executables


    Or use "mkd" instead of "mk" if you want to create the debug versions of the libraries and/or executables.

    Production libraries and executables are put in the directory:

    <DIR>/production/bin

    and debug libraries and executables are put in:

    <DIR>/debug/bin


darkphoton/ directory tree


<DIR>darkphoton

CMakelists.txt - list of cmake files and cmake.toy and cmake.ramp_test - to build executable
Subdirectories of darkphoton/ include: programs  code  ramp  example  ramp_test  plotting_scripts  machine_data  files  toy  doc

ramp_test: The most complete executable(for analyzing acceleration and extraction from the synchrotron)
toy: Is a useful tool for experimenting with BMAD commands and learning about beam optics


Executables