Sampling and Injection for Rare EveNts: A neutrino and rare-process injection toolkit
Project description
SIREN
SIREN (Sampling and Injection for Rare EveNts) is a framework for injecting and weighting interaction final states of complex topology, with specific concern for the detector geometry. SIREN is designed to support a wide variety of neutrino experimental setups, including atmospheric neutrinos, accelerator beam decay-in-flight neutrinos, and neutrinos from decay-at-rest sources. SIREN grew out of LeptonInjector, a neutrino injection code developed within the IceCube collaboration to study atmospheric and astrophysical neutrino interactions in the IceCube detector.
SIREN provides a generic interface for user-defined BSM processes (and includes several pre-defined processes). It also supports generation of any number of secondary processes, e.g. the decay of a BSM particle after it has been created by an initial process. SIREN also includes detector geometry definitions for a number of existing HEP experiments, although contributions are always appreciated!
Python installation of SIREN
SIREN is distributed on pypi as siren
, and can be installed via pip with:
pip install siren
For development of SIREN as a python project, simply clone the repository:
git clone https://github.com/Harvard-Neutrino/SIREN.git
cd SIREN
and run the following command to build and install SIREN:
pip install . --config-settings='build-dir=build'
After the python bindings are installed, you should be able to import the siren
python library. Open a python interpreter by running python
, and then run
import siren
To use SIREN, you will
-
Define a primary process and a list of secondary processes by specifying a particle type and which interactions (cross sections or decays) each particle can undergo
-
For each (primary or secondary) process, define a set of distributions from which to sample when injecting that particle (e.g. energy, position, direction)
-
Combine this information to define an InjectorBase object
-
Generate interaction trees using the InjectorBase object
-
Create a TreeWeighter object using a list of primary and secondary physical processes
-
Calculate the event weight for each interaction tree using the TreeWeighter object
For an example of this in action, see resources/DipoleInjection/inject_HNLs_CCM.{py,ipynb}
Dependencies
For local installations, you need the following:
-
A C++ compiler with C++14 support.
-
Some classes also require Photospline to create and to read cross sections. Read more about it, and its installation at github.com/icecube/photospline. Note that Photospline has dependencies that you will need that are not listed here.
-
SIREN requires Photospline's
SuiteSparse
capabilities, whose dependencies are available here.
For building py-bindings,
-
Python > 3.8
-
That's it! We use pybind11 to generate our pybindings, which is automatically included in SIREN as a submodule
Included External Dependencies
These are not ostensibly a part of SIREN, but are included automatically as submodules for its functionality.
-
cereal: for serialization
-
delabella: for Delaunay triangulation in our interpolation classes
-
googletest: for constructing our tests
-
pybind11: for compiling our python bindings
-
rk: a relativistic kinematics library used mostly in the CrossSection and Decay subclasses
-
photospline: a library that uses the penalized spline technique to efficiently compute, store, and evaluate B-spline representations of such large multi-dimensional tables
C++ installation of SIREN
To use SIREN in a C++ project, there are a few more steps.
We will be trying to keep our source, build, and install directories separate. To this end, these instructions will assume the following directory structure:
| local (for installing built libraries, headers, and binaries)
| --lib
| --include
| --bin
| source (source code for SIREN and other dependencies)
| --SIREN
| --build (for building SIREN)
| --(SIREN dependencies...)
git clone git@github.com:Harvard-Neutrino/SIREN.git
or
git clone https://github.com/Harvard-Neutrino/SIREN.git
to download the source code. To download the submodules, run
git submodule update --init
Now cd SIREN/build
to get to the build directory. We call cmake
cmake ../ -DCMAKE_INSTALL_PREFIX=../../local
This tells cmake to install the shared objects in the local
directory. CMake prepares a Makefile
which calls the g++
compiler with the necessary instructions to compile. So now you'll call
make -j4 && make install
to build the project and install the project. Now you need to set all the environmental variables so this actually works. We recommend putting the followig commands into a env.sh
script that can load the environment.
export PROJECTSPACE=/path/to/parent/directory
export PROJECTBUILDPATH=$PROJECTSPACE/local
export PROJECTSOURCEPATH=$PROJECTSPACE/source
export PREFIX=$PROJECTBUILDPATH
# On linux:
export LD_LIBRARY_PATH=$PROJECTBUILDPATH/lib/:$LD_LIBRARY_PATH
# On mac:
export DYLD_FALLBACK_LIBRARY_PATH=$PROJECTBUILDPATH/lib/:$DYLD_FALLBACK_LIBRARY_PATH
Now you should be good to go!
Making Contributions
If you would like to make contributions to this project, please create a branch off of the main
branch and name it something following the template: $YourLastName/$YourSubProject
.
Work on this branch until you have made the changes you wished to see and your branch is stable.
Then, pull from main, and create a pull request to merge your branch back into main.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for siren-0.0.1-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01fd7b3b856eb7c65963a9b8590c881e7e87ecdb10a3a592d66e936fb91cc481 |
|
MD5 | f5f1d98d3a4c757d42e92cdb31174da9 |
|
BLAKE2b-256 | 8e30a5bab2328e3893c872db1bf858c80b35a22cc4d497a0fa38e963bf7ebd88 |
Hashes for siren-0.0.1-cp312-cp312-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fde1ac037641e418be9e47d3c0772e3e4e23042a37eeb798053a48e4f3dd192 |
|
MD5 | 91089a96a1bcd6680ff5561bf0138425 |
|
BLAKE2b-256 | 85fed8d2ac5f33ad75e4c8d047c778aef54a90058154bbb718e5a47986e86181 |
Hashes for siren-0.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e3a3cc2fc2719daa9be882a3bbfb1fbd3cdcbd3a4d2699fa566063e26c3b419 |
|
MD5 | 2c9fe7616ac163680965e23b8b8c2d27 |
|
BLAKE2b-256 | 974b07a9bd4131e41351c05c21406d1e8d85604912df495f8c3c9681a395fc92 |
Hashes for siren-0.0.1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad8d813b8d08733462a43206d3ceee704a2da890317ce077295f8b060aa12e0a |
|
MD5 | 2fbca158188f869b92e79d90aa83cbb7 |
|
BLAKE2b-256 | 81c378bf60d70ea3a20b45365145c62ec857fd11476ee73d1fa3558a65b4e4cd |
Hashes for siren-0.0.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bb115322c23dde4ba0ac0fb258c5981f4ddccef88295809a99a2c518d7b756b |
|
MD5 | 032544455a653aac0ead09d9ff64d129 |
|
BLAKE2b-256 | 219ebc691d5dde01903da4f388e3119ad536204ec0e41ad1f82c63951c977b64 |
Hashes for siren-0.0.1-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d45658660f0f322cc81e527a98e022c411fd61aab52df36e304b0852cb51f20 |
|
MD5 | e4e628f354d35805e612434a925dda03 |
|
BLAKE2b-256 | b28a7ea7f9e33d470de0a26b4b723f2fae01acc4a262d63fe109069d31016989 |
Hashes for siren-0.0.1-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f05cb9f574d48f94ae6d4c1b83c2a49ff7fddc7bcc14a4de2342ea5bcaf1ad78 |
|
MD5 | b1ea803cb44febe8ff72f2093892c2ae |
|
BLAKE2b-256 | 9e3482f7f866b8e6ddc99aef03fbefd292d5b63d84b4bd2ad5219dc5a8d9f782 |
Hashes for siren-0.0.1-cp311-cp311-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 527f42d08872cc1ddca1b3787652567a45502e267a7073fb00a8c7c67d92babf |
|
MD5 | 48849f7230760861095aa0f01cd57db7 |
|
BLAKE2b-256 | 440168cc45e24f0dcc4e36722b791ca01b8bd07e0a478e65a3cea4a98321f605 |
Hashes for siren-0.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43b1d1874b67eb793122f6ce737ff2345bf25ba6f103aea60bc0d170de786be1 |
|
MD5 | 756b8c08310661ecee322110a6728e75 |
|
BLAKE2b-256 | dc9deffa274c5fc5558b1c43a2c9f08e39d88f7cbf79b217d8432754422e9dcf |
Hashes for siren-0.0.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdc51c843e103ebca440770602caef3951e0b2b80ee4fd607d6b9ecca257e998 |
|
MD5 | 8eb08ad5c7b8993f83b5f7201db6ed03 |
|
BLAKE2b-256 | 46343965474248ae89efa89f9a640ea72774c9d7dec7e6c3c6f25e5c34781c8b |
Hashes for siren-0.0.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03ae6deb2644932c821a9e6f6183cc4ba051e17540417434da9c2ff574b7b754 |
|
MD5 | 4e553c6c0fa02f6e19f8ff8b282a3741 |
|
BLAKE2b-256 | 0d9b834413b9252bb1675ac29f7858c0649a9e9218f4688104515583b1f2aaee |
Hashes for siren-0.0.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1298e007e13139d7da3e2d67ce844ad9b160ba89cedcc6661145453191bbddc2 |
|
MD5 | d7205272c49df3b2ee8efe87b401063b |
|
BLAKE2b-256 | 50952128be8a5b251b956c63590281cb7062cbe3b27bda185a8882f782d1fcb6 |
Hashes for siren-0.0.1-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24488791dd337ec6dcaa37faf746ea453951f8eddd491cfef941260a20758bca |
|
MD5 | 65acdfa1959982a307addd5d1064403c |
|
BLAKE2b-256 | db97342434dd4f8950c57e2729f7ac9b0d920069ae13916424a5d6d8a68b66d7 |
Hashes for siren-0.0.1-cp310-cp310-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79b234b2e12bda4dd716f95637a52bc800215b7da1c90077b0354507a3dd5398 |
|
MD5 | 3e80e9ec8f05fa451fa3f41821e79375 |
|
BLAKE2b-256 | 7dd5c2c43031ed2f15e477aa8a751ddd7044e4dd167bf357c99cbc1680b0e61e |
Hashes for siren-0.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 297196a3ca918256a927a300cbfe39e7d86d0dbd15193bdc9237b2969a040cc7 |
|
MD5 | ada267ce2358624110030d5747c866e6 |
|
BLAKE2b-256 | b752756e470f9fc7ab861d412bf7d852593998efbb6c6bbd10c0365e3a33fe0a |
Hashes for siren-0.0.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e971ccb8f4b9ffed50d92b3ddced6f4681583d151b7a5a45b669f4422bcef937 |
|
MD5 | c409f2aef8bf00eb2bb7c70bab4f50a7 |
|
BLAKE2b-256 | 37f6fc541f733452665ea489ce14c60a00e2dc41056d77a6dae5e0986fa4b6ad |
Hashes for siren-0.0.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7151aff501b81edfbd679ad296d456cdac5280f80299b7cfd4e56583cd7037f6 |
|
MD5 | 03befad48f917d661e0017f9f915870b |
|
BLAKE2b-256 | 2e2af58b2355058e06838f810f21a95ee13db5b2a6a9d7b3ea9679f5d503015e |
Hashes for siren-0.0.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0dc0fef3b549352324b0a44cd89fe9fe0c8616b395bb2ff853a664194cc2ed2f |
|
MD5 | 8ac71364ce1b7068e9de7a121b467dc7 |
|
BLAKE2b-256 | 66394d06b612611f87d3191cb425337c9ba010c3d96fa60214b4af92e5af0da5 |
Hashes for siren-0.0.1-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7fc3a440b3ab927309540bd25583118f55bdbc0a7e7e9febeb69762fd636ea4 |
|
MD5 | 2869ed7068d6421926d128506a26499a |
|
BLAKE2b-256 | ef3b4adf2635e3720b4604c45baa058a2144c15cfff147805e922b84aacffecb |
Hashes for siren-0.0.1-cp39-cp39-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 122826a320110c16ea23b85f110251a5ed143e5eee6f35e88fab513fcc08f179 |
|
MD5 | 44347d757eb323ddb109d582fb22b16b |
|
BLAKE2b-256 | f5b522f3ada0312deac7f344725c8e5e5cbefa2945ddad3d454588906bccab36 |
Hashes for siren-0.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79813694f0452eb720e30d6e392b29cb6994b00d7784030b121ce9f591cd8348 |
|
MD5 | 3e58e47bd33ddbfa70663edc0aaa3a6b |
|
BLAKE2b-256 | 731c3f87deb654e4734c90e69b3ffa61a2252221cae36d0cbcb658012eeca72a |
Hashes for siren-0.0.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 228746666d016060228a18d0f4289b9829d808b2e0552b7fea0a00cc1887f392 |
|
MD5 | bd665e978e25f4491a8d3a266d756800 |
|
BLAKE2b-256 | 9df3bd6d585dc5e04ad1f414c61153fe91ddf2b0e8485674eeb2a31bcca194b7 |
Hashes for siren-0.0.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4118db1610751ed385d297baa8c87161ddb161b07da64654489cff8d891616b8 |
|
MD5 | 23fb5eb205960273cb773a216abce54c |
|
BLAKE2b-256 | 996ad7f4c36f9e7dd81f4252a40d80ef06ed8f470363324570d2314d848e9e30 |
Hashes for siren-0.0.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 024f3f036f85aa916b66887536a8404a3e522156af57af060fccb63676832ac3 |
|
MD5 | 552a22ec47c9b023d05a6a12f98d4bfc |
|
BLAKE2b-256 | 9c1a965b82fc0fd1fea55a92c8faa74caef2e1f482617c2241af76749522ef90 |
Hashes for siren-0.0.1-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ea1e5d4f49cabecbb682cc573483b24dba171d548993a3a7f79f399212ce9f8 |
|
MD5 | f5d779cd34328a6ff02bbe476bf84eb0 |
|
BLAKE2b-256 | 8c18e2f2d5381c6516e5380a621afe32c2d99d87b0e72e1c3520c7100a6d7d18 |
Hashes for siren-0.0.1-cp38-cp38-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed04e839c39002571820ca4e15623851dfe3eabd446bda7b18720c666bf79cdf |
|
MD5 | 6f981d22c17df38ac8510e8d00e79319 |
|
BLAKE2b-256 | 075b93c073fa6f27b71b4cff000ccba512effcf9c65be442d1e4afb3050bb9f1 |
Hashes for siren-0.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aed94740524d8dcdd8c2e75a809f1e663ceb63ff583f3388fecc9f6e6d275b77 |
|
MD5 | aeb5ff8425468a00f88bcbe6235f85c2 |
|
BLAKE2b-256 | 5daa753bb59255bd34ac2e9addee1eddebbaf74531eb6f9e3a865a6396aae75e |
Hashes for siren-0.0.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e4ae1c525f8ef16a1789a8296f501813c1f005876e8e4b83c95b98353832b37 |
|
MD5 | 8e114fd7c86a05bb553c796409f313fc |
|
BLAKE2b-256 | a24cafff319a0a007a4079cdce6a7d0a29cf9ba421d5a55faeffb1f6b19f309c |
Hashes for siren-0.0.1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbde616e58b70d76d3ee6d8e9239795e4f6d2c342d92b907ce8ad76a1b8c1bbe |
|
MD5 | c3641b35f8a574527ab155290699b357 |
|
BLAKE2b-256 | 4cf1ced854ba16ad2a754090bd93f71f738e92fefccc437f1d8603fef852d1ac |
Hashes for siren-0.0.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19a28fe96d381c9dabe86d815513eea476d5c1f4b1a10fb3b697302f7e14e443 |
|
MD5 | 862974c7fe5150db4d0371a817fb1655 |
|
BLAKE2b-256 | 002d9fc40b8f80353662288beb210438dee1b437544984c492d8c15c116eb0e5 |