{"id":24327907,"url":"https://github.com/temken/damascus-sun","last_synced_at":"2026-03-09T00:34:03.617Z","repository":{"id":39971965,"uuid":"263334878","full_name":"temken/DaMaSCUS-SUN","owner":"temken","description":"Dark Matter Simulation Code for Underground Scatterings - Sun Edition","archived":false,"fork":false,"pushed_at":"2024-04-09T09:01:56.000Z","size":330,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-15T00:38:35.100Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/temken.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-05-12T12:49:33.000Z","updated_at":"2023-09-27T09:21:37.000Z","dependencies_parsed_at":"2025-06-15T00:33:56.120Z","dependency_job_id":null,"html_url":"https://github.com/temken/DaMaSCUS-SUN","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":"temken/template_cpp_cmake_obscura","purl":"pkg:github/temken/DaMaSCUS-SUN","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temken%2FDaMaSCUS-SUN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temken%2FDaMaSCUS-SUN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temken%2FDaMaSCUS-SUN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temken%2FDaMaSCUS-SUN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/temken","download_url":"https://codeload.github.com/temken/DaMaSCUS-SUN/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temken%2FDaMaSCUS-SUN/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30278556,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T20:45:49.896Z","status":"ssl_error","status_checked_at":"2026-03-08T20:45:49.525Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2025-01-17T22:17:59.347Z","updated_at":"2026-03-09T00:34:03.582Z","avatar_url":"https://github.com/temken.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build \u0026 Test Status](https://github.com/temken/DaMaSCUS-SUN/workflows/Build%20\u0026%20Tests/badge.svg)](https://github.com/temken/DaMaSCUS-SUN/actions)\n[![codecov](https://codecov.io/gh/temken/DaMaSCUS-SUN/branch/main/graph/badge.svg)](https://codecov.io/gh/temken/DaMaSCUS-SUN)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\n# DaMaSCUS-SUN\n\n\u003ca href=\"https://ascl.net/2102.018\"\u003e\u003cimg src=\"https://img.shields.io/badge/ascl-2102.018-blue.svg?colorB=262255\" alt=\"ascl:2102.018\" /\u003e\u003c/a\u003e\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10948125.svg)](https://doi.org/10.5281/zenodo.10948125)\n[![arXiv](https://img.shields.io/badge/arXiv-2102.12483-B31B1B.svg)](https://arxiv.org/abs/2102.12483)\n\nDark Matter Simulation Code for Underground Scatterings - Sun Edition\n\n\u003cimg width=\"350\" src=\"https://user-images.githubusercontent.com/29034913/108851182-73c1b500-75e4-11eb-94fd-11b93a3af0ae.png\"\u003e\n\nDaMaSCUS-SUN is a Monte Carlo tool simulating the process of solar reflection of dark matter (DM) particles as described in detail in [this publication](https://arxiv.org/abs/2102.12483).\n\n## General Notes\n\n- Solar reflection is the process of a DM particle from the galactic halo falling into the gravitational well of the Sun, where it can scatter on hot nuclei or electrons. If the DM particle scatters and escapes the Sun we consider it as \"reflected\".\n- With DaMaSCUS-SUN we can describe this process by simulating individual DM particle's trajectories inside the Sun and in the solar system.\n- Based on the Monte Carlo simulations, we can estimate the properties of the dark particle flux ejected from the Sun and derive e.g. exclusion limits.\n- DaMaSCUS-SUN is written in C++ and built with CMake.\n- The code is fully parallelized with MPI and can run on HPC clusters.\n\nFor more physics details, we refer to the [paper](https://arxiv.org/abs/2102.12483).\n\n\u003cdetails\u003e\u003csummary\u003eRepository content\u003c/summary\u003e\n\u003cp\u003e\n\nThe included folders are:\n\n- *bin/*: This folder contains the executable after successful installation together with the configuration files.\n- *data/*: Contains additional data necessary for the simulations, e.g. the solar model tables.\n- *external/*: This folder will only be created and filled during the build with CMake and will contain the [obscura](https://github.com/temken/obscura) library necessary for all direct detection computations.\n- *include/*: All header files of DaMaSCUS-SUN can be found here.\n- *results/*: Each run of DaMaSCUS-SUN generates result files in a dedicated sub-folder named after the run's simulation ID string, which is specified in the configuration file.\n- *src/*: Here you find the source code of DaMaSCUS-SUN.\n- *tests/*: All code and executable files of the unit tests are stored here.\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n## Getting started\n\n\u003cdetails\u003e\u003csummary\u003e1. Dependencies\u003c/summary\u003e\n\u003cp\u003e\n\nBefore we can install DaMaSCUS-SUN, we need to make sure that a few dependencies are taken care of.\n\n- [CMake](https://cmake.org/): DaMaSCUS-SUN as well as the libraries libphysica and obscura are built with CMake.\n- [boost](https://www.boost.org/): For numerical integration (used by libphysica).\n- [libconfig](https://github.com/hyperrealm/libconfig): For the configuration files, DaMaSCUS-SUN uses the libconfig library (required version at least 1.6). \n- [libphysica](https://github.com/temken/libphysica): Automatically downloaded to */external/obscura/external/*, compiled, and linked by CMake.\n- [obscura](https://github.com/temken/obscura): Automatically downloaded to */external/*, compiled, and linked by CMake.\n- [open MPI](https://www.open-mpi.org/): For the parallelization DaMaSCUS-SUN uses the open Message Passing Interface (MPI). Open MPI can be installed on Macs using [homebrew](https://brew.sh/):\n\n\n\u003cdetails\u003e\u003csummary\u003eInstallation of boost\u003c/summary\u003e\n\u003cp\u003e\n\n```\n\u003ebrew install boost\n```\n\nor alternatively with APT:\n\n```\n\u003esudo apt-get install libboost-all-dev\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eInstallation of libconfig\u003c/summary\u003e\n\u003cp\u003e\nIt is no-longer strictly necessary to install libconfig. During the build of *libphysica*, CMake will download and build *libconfig* in libphysica/external/ if it cannot find an installation. It still makes sense to install it in most cases.\n\nOn Macs, *libconfig* can be on installed using [homebrew](https://brew.sh/)\n\n```\n\u003ebrew install libconfig\n```\n\nor using APT on Linux machines\n\n```\n\u003esudo apt-get update -y\n\u003esudo apt-get install -y libconfig++-dev\n```\n\nAlternatively, it can be built from the source files via\n\n```\n\u003ewget https://hyperrealm.github.io/libconfig/dist/libconfig-1.7.2.tar.gz\n\u003etar -xvzf libconfig-1.7.2.tar.gz\n\u003epushd libconfig-1.7.2\n\u003e./configure\n\u003emake\n\u003esudo make install\n\u003epopd\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eInstallation of open MPI\u003c/summary\u003e\n\u003cp\u003e\n\n```\n\u003ebrew install open-mpi\n```\n\nor alternatively with APT:\n\n```\n\u003esudo apt-get install openmpi-bin libopenmpi-dev\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e2. Downlad \u0026 Installation\u003c/summary\u003e\n\u003cp\u003e\nThe DaMaSCUS-SUN source code can be downloaded by cloning this git repository:\n\n```\n\u003egit clone https://github.com/temken/DaMaSCUS-SUN.git \n\u003ecd DaMaSCUS-SUN\n```\n\nThe code is compiled and the executable is created using CMake.\n\n```\n\u003ecmake -E make_directory build\n\u003ecd build\n\u003ecmake -DCMAKE_BUILD_TYPE=Release -DCODE_COVERAGE=OFF ..\n\u003ecmake --build . --config Release\n\u003ecmake --install .\n```\n\nIf everything worked well, there should be the executable *DaMaSCUS-SUN* in the */bin/* folder.\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e3. Usage\u003c/summary\u003e\n\u003cp\u003e\nOnce DaMaSCUS-SUN is installed, it can run by running the following command from the */bin/* folder:\n\n```\n\u003empirun -n N DaMaSCUS-SUN config.cfg\n```\n\nHere *N* must be specified to the number of MPI processes. \n\n```\n\u003empirun -n N DaMaSCUS-SUN config.cfg                                                                                                                                                                                                                        1 ↵  \n[Started on Wed Feb 24 13:19:23 2021]\nDaMaSCUS-SUN-0.1.0\tgit:main/757a821\n  ___       __  __      ___  ___ _   _ ___     ___ _   _ _  _\n |   \\ __ _|  \\/  |__ _/ __|/ __| | | / __|___/ __| | | | \\| |\n | |) / _` | |\\/| / _` \\__ \\ (__| |_| \\__ \\___\\__ \\ |_| | .` |\n |___/\\__,_|_|  |_\\__,_|___/\\___|\\___/|___/   |___/\\___/|_|\\_|\n                               developed by Timon Emken (2020)\n\nMPI processes:\tN\n\n##############################################################\nSummary of obscura configuration\n\nConfig file:\tconfig.cfg\nID:\t\tidentifier\n\n----------------------------------------\nDM particle summary:\n\tMass:\t\t\t1 MeV\n\tSpin:\t\t\t0.5\n\tLow mass:\t\t[x]\n...\n```\n\nBut before running DaMaSCUS-SUN, the user has to specify the scenario to be simulated by DaMaSCUS-SUN by setting a number of input parameters in the configuration file *config.cfg*.\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\u003csummary\u003e4. The configuration file\u003c/summary\u003e\n\u003cp\u003e\n\nIn the configuration file, the user decides what scenario of solar reflection to simulate with DaMaSCUS-SUN.\nA number of parameters need to be specified and they are described here.\n\n\n| Note, that the handling of the input files by libconfig is sensitive to the data type. For example, a DM mass of 1 GeV has to be set as \"1.0\", **not** \"1\". |\n| ----------------------------------------------------------------------------------------------------------------------------------------------------------- |\n\n1. First of all, it makes sense to give the simulation run a unique ID. All results will be saved under */results/identifier/*.\n\n```\n//DaMaSCUS-SUN - Configuration File\n\n//ID\n\tID\t\t=\t\"identifier\";\n```\n\n2. Next we need to decide if we run a single parameter point, or scan a grid of parameters to find detection exclusion limits. In either case, we need to specify the minimal number of data points to be generated by DaMaSCUS-SUN.\n\n```\n//Run mode\n\trun_mode = \"Parameter point\";\t//Options: \"Parameter scan\" or \"Parameter point\"\n\n\tsample_size \t\t=\t100;\n\tinterpolation_points\t=\t1000;\t//The scattering rate is interpolated on a NxN grid to speed up the simulations.\n\t\t\t\t\t\t//Recommended value: 1000\n\t\t\t\t\t\t//Set to 0 to run without interpolation.\n```\n\n3. If we run a parameter scan and compute exclusion limits, we need to specify the parameter grid.\n\n```\n//Options for \"Parameter point\"\n\tisoreflection_rings \t\t=\t3;\n\n// Options for \"Parameter scan\"\n\tcompute_halo_constraints\t= \ttrue;\n\tperform_full_scan\t\t=\tfalse;\t//Full scan or STA contour tracing\n\t\n\tconstraints_certainty\t\t=\t0.95;\t//Certainty level\n\t\n\tconstraints_mass_min\t\t=\t2.0e-6;\t//in GeV\t\t\t\t\t\t\t\t\t\t\n\tconstraints_mass_max\t\t=\t1.0e-3;\t//in GeV\n\tconstraints_masses\t\t=\t5;\n\n\tcross_section_min \t\t=\t1.0e-37;// in cm*cm\n\tcross_section_max \t\t=\t1.0e-32;// in cm*cm\t\n\tcross_sections\t\t\t=\t5;\n\n```\n\n4. The next block determines the DM particle properties. In the case of a \"Parameter point\" run, we need to set the DM mass and cross sections.\n\n```\n//Dark matter particle\n\tDM_mass\t\t  \t\t=\t0.001;\t// in GeV\n\tDM_spin\t\t  \t\t=\t0.5;\n\tDM_fraction\t\t\t=\t1.0;\t// the DM particle's fractional abundance (set to 1.0 for 100%)\n\tDM_light\t\t\t=\ttrue;\t// Options: true or false. low mass mode\n\n\tDM_interaction\t\t\t=\t\"SI\";\t// Options: \"SI\", \"SD\", or \"DP\"\n\n\tDM_isospin_conserved\t\t=\ttrue;   // only relevant for SI and SD\n\tDM_relative_couplings\t\t=\t(1.0, 0.0); //relation between proton (left) and neutron (right) couplings (only relevant if 'DM_isospin_conserved' is false.)\n\tDM_cross_section_nucleon\t=\t1.0e-80;    //in cm^2\n\tDM_cross_section_electron\t=\t1.0e-35;    //in cm^2 (only relevant for SI and SD)\n\tDM_form_factor\t\t\t=\t\"Contact\";\t// Options: \"Contact\", \"Electric-Dipole\", \"Long-Range\", \"General\" (only relevant for SI and DP)\n\tDM_mediator_mass\t\t=\t0.0;\t// in MeV (only relevant if 'DM_form_factor' is \"General\")\n\n```\n\n5. For the direct detection experiment, we can either choose one of the pre-defined experimental analyses or define an experiment ourselves.\n\n```\n//Dark matter detection experiment\n\tDD_experiment\t=\t\"SENSEI@MINOS\";\t//Options for nuclear recoils: \"Nuclear recoil\", \"DAMIC-2012\", \"XENON1T-2017\", \"CRESST-II\",\"CRESST-III\", \"CRESST-surface\"\n \t\t\t\t\t\t\t\t\t\t//Options for electron recoils: \"Semiconductor\",\"protoSENSEI@MINOS\",\"protoSENSEI@surface\", \"SENSEI@MINOS\", \"CDMS-HVeV\", \"Ionization\", \"XENON10-S2\", \"XENON100-S2\", \"XENON1T-S2\", \"DarkSide-50-S2\"\n\n\t//Options for user-defined experiments (\"Nuclear recoil\", \"Ionization\", and \"Semiconductor\")\n\t//General\n\tDD_exposure \t\t=\t300.0;\t//in kg years\n\tDD_efficiency \t\t=\t1.0;\t//flat efficiency\n\tDD_observed_events \t=\t0;\t//observed signal events\n\tDD_expected_background \t=\t0.0;\t//expected background events\n\n\t//Specific options for \"Nuclear recoil\"\n\tDD_targets_nuclear\t=\t(\n\t\t\t\t\t(4.0, 8),\n\t\t\t\t\t(1.0, 20),\n\t\t\t\t\t(1.0, 74)\n\t\t\t\t\t);\t// Nuclear targets defined by atom ratio/abundances and Z\n\tDD_threshold_nuclear\t=\t0.1;\t//in keV\n\tDD_Emax_nuclear\t\t=\t40.0;\t//in keV\n\tDD_energy_resolution\t=\t0.0;\t//in keV\n\t\n\t//Specific options for Ionization and Semiconductor:\n\tDD_target_electron\t=\t\"Xe\";\t//Options for Ionization: \tXe, Ar\n\t\t\t    \t//Options for Semiconductor:\tSi, Ge\n\tDD_threshold_electron\t=\t4; //In number of electrons or electron hole pairs.\n```\n\n6. The initial conditons of our simulations are sampled from the DM halo model, which is determined by the following parameters.\n\n```\n//Dark matter distribution\n\tDM_distribution     =\t\"SHM\";  //Options: \"SHM\"\n\tDM_local_density    =\t0.4;\t//in GeV / cm^3\n\t\n\t//Options for \"SHM\"\n\tSHM_v0\t\t=\t220.0;\t\t\t//in km/sec\n\tSHM_vObserver\t=\t(11.1, 232.2, 7.3);\t//in km/sec\n\tSHM_vEscape\t=\t544.0;\t\t\t//in km/sec\n\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n## Version History\n\n- 09.04.2024: Release of version 1.0.0\n- 23.02.2021: Release of version 0.1.0\n\n## Everything else\n\n\u003cdetails\u003e\u003csummary\u003eCiting DaMaSCUS-SUN\u003c/summary\u003e\n\u003cp\u003e\n\nIf you decide to use this code, please cite the latest archived version,\n\n\u003e Emken, T., 2021, Dark Matter Simulation Code for Underground Scatterings - Sun Edition (DaMaSCUS-SUN) [Code, v1.0.0], Astrophysics Source Code Library, record [[ascl:2102.018]](https://ascl.net/2102.018), [[DOI:10.5281/zenodo.4559873]](https://doi.org/10.5281/zenodo.4559873)\n\nBibtex entry:\n\n```\n@software{DaMaSCUSsun,\n  author = {Emken, Timon},\n  title = {{Dark Matter Simulation Code for Underground Scatterings - Sun Edition~(DaMaSCUS-SUN) [Code, v0.1.1]}},\n  year         = {2021},\n  publisher    = {Zenodo},\n  version      = {v1.0.0},\n  doi          = {DOI:10.5281/zenodo.10948125},\n  url          = {https://doi.org/10.5281/zenodo.10948125},\n  howpublished={Astrophysics Source Code Library record \\href{https://ascl.net/2102.018}{[ascl:2102.018]}. The code can be found under \\url{https://github.com/temken/damascus-sun}. Version 1.0.0 is archived as \\href{https://doi.org/10.5281/zenodo.10948125}{DOI:10.5281/zenodo.10948125}}\n}\n```\n\nAs well as the original publications,\n\n\u003e Emken, T. , 2021,  **Solar reflection of light dark matter with heavy mediators**, [Phys.Rev.D 105 (2022) 6, 063020](https://journals.aps.org/prd/abstract/10.1103/PhysRevD.105.063020), [[arXiv:2102.12483]](https://arxiv.org/abs/2102.12483).\n\nBibtex entry:\n\n```\n@article{Emken:2021lgc,\n    author = \"Emken, Timon\",\n    title = \"{Solar reflection of light dark matter with heavy mediators}\",\n    eprint = \"2102.12483\",\n    archivePrefix = \"arXiv\",\n    primaryClass = \"hep-ph\",\n    doi = \"10.1103/PhysRevD.105.063020\",\n    journal = \"Phys. Rev. D\",\n    volume = \"105\",\n    number = \"6\",\n    pages = \"063020\",\n    year = \"2022\"\n}\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eAuthor \u0026 Contact\u003c/summary\u003e\n\u003cp\u003e\n\nThe author of DaMaSCUS-SUN is Timon Emken.\n\nFor questions, bug reports or other suggestions please contact Timon Emken ([timon.emken@fysik.su.se](mailto:timon.emken@fysik.su.se)).\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eLicense\u003c/summary\u003e\n\u003cp\u003e\n\nThis project is licensed under the MIT License - see the LICENSE file.\n\n\u003c/p\u003e\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftemken%2Fdamascus-sun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftemken%2Fdamascus-sun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftemken%2Fdamascus-sun/lists"}