cocoa-hep

COCOA : COnfigurable Calorimeter simulatiOn for Ai

https://github.com/cocoa-hep/cocoa-hep

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org, zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.7%) to scientific vocabulary
Last synced: 7 months ago · JSON representation ·

Repository

COCOA : COnfigurable Calorimeter simulatiOn for Ai

Basic Info
  • Host: GitHub
  • Owner: cocoa-hep
  • License: gpl-3.0
  • Language: C++
  • Default Branch: main
  • Homepage:
  • Size: 40.3 MB
Statistics
  • Stars: 6
  • Watchers: 2
  • Forks: 9
  • Open Issues: 8
  • Releases: 2
Created over 3 years ago · Last pushed about 1 year ago
Metadata Files
Readme License Citation

README.md

COCOA

The COnfigurable Calorimeter simulatiOn for Ai (COCOA) is a nearly-hermetic calorimeter simulated with Geant4 and interfaced to the Pythia8 event generator. This open-source simulation is aimed to support the development of machine learning algorithms in high energy physics that rely on realistic particle shower modeling, such as reconstruction, fast simulation, and low-level analysis.

The COCOA calorimeter comprises a barrel and endcap system with configurable granularity, and with nearly uniform material depth distribution in pseudorapidity. An inner tracker system consisting of silicon and iron layers immersed in a magnetic field can be included optionally, along with basic tracking emulation. Output data are processed using on-board algorithms for topological clustering of calorimeter cells, graph creation, and jet clustering. The COCOA geometry is also provided in a format supporting event visualization with Phoenix.

The documentation can be found here.

Publication

DOI

Docs arXiv

Install

Docker

The most convenient way to install COCOA is to use its docker image: docker pull ghcr.io/cocoa-hep/cocoa-hep:main docker image tag $(docker images | grep cocoa-hep | head -n 1 | awk '{print $3}') cocoa-hep docker run -it cocoa-hep

Please note that in this container cocoa and its dependencies are installed in /root .

Non-Docker

To simplest way to prepare all dependencies is to mount the CernVM File System and run source setup_cvmfs.sh Otherwise the dependencies need to be taken care of individually. The Dockerfile can be used for guidance in this case.

Then in the COCOA directory run the following commands: mkdir build cd build cmake ../ make -j<# cpu cores> cd ..

Run

From within COCOA directory:

./build/COCOA - run with Geant4 User Interface.

./build/COCOA -h - show input options for batch-mode.

List of options: - --config (-c) <str> – path to json configuration file. - --macro (-m) <str> – path to Geant4 or Pythia8 macro file for event generation (can be set in json configuration file). - --output (-o) <str> – path (incl. name) of output ROOT file to be written (can be set in json configuration file). - --input (-i) <str> - path to HepMC (.hmc) input file (overrides the default path set in the HepMC macro file). - --seed (-s) <int> – set random seed. - --nevents (-n) <int> - number of events to generate (default is taken from macro).

Example: ./build/COCOA --macro /path/to/COCOA/COCOA/macro/Pythia8/ttbar.in --config /path/to/COCOA/COCOA/config/config_doc.json /path/to/outputdir/output_name.root --seed 5

Convert

To convert the output files from COCOA from ROOT to hdf5 format, the util/dump_hdf5.py can be used as follows: python util/dump_hdf5.py -i path/to/input.root -o path/to/output.h5 To see more options, pass the -h argument.

Phoenix event display

Live demo hosted here: https://cocoa-phoenix.web.cern.ch/

The phoenix directory contains the ingredients for displaying COCOA events using the HSF Phoenix software. - event subdirectory: scripts for dumping COCOA output ROOT files into the suitable json format. - packages subdirectory: the changed files with respect to the Phoenix repository, with directory structure preserved. Note that this builds the COCOA geometry.

Steps to get it fired up: 1. clone and follow the README on the Phoenix repository to get it set up locally. 2. replace the cloned files with the ones in the COCOA/phoenix/packages. Note that this has only been tested at a specific snapshot in the Phoenix code history. 3. (this step can be skipped in favor of using the default event files provided). Use the dump_phoenix_eventdata.py script to parse a COCOA output file, for example: python phoenix/event/dump_hdf5.py -i path/to/input_COCOA_file.root -o path/to/output_event_file.json -n 1 4. Copy the json event file to packages/phoenix-ng/projects/phoenix-app/src/assets/files/cocoa/ and edit the eventFile field in packages/phoenix-ng/projects/phoenix-app/src/app/sections/cocoa/cocoa.component.ts appropriately. 5. Compile phoenix with yarn and open in browser window!

Owner

  • Name: cocoa-hep
  • Login: cocoa-hep
  • Kind: organization

Citation (CITATION.cff)

cff-version: 1.2.0
message: "Please cite the following works when using this software."
type: software
authors:
- family-names: "Etienne"
  given-names: "Dreyer"
  orcid: "https://orcid.org/0000-0001-8955-9510"
  affiliation: "Weizmann Institute of Science"
- family-names: "Ganguly"
  given-names: "Sanmay"
  orcid: "https://orcid.org/0000-0003-1285-9261"
  affiliation: "ICEPP, University of Tokyo"
- family-names: "Rieck"
  given-names: "Patrick"
  orcid: "https://orcid.org/0000-0001-6616-3433"
  affiliation: "NewYork University"
title: "cocoa-hep: v0.1.1"
version: 0.1.1
doi: 10.5281/zenodo.7700475
repository-code: "https://github.com/cocoa-hep/cocoa-hep/releases/tag/0.1.1"
url: "https://cocoa-hep.readthedocs.io/en/latest/"
keywords:
  - python
  - physics
  - Geant4
  - Opendata Calorimeter
  - Machine Learning
  - Pythia
  - Configurable
license: "GNU General Public License v3.0"
abstract: |
  A configurable calorimeter simulation for AI (COCOA) applications is presented, 
  based on the GEANT4 toolkit and interfaced with the PYTHIA event generator.
  This open-source project is aimed to support the development of
  machine learning algorithms in high energy physics that rely
  on realistic particle shower descriptions, such as reconstruction, fast-simulation,
  and low level analysis. Specifications such as the granularity and material of 
  its nearly hermetic geometry are user-configurable. The tool is supplemented
  with simple event processing including topological clustering, jet-algorithms,
  and a nearest-neighbors graph construction. Formatting is also provided to visualise events using
  the Phoenix event display software.
references:
  - type: article
    - family-names: "Etienne"
      given-names: "Dreyer"
      orcid: "https://orcid.org/0000-0001-8955-9510"
      affiliation: "Weizmann Institute of Science"
    - family-names: "Ganguly"
      given-names: "Sanmay"
      orcid: "https://orcid.org/0000-0003-1285-9261"
      affiliation: "ICEPP, University of Tokyo"
    - family-names: "Rieck"
      given-names: "Patrick"
      orcid: "https://orcid.org/0000-0001-6616-3433"
      affiliation: "New York University"
    title: "Configurable calorimeter simulation for AI applications"
    doi: 10.5281/zenodo.7700475
    url: "https://arxiv.org/abs/2303.02101"
    year: 2023
    publisher:
      name: ""
    volume: 
    number: 
    pages: 
    journal: 
Footer

GitHub Events

Total
  • Issues event: 1
  • Push event: 1
  • Pull request event: 2
  • Fork event: 3
  • Create event: 1
Last Year
  • Issues event: 1
  • Push event: 1
  • Pull request event: 2
  • Fork event: 3
  • Create event: 1

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 1
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • YuvalFrid (1)
  • pariRieck (1)
Pull Request Authors
  • pariRieck (4)
  • etiennedreyer (3)
  • sanmayphy (1)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

.github/workflows/detector_response.yml actions
  • actions/checkout v3 composite
.github/workflows/docker.yml actions
  • actions/checkout v3 composite
  • docker/build-push-action v3 composite
  • docker/login-action v2 composite
  • docker/metadata-action v4 composite
  • docker/setup-buildx-action v2 composite
  • docker/setup-qemu-action v2 composite
.github/workflows/docker_base.yml actions
  • actions/checkout v3 composite
  • docker/build-push-action v3 composite
  • docker/login-action v2 composite
  • docker/metadata-action v4 composite
  • docker/setup-buildx-action v2 composite
  • docker/setup-qemu-action v2 composite
.github/workflows/geo_check.yml actions
  • actions/checkout v3 composite
.github/workflows/semantic-pr-check.yml actions
  • amannn/action-semantic-pull-request v5 composite
Dockerfile docker
  • cern/cc7-base latest build