View on GitHub

Geant4 Zero to Hero

Dev Space for End Users

Home Visualization HepRepFile

HepRApp is a Java-based HepRep Data Browsing Application developed in SLAC. In my experience, it is still the best offline Geant4 visualization tool despite its age. Its original homepage is removed in 2025, but still available at Wayback Machine, which contains valuable information about its history and basic usage.

Due to the lack of maintenance, it only runs on Java 1.8.0 update 312 or earlier, which is hard to find nowadays. A tiny (~75 MB) docker image, physino/heprapp, is developed to solve this issue. It is based on openjdk:8u312-jre-slim-buster, and contains the original HepRApp.jar (~4 MB) archived at the GEARS GitHub Release page https://github.com/jintonic/gears/releases/tag/v1.5.1. For people who are interested in how this is done, please refer to its Dockerfile.

The easiest way to run it is to use the compose.yml file shipped with this website’s source code:

git clone https://github.com/jintonic/geant4
cd geant4
docker compose --profile heprapp up

This will launch HepRApp inside a webpage: http://localhost:8080/vnc.html?autoconnect=true&scale=true, assuming you have Docker Desktop running in the background, which will download required docker images automatically if they are not available locally. No Java or X-window server is needed on your host machine.

Views in HepRApp

You can select a few different views to display your geometry through right click on HepRApp:

Note: all /vis/viewer/set commands have NO effort in HepRApp but they do work in Qt.

/vis/viewer/set/upVector 0 1 0 # y points up
/vis/viewer/set/viewpointVector 0 0 1 # view against z (beam view)
/vis/viewer/set/background 0 0.17 0.21 # solarized color: base03