GithubHelp home page GithubHelp logo

marc1uk / wcsim Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wcsim/wcsim

0.0 1.0 2.0 164.82 MB

The WCSim GEANT4 application

Makefile 0.01% C++ 90.16% C 7.69% Python 0.98% CMake 1.09% Dockerfile 0.07%

wcsim's Introduction

Welcome to WCSim

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 at:

https://github.com/WCSim

Tutorials and information about the branches and WCSim development model can be found on the wiki:

https://github.com/WCSim/WCSim/wiki

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:

https://lists.phy.duke.edu/mailman/listinfo/wcsim-git

You can follow issues/requests etc by watching the GitHub respository.

Validation Webpage

https://wcsim.github.io/Validation/

Current notes and how to build

Build Instructions:

You should have a recent and working version of ROOT and GEANT4. (Known to work with GEANT 4.10.1p03 and ROOT v5.28.00) You also need all of the G4 data files including hadron xsecs etc. Those are the only requirements. The code should work with gcc 4.4.7. For v1.6.0 and earlier, use GEANT 4.9.4.p01.

To compile:

  • make clean
  • make rootcint
  • make

If you want to use these libraries with an external program then also do:

  • make shared [ For root programs]
  • make libWCSim.a [ Also necessary for the event display?]

More detailed information about the simulation is available in doc/DetectorDocumentation.pdf.

Build Instructions using CMake:

CMake is cross-platform software for managing the build process in a compiler-independent way (cmake.org). It is recommended to build ROOT and GEANT4 also through CMake. The latter is very CMake friendly since GEANT 4.9.6, while it started introducing builds through CMake from 4.9.4 onwards (http://geant4.web.cern.ch/geant4/support/ReleaseNotes4.9.4.html#10.). 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:

  • ${WCSIM_HOME}/WCSim : contains the src dir, typically the cloned or unzipped code from GitHub
  • ${WCSIM_HOME}/WCSim_build : contains directories for each build, eg. for each branch you want to test or for different releases, comparing debugged versions, etc. This directory will contain the executable, the example macros and library for ROOT.

To compile you need to have CMakeLists.txt in the WCSim source dir.

  • mkdir ${WCSIM_HOME}/WCSim_build/mydir ; cd ${WCSIM_HOME}/WCSim_build/mydir
  • Set up the Geant4_Dir: export Geant4_DIR=${HOME}/Geant4/install/geant4.9.6.p04 (from the make install phase of Geant4)
  • cmake ../../WCSim : this executes the commands in CMakeLists.txt and generates the Makefiles for both the ROOT library as the main executable.
  • make clean : if necessary
  • make : will first compile the libWCSimRoot.so which you need for using the ROOT Dict from WCSim and then compile WCSim.

To recompile:

  • Typically just "make" will be enough and also redo the cmake phase if something changed.
  • Sometimes you need to "make clean" first.
  • When there are problems, try removing CMakeCache.txt, and redo the cmake.

Useful cmake commands:

  • make edit_cache : customize the build.
  • make rebuild_cache : redo the cmake phase.

Using WCSim without building using Docker:

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.

  1. Install Doocker cross platform instructions can be found at https://www.docker.com/
  2. Pull the WCSim image from docker hub by using "docker pull wcsim/wcsim:tag" where tag is the tagged version or use the tag "latest" to get the current develop branch
  3. Run the docker image and create a container "docker run --name=WCSim -i -t wcsim/wcsim:tag" this will give you a shell in the container's OS with WCSim already built. To save data from inside your docker image mount a local folder in the docker image at runtime and then anything placed in that directory will be available in that folder after exit. To do that run the following "docker run -v local_folder_path:docker_mount_path -i -t wcsim/wcsim:tag"
  4. Once you have run the docker image navigate to "cd /root/HyperK/WCSim" and source the enviroment variables using "source /root/HyperK/env-WCSim.sh" and then run WCSim as normal form this directory
  5. To exit the docker image "exit"

(Note: 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 and stop the contianer at any time with "docker start WCSim" and "docker stop WCSim");

Extra docker commands:

  1. See all images "docker images"
  2. Delete an image "docker rmi imageID"
  3. See all containers "docker ps -a"
  4. Delete a container "docker rm ContainerID"

Color Convention for visualization used in WCSimVismanager.cc

  • gamma = green
  • neutrino = yellow
  • electron = blue
  • positron = red
  • muon = white
  • muon+ = silver
  • proton = magenta
  • neutron = cyan
WCSim development is supported by the United States National Science Foundation.

wcsim's People

Contributors

tdealtry avatar eosullivan avatar cwwalter avatar p3tru avatar yujiokajima avatar jostmigenda avatar samshort25 avatar ntp4 avatar brichards64 avatar lozierj avatar tomjunk avatar chaitenyag avatar aahahn avatar schol avatar tomoyo-yoshida avatar federiconova avatar brettviren avatar

Watchers

 avatar

wcsim's Issues

Set proper integration and trigger windows

SK default value of the digitizer integration window for the SKI digitizer is 200 ns. Find out ANNIE's used value.

SK default value of the trigger decision window is 200 ns. This value is chosen as it is the time for a Cherenkov photon to transverse the longest diagonal distance in the tank. The trigger decision window should be adjusted for ANNIE's tank size, or triggering configuration.

Also set ANNIE appropriate digitizer deadtime, pre- and post-trigger window sizes.

Set proper characteristics for used PMT types

Before electronics threshold should be given by Dark Rate times conversion factor:
e.g. ~ SK-I: 4.2 kHz
Measured DN with 0.25 pe threshold:
e.g. ~SK-I: 3.4 kHz
In WCSim SK PMTs currently use 4.2 Hz after the threshold, although this should probably be 3.4 kHz (see issue 134 WCSim#134).
Adjust properly for Watchboy, LUX, HQE, LAPPD etc.

MRD efficiency studies

Shoot tracks, find out how often they're correctly reconstructed.
For tracks with minimal scattering, this should be simple enough.
What about for scattered tracks? How do we know the true path?
How can we identify unscattered tracks?
How much do we need to know?

At least the accuracy of energy reconstruction.

Clean up confusing DigitsCollection name

The WCSimWCDigitsCollection created by WCSimWCPMT is constructed in the WCSimWCPMT::Digitize function, with 2 names: "WCDigitizedCollectionPMT", declared in the Digitize() call, and "WCRawPMTSignalCollection" declared in the WCSimWCPMT constructor.

Both are passed as arguments when instantiating the WCSimWCDigitsCollection, apparently setting the 'DetName' or 'DMname', and 'ColName' of the DigitsCollection respectively.
The ColName (or collection name) can be used by the G4DigiManager to retrieve the digits collection. The purpose of the DetName variable in the DigitsCollection is unknown, and does not appear to ever be used.

The digit and hit collections are already complicated enough, and giving the same collection two names only further obfuscates things. As per other DigitsCollections, just use "WCRawPMTSignalCollection" for both ColName and DetName, to make things (somewhat) clearer.

Check overlapping triggers handling

Currently if a trigger start is within the window of a previous trigger, it's start is shifted to the end time of the previous trigger, but it's end time is not changed. I.e., the two trigger windows remain distinct (trigger window does not get extended, a new one gets added), but the latter trigger window gets shortened.
This may not match ANNIE behaviour if all hefty self-trigger windows are 2us long.
In particular consider how this is handled with the prompt RWM trigger.

Make scripts to simplify grid submission

Make bash scripts to:

  • Create tar file of source files
  • Copy to somewhere on pnfs
  • Make output directory
  • Modify grid running script to copy in and output to the appropriate locations
  • Call grid submission script with this script
  • Create a description file of what this grid job is for, details of the simulation commit, source files, etc. Use git commit like opening of nano to prompt user for description
  • Add a log entry to somewhere to keep track of grid jobs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.