MediaWiki API result

This is the HTML representation of the JSON format. HTML is good for debugging, but is unsuitable for application use.

Specify the format parameter to change the output format. To see the non-HTML representation of the JSON format, set format=json.

See the complete documentation, or the API help for more information.

{
    "batchcomplete": "",
    "continue": {
        "gapcontinue": "Software/EasyBuild",
        "continue": "gapcontinue||"
    },
    "warnings": {
        "main": {
            "*": "Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/> for notice of API deprecations and breaking changes."
        },
        "revisions": {
            "*": "Because \"rvslots\" was not specified, a legacy format has been used for the output. This format is deprecated, and in the future the new format will always be used."
        }
    },
    "query": {
        "pages": {
            "5": {
                "pageid": 5,
                "ns": 0,
                "title": "Software",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "A number of different pieces of software are used to run simulations and analyse data.  Information is available for the following pieces of software:\n\n* [[/Geant4|Geant4]].\n* [[/BDSIM|BDSIM]].\n* [[/ROOT|ROOT]].\n* [[/EasyBuild|EasyBuild]]."
                    }
                ]
            },
            "168": {
                "pageid": 168,
                "ns": 0,
                "title": "Software/BDSIM",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "== BDSIM ==\n\nBDSIM (Beam Delivery Simulation) is a program that uses a suite of high energy physics software including Geant4, CLHEP & ROOT to build a 3D model of an accelerator and simulate the passage of particles through both the vacuum and the material of the accelerator itself seamlessly.\n\n*Useful Links:\n** [https://twiki.ph.rhul.ac.uk/twiki/bin/view/PP/JAI/BdSim RHUL BDSIM Webpage]\n** [http://www.pp.rhul.ac.uk/bdsim/manual/index.html BDSIM Documentation]\n** [https://bitbucket.org/jairhul/bdsim BDSIM Bitbucket Page]\n** [http://www.pp.rhul.ac.uk/bdsim/manual/installation.html Official Installation Guide]\n\nThis is a tutorial about installing and using BDSIM. BDSIM is installed on the HEP Linux cluster at UCL. You will need an account on that cluster to be able to use this software, run example tutorials and create your own simulations. \n\n== Running BDSIM Simulations ==\n\nIn order to run BDSIM simulations, you will either need to download and install the software yourself or make use of the existing installation on the UCL HEP Linux cluster.\n\nIn order to use the UCL HEP Linux cluster, you will need a HEP account: please contact Dr. Simon Jolly for more details. \n\n=== Running on the UCL HEP Linux Cluster (EasyBuild) ===\n\nIn order to run <code>BDSIM</code> simulations on the UCL HEP Cluster, you must source the BDSIM PBT environment from a system within the cluster that is running CentOS7. This can be done using the following command:\n\n<pre>\n$ source /unix/pbt/software/scripts/bdsim.sh \n</pre>\n\nThis sets up all the required EasyBuild modules and environment variables. The version of BDSIM that is used within this script is not the latest build (v1.1.0 instead of v1.2.+) but should be stable. If a newer version is required then contact James Chappell and he will compile a newer version for you to use.\n\nNow your system is ready to use <code>BDSIM</code>. To check that it is working correctly, test the built-in help function: \n\n<pre>\n$ bdsim --help\n</pre>\n\nThis should produce an output explaining all the possible options that can be used within <code>BDSIM</code>.\n\n=== Running on the UCL HEP Linux Cluster (Old) ===\n\n'''These instructions are now out of date and it is not recommended that you use this version of BDSIM unless you have experience with the pain of compiling BDSIM, Geant4 and all their dependencies. Whenever possible, use the EasyBuild version. Contact Simon Jolly or James Chappell if any required functionality is missing.'''\n\nIn order to run <code>BDSIM</code> simulations on the UCL HEP Cluster, you must first source the development version of the PBT environment from a system within the cluster that is running either CentOS7 or Scientific Linux V6. This can be done using the following command:\n\n<pre>\n$ source /unix/pbt/software/scripts/pbt.sh -vd\n</pre>\n\n'''Note:''' the '-d' flag is essential as this sources the script that links the latest development software available on the PBT section of the cluster. \n\nNow your system is ready to use <code>BDSIM</code>. To check that it is working correctly, test the built-in help function: \n\n<pre>\n$ bdsim --help\n</pre>\n\nThis should produce an output explaining all the possible options that can be used within <code>BDSIM</code>.\n\n== Required Software ==\n\nBDSIM requires the following software to be installed:\n\n* Recent compiler with full C++11 support - proven compiler versions are GCC v4.9 or higher, or Clang 6 or higher.\n* CMake v2.8.12 or higher\n* CLHEP v2.1.3.1 or higher\n* ROOT v6.x or higher\n* Geant4 v4.10 or higher\n* Flex v2.5.37 or higher\n* Bison v2.3 or higher\n\nThese are all installed on the UCL HEP cluster.\n\n== Details ==\n\n; Website: https://twiki.ph.rhul.ac.uk/twiki/bin/view/PP/JAI/BdSim\n\n; Latest Version: 0.9.9.2 (19th October 2017)\n\n== Installation Instructions ==\n\nThe installation process follows the general process described on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]] page.  \nThe basic method used is as follows:\n\n# Check that all the prerequisites for building <code>BDSIM</code> are installed (see above);\n# Download the latest version of the source code;\n# Create a build folder;\n# Configure, build and install <code>BDSIM</code> from within the build folder.\n\n=== Download BDSIM from its central repository ===\n\nThe BDSIM source code can be downloaded from its git repository using:\n\n<pre> $ git clone --recursive <nowiki>https://bitbucket.org/jairhul/bdsim</nowiki> </pre>\n\nThis creates a <code>/bdsim</code> folder within your current folder. This folder contains all the code, examples, documentation and associated Python packages.\n\n=== Configure, build and install <code>BDSIM</code> ===\n\n'''Note:''' When installing <code>BDSIM</code>, all the <code>Geant4</code> environment variables must be available. This can be tested using the following command:\n\n<pre> $ echo $G4 <tab> </pre>\n\nIf the <code>Geant4</code> environment variables are available, you should see an output similar to:\n\n<pre> \n$G4ABLADATA          $G4NEUTRONHPDATA      $G4REALSURFACEDATA \n$G4ENSDFSTATEDATA    $G4NEUTRONXSDATA      $G4SAIDXSDATA \n$G4LEDATA            $G4PIIDATA            $G4SHARE \n$G4LEVELGAMMADATA    $G4RADIOACTIVEDATA    $G4VERSION \n</pre>\n\nThis output corresponds to using the UCL PBT environment, but it will be dependent on the installed <code>Geant4</code> modules. If this does not return a list of environment variables, make sure you have correctly sourced the <code>Geant4</code> environment script and updated all relevant path variables.\n\nOnce the source code has been downloaded, a build directory should be created alongside the <code>src</code> to hold the compiled <code>BDSIM</code> files before they are moved to their final installation location.\n\nOn the UCL HEP Linux Cluster, the build directory should be created in <code>/unix/pbt/software/build</code>: \n\n<pre>\n$ cd /unix/pbt/software/build\n$ mkdir bdsim\n$ cd bdsim\n$ mkdir bdsim-0.9.9.2-build\n$ cd bdsim-0.9.9.2-build\n</pre>\n\nUnlike other software installed on the UCL HEP Linux Cluster, there are a number of ways to configure the software before building. Using the <code>ccmake</code> command, each configuration option can be set interactively:\n\n<pre>\n$ cmake ../../../src/bdsim/bdsim-bitbucket/\n\n$ ccmake .\n</pre>\n\nCMake opens an interactive configuration program. Set the options as required for your system e.g. on the UCL HEP Cluster:\n\n<pre>\nCMAKE_INSTALL_PREFIX     /unix/pbt/software/dev/bdsim-0.9.9.2/\nUSE_AWAKE                ON\n</pre>\n\nNote that the <code>CMAKE_INSTALL_PREFIX=/unix/pbt/software/dev/bdsim-0.9.9.2</code> flag specifies that the resulting <code>BDSIM</code> should be installed in the directory <code>/unix/pbt/software/dev/bdsim-0.9.9.2</code> after compilation: this should be changed to suit the particular installation in question.\n\n*''c'' to configure.\n\n*''g'' to generate and exit.\n\n<code>BDSIM</code> can then be compiled and installed by running:\n\n<pre>\n$ make\n$ make install\n</pre>\n\n== Testing ==\n\nMultiple examples are provided with the source code and can be found in the original build folder. A complete list of examples and tutorials for running them can be found at http://www.pp.rhul.ac.uk/bdsim/manual/examples/examples.html\n\nHere, the simpleMachine example will be demonstrated.\n\nFirst, navigate to the examples within build directory and find simpleMachine:\n\n<pre>\n$ cd /unix/pbt/software/build/bdsim/bdsim-0.92-dev/bdsim-build-updated/examples\n$ cd simpleMachine\n</pre>\n\nTo run the simulation via the GUI use the command:\n\n<pre>\n$ bdsim --file=sm.gmad\n</pre>\n\nAn interface should load up and display the simpleMachine setup. It has a few drift beam pipes with a quadrupole, collimator and sector bend dipole magnet. To run the simulation once with any output exported to a file called <code>output.root</code>, use the following command:\n\n<pre>\n$ bdsim --file=sm.gmad --outfile=output\n</pre>\n\nFrom within the GUI command line, type:\n\n<pre>\n/run/beamOn 1\nexit\n</pre>\n\nThis will execute a single run of the simulation with the output data exported to <code>output.root</code>. This can then be analysed from within ROOT by following the tutorial at http://www.pp.rhul.ac.uk/bdsim/manual/output_analysis.html.\n\nTo run this simulation in Batch mode, the following command can be used:\n\n<pre>\n$ bdsim --file=sm.gmad --outfile=output --batch\n</pre>\n\nBatch mode has no interactive interface, but as a consequence is much faster and exits the program once it has finished. For simulations with large numbers of particles within the beam, this is the preferred method of use.\n\n== AWAKE Spectrometer Simulation ==\n\nA model of the AWAKE spectrometer is available at <code>/unix/pdpwa/AWAKE_spectrometer/spectrometer</code>. This model (<code>spectrometer.gmad</code>) describes the spectrometer, downstream of the plasma cell, and includes the quadrupole magnets, drift sections and the spectrometer. Also included in this folder are:\n\n* <code>options.gmad</code> - includes definitions of constants used within the spectrometer model.\n* <code>spec_test.C</code> - a ROOT macro that plots and fits the Energy vs. position on the screen for particles that pass through the spectrometer.\n* <code>vis.mac</code> - settings for the interactive BDSIM GUI.\n* <code>README</code> - instructions on running the simulation.\n\n=== Running the Simulation ===\n\nFirst source the BDSIM environment as described [[#Running on the UCL HEP Linux Cluster| above]]. To run the simulation using the test electron beam (E = 0 -> 10 GeV), use the command:\n\n<pre>\n$ bdsim --file=spectrometer.gmad --outfile=output --batch\n</pre>\n\nThe output is then stored in a file called <code>output.root</code>. There one supplied script for analysis of this output: <code>spec_test.C</code>. \n\n==== ROOT Macro ====\n\nThe analysis script provided is a ROOT Macro that automatically plots the energy of the particle against the x-position on the screen and then fits this curve for comparison to the analytic model. It allows easy confirmation that the simulation is working as expected. It can be used via:\n\n<pre>\n$ root\nroot > .x spec_test.C\n</pre>\n\n=== Python Scripts - Creating Field Maps ===\n\nThere is a directory called <code>python_scripts</code> within the AWAKE spectrometer example directory on the UCL HEP cluster. The script <code>uniformfield.py</code> can be used to generate uniform magnetic field maps that can be used within the AWAKE spectrometer simulation. \n\n==== Setting up pyBDSIM ====\n\nBDSIM comes with a group of python modules that can be used to create and visualise aspects of the simulation, e.g. beam distributions and field maps. More information on these modules can be found at http://www.pp.rhul.ac.uk/bdsim/manual/python_modules.html. To download these modules from bitbucket, use the following commands from within your BDSIM source directory:\n\n<pre>\n$ git pull\n$ git submodule init\n$ git submodule update\n</pre>\n\nTo compile the modules, use:\n\n<pre>\n$ cd utils\n$ make\n</pre>\n\nThis compilation assumes you are using a python environment with <code>pip</code> installed. If you are running this on the UCL HEP cluster, then follow the instructions on https://www.hep.ucl.ac.uk/twiki/bin/view/Computing/UsingPython to create a virtual environment in which you can install the modules.\n\n==== Creating a uniform magnetic field map ====\n\nTo create a uniform magnetic field map, you can use the python script <code>uniformfield.py</code> in the following way from the command line:\n\n<pre>\n$ python uniformfield.py --fieldstrength <fieldstrength> --length <length>\n</pre>\n\nwhere you insert your desired values for the field strength (in T) and length (in m). The length variable must equal the length value given to <code>spectrometer.gmad</code> when defining the <code>awakespectrometer</code> class. It is required due to the way the spectrometer field map is defined within the source code. If you do not give the same length value, the field will be placed in the wrong position within the simulation and the results will be incorrect."
                    }
                ]
            }
        }
    }
}