{"id":42961890,"url":"https://github.com/jintonic/gears","last_synced_at":"2026-01-30T23:18:06.469Z","repository":{"id":39525176,"uuid":"48399561","full_name":"jintonic/gears","owner":"jintonic","description":"Geant4 Example Application with Rich features and Small footprints","archived":false,"fork":false,"pushed_at":"2025-12-11T22:35:53.000Z","size":3432,"stargazers_count":88,"open_issues_count":7,"forks_count":71,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-12-12T15:47:09.114Z","etag":null,"topics":["detector","geant4","monte-carlo-simulation","physics"],"latest_commit_sha":null,"homepage":"http://physino.xyz/gears/","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/jintonic.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2015-12-21T23:27:21.000Z","updated_at":"2025-12-11T22:35:57.000Z","dependencies_parsed_at":"2024-05-16T19:26:50.844Z","dependency_job_id":"319ce134-9bea-4cac-b1fb-7b894eb350e5","html_url":"https://github.com/jintonic/gears","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/jintonic/gears","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jintonic%2Fgears","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jintonic%2Fgears/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jintonic%2Fgears/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jintonic%2Fgears/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jintonic","download_url":"https://codeload.github.com/jintonic/gears/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jintonic%2Fgears/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28922659,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T22:32:35.345Z","status":"ssl_error","status_checked_at":"2026-01-30T22:32:31.927Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["detector","geant4","monte-carlo-simulation","physics"],"created_at":"2026-01-30T23:18:05.801Z","updated_at":"2026-01-30T23:18:06.461Z","avatar_url":"https://github.com/jintonic.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e **Note**\n\u003e The latest [GEARS][] require [Geant4.11](https://geant4.web.cern.ch/support/download). If you are still using [Geant4.10](https://geant4.web.cern.ch/support/download_archive?page=1), please download [v1.5.1](https://github.com/jintonic/gears/releases/tag/v1.5.1) of [GEARS][] from the [Release](https://github.com/jintonic/gears/releases) page.\n\n[![Article](https://img.shields.io/badge/arXiv-2512.09246-orange?style=flat)](https://arxiv.org/abs/2512.09246)\n[![Get GEARS](https://img.shields.io/badge/Get-GEARS-cyan?style=flat)](INSTALL)\n[![Tutorials](https://img.shields.io/badge/Use-GEARS-blue?style=flat)](tutorials)\n[![YouTube](https://img.shields.io/badge/You-Tube-red?style=flat)](https://www.youtube.com/@physino)\n[![Doxygen](https://codedocs.xyz/jintonic/gears.svg)](https://codedocs.xyz/jintonic/gears/annotated.html)\n[![Get Involved](https://img.shields.io/badge/Get-involved-ff69b4?style=flat)](#how-to-contribute)\n\n\u003ca href=\"http://physino.xyz/gears/tutorials/detector/visualization/gearsX3D.html\"\u003e\u003cimg align=\"right\" width=\"120px\" src=\"tutorials/detector/visualization/gears.png\"/\u003e\u003c/a\u003e\n\n[GEARS][] is a [Geant4][] [Example][] Application with [Rich features](#features) yet Small footprint. The entire C++ coding is minimized down to a single file with about 520 [SLOC][]. This is achieved mainly by utilizing [Geant4][] plain [text geometry description][tg], [built-in UI commands][TUI] (macros), and C++ inheritance. It is ideal for student training and fast implementation of small to medium-sized experiments.\n\n[GEARS]: https://github.com/jintonic/gears\n[Geant4]: http://geant4.cern.ch\n[Example]:http://geant4-userdoc.web.cern.ch/geant4-userdoc/UsersGuides/ForApplicationDeveloper/html/Examples/examples.html\n[tg]: http://geant4-userdoc.web.cern.ch/geant4-userdoc/UsersGuides/ForApplicationDeveloper/html/Detector/Geometry/geomASCII.html\n[TUI]: http://geant4-userdoc.web.cern.ch/geant4-userdoc/UsersGuides/ForApplicationDeveloper/html/Control/commands.html\n[SLOC]: https://en.wikipedia.org/wiki/Source_lines_of_code\n\n## Features\n\n* [Single small C++ file](gears.cc), easy to manage, fast to [compile](INSTALL#compile-gears) (a few second on a regular PC)\n* [Easy switching between well maintained Geant4 reference physics lists without recompilation](tutorials/physics)\n  * [Individual processes can be turned on/off without recompilation](tutorials/physics#physics-processes)\n  * [Fast implementation of optical properties without recompilation](tutorials/physics#optical-properties-of-materials-and-surfaces)\n  * [Optional radioactive decay simulation](tutorials/physics#radioactive-decay) with the possibility to [save the parent and daughter decays into different events if the later happens after a user specified time interval](tutorials/physics#split-decay-chain)\n* [Frequently used source spectra (AmBe, Am-241, etc.)](tutorials/sources#common-sources) in addition to [GPS](tutorials/sources)\n* [Output in multiple data format](tutorials/output)\n  * [ROOT](tutorials/output#root) TTree format (default, no [ROOT][] installation is needed)\n    * Build-in data compression, well suitable for large data processing\n    * Fast access to independent data members\n    * Flat tree (no nested branches or arrays) with short leaf names\n      * Easy to use in [TTree][]::[Draw][]\n      * No need to load extra library to open\n      * Can be easily analyzed in [Python][] through [Uproot][]\n  * [HDF5][], universal data format, easy to read by different tools\n  * CSV or XML, Human readable ASCII file, capable of dealing with multiple dimensional arrays\n* [Record information of step 0](tutorials/output#record-information-of-step-0) (initStep), which is not available through [G4UserSteppingAction][]\n* [simple text][tg] or [GDML][] geometry I/O\n  * [Fast implementation of detector geometry](tutorials/detector) without C++ programming\n  * Create/Change geometry without re-compilation\n  * Turn off data saving in a volume by assigning it a non-positive copy number\n  * Turn any volume to a [sensitive detector](tutorials/detector#sensitive-volume) by adding \"(S)\" in its name\n  * [Assign optical properties in Geant4 plain text geometry description](tutorials/detector/optical), which is not available in the official [Geant4][] release\n  * [Syntax highlighting of the simple text geometry description files](tutorials/detector/syntax) in [Emacs](tutorials/detector/syntax#emacs), [Vim](tutorials/detector/syntax#vim), [Micro](tutorials/detector/syntax#micro), and [Sublime Text](tutorials/detector/syntax#sublime-text)\n* [Creating 3D mesh to record and visualize physical variables in it without any change of the C++ code](http://geant4-userdoc.web.cern.ch/geant4-userdoc/UsersGuides/ForApplicationDeveloper/html/Detector/commandScore.html)\n* [Doxygen documentation](https://codedocs.xyz/jintonic/gears/)\n* Many simple [tutorials](tutorials) to demonstrate the usage of [Geant4][]\n\n[ROOT]: https://root.cern.ch\n[GPS]: http://geant4-userdoc.web.cern.ch/geant4-userdoc/UsersGuides/ForApplicationDeveloper/html/GettingStarted/generalParticleSource.html\n[TTree]: https://root.cern/manual/trees\n[Draw]: https://root.cern.ch/doc/master/classTTree.html#a73450649dc6e54b5b94516c468523e45\n[Python]: https://www.python.org/\n[Uproot]: https://pypi.org/project/uproot\n[G4UserSteppingAction]:http://www-geant4.kek.jp/lxr/source/tracking/include/G4UserSteppingAction.hh\n[GDML]: https://gdml.web.cern.ch/GDML/\n[HDF5]: https://www.hdfgroup.org/downloads/hdf5/\n\n## How to contribute\n\nPlease [fork GEARS on GitHub](https://help.github.com/en/github/getting-started-with-github/fork-a-repo). Run the following to get a local copy of the forked repository and link it to the [original GEARS repository][GEARS]:\n\n```sh\n$ git clone git@github.com:yourGitHubAccount/gears.git # get forked repository\n$ git remote add upstream git@github.com:jintonic/gears.git # link to original repository\n$ git remote -v # run a check\n```\n\nRun the following to keep your local repository updated with the [original GEARS repository][GEARS]:\n\n```sh\n$ git fetch upstream # updates are saved in a new branch upstream/master\n$ git merge upstream/master # merge 2 branches: upstream/master and master\n```\n\nIf the merge is successful, run `git push` to update your forked GEARS repository on GitHub.\n\nYou can initiate a [pull request on GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) if you'd like to have your update being absorbed in [the original GEARS repository][GEARS].\n\n### Coding convention\n\n#### G4cout VS std::cout\n\n`G4cout` and `G4endl` is preferred over `std:cout` and `std:endl` because the former handle the output in [Geant4][] GUI correctly, while the later can only output to terminal.\n\n#### Indentation\n\nTwo spaces instead of a tab are used to indent a line in [gears.cc](gears.cc) to insure a consistent appearance in different text editors, and to avoid wasting space in front of deeply nested code blocks. The following mode lines are added to the end of [gears.cc](gears.cc) to insure that in [Vim][] and [Emacs][]:\n\n```cpp\n// -*- C++; indent-tabs-mode:nil; tab-width:2 -*-\n// vim: ft=cpp:ts=2:sts=2:sw=2:et\n```\n\n[Vim]: https://www.vim.org/\n[Emacs]: https://www.gnu.org/software/emacs/\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjintonic%2Fgears","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjintonic%2Fgears","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjintonic%2Fgears/lists"}