{"id":22753909,"url":"https://github.com/slaclab/slic","last_synced_at":"2025-04-14T15:34:17.741Z","repository":{"id":19613517,"uuid":"87486609","full_name":"slaclab/slic","owner":"slaclab","description":"Simulation for the Linear Collider (SLIC) Geant4 simulation application","archived":false,"fork":false,"pushed_at":"2023-05-10T21:02:03.000Z","size":2387,"stargazers_count":5,"open_issues_count":0,"forks_count":8,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-28T04:26:30.241Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slaclab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-07T00:12:52.000Z","updated_at":"2023-05-09T06:20:44.000Z","dependencies_parsed_at":"2023-01-11T21:21:45.645Z","dependency_job_id":null,"html_url":"https://github.com/slaclab/slic","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slaclab%2Fslic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slaclab%2Fslic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slaclab%2Fslic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slaclab%2Fslic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slaclab","download_url":"https://codeload.github.com/slaclab/slic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248906529,"owners_count":21181183,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-11T06:14:06.501Z","updated_at":"2025-04-14T15:34:17.712Z","avatar_url":"https://github.com/slaclab.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SLIC\n\nSimulation for the Linear Collider (SLIC) - Geant4 simulation application\n\n## Installation\n\nSLIC is a C++ application that is built using the standard GCC compiler toolchain and the CMake build generation system.\n\n### Required Tools\n\n* Recent gcc compiler toolchain (tested with GCC 7 on CentOS7)\n    * You cannot use the default gcc on RHE6 or a similarly old distribution, so you would need to install one yourself or use a dev toolset.\n    * The build is not compatible with gcc 4.8.5 now due to Geant4 updates.\n* CMake 3.8 or greater due to requirements of the Geant4 build system (tested with 3.17)\n\n### Build Instructions\n\nStart by cloning the project to a local directory.\n\n```\nmkdir /scratch \u0026\u0026 cd /scratch\ngit clone https://github.com/slaclab/slic\n```\n\nCreate the build directory within your slic project directory:\n\n```\nmkdir build \u0026\u0026 build\n```\n\nThe SLIC build system is able to download and install all dependencies for the project if they are not found on your system. This requires a multi-step build for the dependencies to first be downloaded and installed before SLIC itself is built.\n\nFrom the build dir created above execute the following:\n\n```\ncmake ..\n```\n\nYou should see a number of messages printed that indicate dependencies were not found and will be built.\n\nThere are a few cmake options that can be used for configuring SLIC:\n\n| Variable             | Default Value              | Description                           | Notes                   |\n| -------------------- | ---------------------------| ------------------------------------- | ----------------------- |\n| WITH_GEANT4_UIVIS    | NO                         | Enable Geant4 visualization and UI    | Requires X11 and Qt     |\n| WITH_GEANT4_VERSION  | 10.6.1                     | Geant4 release tag to use             | `master` is not allowed |\n| CMAKE_INSTALL_PREFIX | ${CMAKE_BUILD_DIR}/install | Installation prefix for slic and deps | |\n\nHere is an example of all these options being used together:\n\n```\ncmake -DWITH_GEANT4_UIVIS=ON -DWITH_GEANT4_VERSION=10.6.1 -DCMAKE_INSTALL_PREFIX=/work\n```\n\nThese options should be passed the first time you execute the `cmake` command when building the application.\n\nNow to the dependencies and SLIC, execute the following:\n\n```\nmake \u0026\u003e build.log\n```\n\nWe save the build to a log file for debugging in case errors occur.\n\nNow, you should be ready to install slic if the above completed without errors:\n\n```\nmake install\n```\n\nTo test your build, follow the instructions in the next section.\n\n## Running SLIC\n\nThe build system generates a shell script that will setup the necessary environment for running the application:\n\n```\nsource /scratch/slic/install/bin/slic-env.sh\n```\n\nNow you can run the executable from the command line:\n\n```\nslic [options]\n```\n\nPrint the help menu:\n\n```\nslic --help\n```\n\nAn actual command might look something like:\n\n```\nslic -g mygeom.lcdd -i events.stdhep -m commands.mac -r 10\n```\n\nRead the help to get an idea of the actual commands that are available.\n\n\n### Specifying Dependencies\n\nYou may also have one or more of SLIC's dependencies installed locally, which you can use in your build by providing CMake with their root directories.\n\nFor instance, to use your own Geant4 installation, the command would be something like the following:\n\n```\ncmake -DGeant4_DIR=/path/to/geant4/lib64/Geant4-10.3.1/ ..\n```\n\nThis table shows the full list of dependency variables accepted by SLIC:\n\n| Dependency | Variable    |\n| ---------- | ----------- |\n| Geant4     | Geant4_DIR  |\n| Xerces C++ | XercesC_DIR |\n| LCIO       | LCIO_DIR    |\n| HepPDT     | HEPPDT_DIR  |\n| GDML       | GDML_DIR    |\n| LCDD       | LCDD_DIR    |\n\nInstructions for manually installing these dependencies are provided below.\n\n## Installing Dependencies Manually\n\nThis section covers in detail the manual installation of SLIC's dependencies.  \n\nThese procedures are entirely optional, as running `cmake` without providing paths to pre-installed dependencies will cause them to be installed automatically as long as the CMake variable `INSTALL_DEPENDENCIES` is set to `ON`.\n\n### Setup a Build Directory\n\nStart by creating a directory to contain the build.\n\n```\nmkdir /scratch\ncd /scratch\n```\n\nYou will start from this directory when building each package by doing `cd /scratch`.\n\n#### Geant4\n\n```\ngit clone https://github.com/Geant4/geant4\ncd geant4\ngit checkout v10.5.1 # choose Geant4 tag to build\nmkdir build \u0026\u0026 cd build\n# Geant4 cmake options may vary depending on your setup\ncmake -DGEANT4_INSTALL_DATA=ON -DGEANT4_INSTALL_EXAMPLES=OFF -DCMAKE_INSTALL_PREFIX=../install -DGEANT4_USE_SYSTEM_EXPAT=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo ..\nmake -j8\nmake -j8 install\n```\n\n#### LCIO\n\n```\ngit clone https://github.com/iLCSoft/LCIO.git lcio\ncd lcio\ngit checkout v02-07-05\nmkdir build \u0026\u0026 cd build\ncmake -DINSTALL_DOC=OFF -DBUILD_LCIO_EXAMPLES=OFF -DCMAKE_INSTALL_PREFIX=../install ..\nmake -j8 install\n```\n\n#### HepPDT\n\n```\nwget http://lcgapp.cern.ch/project/simu/HepPDT/download/HepPDT-3.04.01.tar.gz\ntar -zxvf HepPDT-3.04.01.tar.gz\ncd HepPDT-3.04.01\n./configure --prefix=$PWD/install --disable-static\nmake -j8 install\n```\n\n#### Xerces\n\n```\nwget https://mirrors.ocf.berkeley.edu/apache//xerces/c/3/sources/xerces-c-3.2.3.tar.gz\ntar -zxf xerces-c-3.2.3.tar.gz\ncd xerces-c-3.2.3 \u0026\u0026 mkdir build \u0026\u0026 cd build\ncmake -DBUILD_SHARED_LIBS=ON .. -DCMAKE_INSTALL_PREFIX=../install\nmake -j8 install\n```\n\n#### GDML\n\n```\ngit clone https://github.com/slaclab/gdml\ncd gdml \u0026\u0026 mkdir build \u0026\u0026 cd build\ncmake -DGeant4_DIR=/scratch/geant4/install/lib64/Geant4-10.5.1/ -DXercesC_INCLUDE_DIR=/scratch/xerces/install/include -DXercesC_LIBRARY=/scratchu/xerces/install/lib64/libxerces-c.so -DCMAKE_INSTALL_PREFIX=../install ..\nmake -j8 install\n```\n\n### LCDD\n\n```\ngit clone https://github.com/slaclab/lcdd\ncd lcdd \u0026\u0026 mkdir build \u0026\u0026 cd build\ncmake -DINSTALL_DOC=OFF -DGeant4_DIR=/scratch/geant4/install/lib64/Geant4-10.3.1/ -DGDML_DIR=/scratch/gdml/install -DXercesC_INCLUDE_DIR=/scratch/xerces/install/include -DXercesC_LIBRARY=/scratchu/xerces/install/lib64/libxerces-c.so -DCMAKE_INSTALL_PREFIX=../install ..\nmake -j4 install\n```\n\n### SLIC\n\n```\ngit clone https://github.com/slaclab/slic\ncd slic \u0026\u0026 mkdir build \u0026\u0026 cd build\ncmake -DINSTALL_DOC=OFF -DCMAKE_INSTALL_PREFIX=../install -DXercesC_INCLUDE_DIR=/scratch/xerces/install/include -DXercesC_LIBRARY=/scratchu/xerces/install/lib64/libxerces-c.so -DLCIO_DIR=/scratch/lcio/install -DGeant4_DIR=/scratch/geant4/install/lib64/Geant4-10.3.1/ -DGDML_DIR=/scratch/gdml/install -DHepPDT_DIR=/scratch/HepPDT-3.04.01/install -DLCDD_DIR=/scratch/lcdd/install ..\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslaclab%2Fslic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslaclab%2Fslic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslaclab%2Fslic/lists"}