| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
WCSim is a very flexible Geant4-based program for developing and simulating large water Cherenkov detectors.
As of August 2014 WCSim has been moved to GitHub. It can be found here
WCSim has very few external dependencies. It relies on only ROOT and Geant4.
There is a mailing list which will send you GitHub push/checkin notifications here
You can follow issues/requests etc by watching the GitHub respository.
WCSim uses GitHub Actions CI to perform build and physics tests for each pull request and commit. The scripts it runs can be found in this separate github repository
Validation results can be found here
Caution
The WCSim wiki & PDF documentation are outdated.
The doxygen documentation is more correct, but incomplete.
Tutorials and information about the branches and WCSim development model can be found on the wiki
More detailed information about the simulation is available in doc/DetectorDocumentation.pdf
Additionally, doxygen documentation is available here. Note that most of the code has no doxygen comments, but all output class member variables are documented. See the WCSimRoot* classes
doxygen documentation can be built locally by running
cd $WCSIM_SOURCE_DIR/ && doxygen WCSim_doxygen_configFor admin: A more featured doxygen build can be performed & pushed using an alternative doxygen config file (requires dot from graphviz)
git clone -b gh-pages --single-branch git@github.com:WCSim/WCSim.git WCSim-dox
cd WCSim-dox
./get_dox.shYou can also make this featured version locally by
cd $WCSIM_SOURCE_DIR
git clone -b gh-pages --single-branch git@github.com:WCSim/WCSim.git WCSim-dox
doxygen WCSim-dox/WCSim_doxygen_configThe automated building testing is currently performed inside the hk-software docker container with the prerequisites:
And as such this is the most supported version of the software (it is guaranteed to work)
Tip
If you just need to read WCSim output files, you can do this without the G4 dependency using the WCSim_WCSimRoot_only CMake option (see here).
Other versions of prerequisite software can be tried, but aren't guaranteed to work.
CMake is cross-platform software for managing the build process in a compiler-independent way. It is required to build ROOT and Geant4 also through CMake. Using cmake, builds and source code need to well separated and make it easier to build many versions of the same software.
A recommended way to set up the directory structure in your own preferred WCSIM_HOME:
To compile you need to have CMakeLists.txt in the WCSim source dir.
source /path/to/thisroot.sh
source /path/to/geant4.shTo recompile:
Useful cmake commands:
A script allowing to build WCSim with CMake on sukap is available:
cd $WCSIM_SOURCE_DIR
./setup/env_sukap.sh
./make.shNote that ./make.sh should also work on other systems.
This script will read the current WCSim directory name and create a directory to hold the different cmake builds. For example, in case your current WCSim directory name is 'WCSim', it will create a '../WCSim-build' directory. It will also create a ../WCSim-install directory.
It will then create a directory for your current branch which will have the name of the current branch. For example, in case your current branch name is hybridPMT, you will have:
WCSim/
WCSim-build/
WCSim-build/hybridPMT/
WCSim-install/
WCSim-install/hybridPMT/Note that by default, just make install is run. You can run make clean before make install by running ./make.sh clean
Caution
GNUmakefile is specifically only for use with ROOT5 and is not supported otherwise.
All output that needs to be trusted must use cmake. To discourage you from using this, the GNUmakefile is hidden in a different branch
The result of a build using the GNUmakefile will be different to the result of a CMake build. If you are using WCSim as a dependency for other packages, you will have to update their build paths to find WCSim includes/libraries
export WCSIM_BUILD_DIR=/path/to/WCSim/ cd $WCSIM_BUILD_DIR git clone --depth 1 https://github.com/WCSim/WCSim.git -b makefile --single-branch makefiledir cp makefiledir/GNUmakefile . make clean_wcsim make rootcint make
Docker allows you to use WCSim without compiling in an OS independant way. The Docker images are hosted on DockerHub and can be used by following the steps below.
Important
Automated WCSim Dockerfile builds have stopped working. There have been no requests (yet) to restore them.
In the meantime, if you are a Hyper-K collaborator you can use the hk-software image. (This is what the CI uses)
Alternatively, the old Dockerfiles are still available in this repository. You are free to use/modify them to build a newer version of WCSim for your use. If you do, please share your Dockerfile changes via a pull request.
cd $WCSIM_SOURCE_DIR
git pull origin develop
cd ../build-Linux_x86_64-gcc_8-python_3.8.13
make -j`nproc` installNote: You only need to use the docker run command once to create the container. Once created you changes are saved in that container instance and you can start the container at any time with docker start -i WCSim
Extra docker commands:
Singularity is a similar container tool with different philosophies. The most important being that you can't run as root. This means that it may be installed and available to use on your local cluster.
You should be able to run the docker container with singularity without any problems. Just to note that $WCSIM_SOURCE_DIR and $WCSIM_BUILD_DIR will be read-only, therefore you should clone, build, and run a new version of WCSim elsewhere (if you forget you'll see a nasty seg fault when running WCSim - this is just because of the read-only directory).
To test that WCSim is working (however you installed it), try running the test macro WCSim.mac, which runs 10 electrons with 5 MeV of energy in the Super-Kamiokande detector (it should take less than a minute to run).
cd $WCSIM_BUILD_DIR
WCSim WCSim.mac macros/tuning_parameters.macWCSim.mac is well commented. Take a look inside (and also at other .mac files in /macros/) for the various options you can use to run WCSim
Warning
There is a memory leak when doing TTree::GetEntry() when reading files. It is also presumed that filling is leaky. It is strongly recommended not to generate or analyse O(1000) events in a single job
There are a few example scripts inside sample-root-scripts/
Warning
There is a memory leak when doing TTree::GetEntry() when reading files. It is also presumed that filling is leaky. It is strongly recommended not to generate or analyse O(1000) events in a single job
WCSim development is supported by the United States National Science Foundation.
| Back | FazBrowse Home | New Git URL |