Advanced Example underground_physics

Note: Due to the importation of data files during the Geant4 initialisation stage, loading may take more than five minutes.

Overview

This advanced example simulates an underground dark-matter experiment.

See UserRequirements.txt and the related web pages referenced at the end of that document.

A single liquid-xenon cell is simulated in Geant4. Scintillation light produced by interactions from various calibration species is recorded as photomultiplier hits. The output is written to an ASCII file for subsequent offline analysis.

Geometry

Experimental Setup

G4double worldWidth  = 470.0*cm + 2.*wallThick; // x
G4double worldLength = 690.0*cm + 2.*wallThick; // y
G4double worldHeight = 280.0*cm + 2.*wallThick; // z

A cavern measuring 5.18 m × 7.38 m × 3.28 m, with concrete walls, is defined as the world volume. The laboratory geometry includes desks, cupboards, a door, and windows. For convenience, these elements are defined in a separate .icc file, which can be removed if the code becomes cumbersome.

A steel vacuum vessel containing liquid and gaseous xenon is positioned at the centre of the cavern. Its internal structure reproduces an existing prototype dark-matter detector, allowing comparison with experimental results.

The active detector volume consists of:

  • A series of metal rings
  • A cover mirror
  • A photomultiplier tube immersed in the liquid
  • Two grids
  • A thermalising copper shield

The liquid-gas interface is located 6 mm from the mirror surface. An americium-241 calibration source is suspended from one of the grids in the liquid phase, above the photomultiplier tube.

Output Files

Hits Output: hits.out

This ASCII file contains:

  • Evt #: Event number
  • Etot, MeV: Energy deposited in liquid xenon
  • LXe hits: Number of hits in liquid xenon
  • LXeTime, ns: Time of the first hit in liquid xenon
  • PMT hits: Number of hits in the PMT photocathode
  • PmtTime, ns: Average PMT hit time relative to LXeTime
  • First hit: First particle to hit the liquid xenon
  • Flags: Particles contributing to the energy deposition
  • Seeds: Initial random-seed values for events containing hits

Timing limitation: PmtTime is erroneous when nuclear decay is forced through the RadioactiveDecay module. Nanosecond scintillation times cannot be resolved reliably against a global time of approximately 432 years for americium-241 decay.

PMT Output: pmt.out

This file contains photon-hit positions on the PMT face and is overwritten after every event:

Hit#    X, mm   Y, mm   Z, mm

Running the Example

Run the macro files interactively or in batch mode:

DMX macro_name.mac

Macros

initInter.mac

Initialisation macro for interactive mode.

gamma.mac

Shoots one 60 keV gamma ray upward from the calibrator and tracks the scintillation light produced in liquid xenon toward the PMT. All tracks are drawn with custom colours, and photocathode hits are displayed. The event summary is written to hits.out.

gamma_1000.mac

Similar to gamma.mac, but 1,000 gamma rays are emitted isotropically from the source. Tracks and hits are not drawn, and verbosity is reduced.

alpha.mac

Shoots one 5.486 MeV alpha particle upward from the calibrator and tracks the scintillation light toward the PMT. All tracks except optical photons are drawn. The event summary is written to hits.out, and PMT hits are written to pmt.out.

alpha_1000.mac

Similar to alpha.mac, but 1,000 alpha particles are emitted isotropically. Tracks are not stored, and verbosity is reduced. The event summary is written to hits.out; PMT hits are not written.

neutron.mac

Shoots one 2.48 MeV neutron from inside the room toward the detector. All tracks except scintillation photons are drawn with custom colours. Gamma rays are not killed at the concrete wall. The event summary is written to hits.out.

ambe_spectrum.mac

Produces a neutron spectrum approximating an americium-beryllium source. It uses the General Particle Source and therefore requires compilation with the DMXENV_GPS_USE environment variable.

sourceAm241.mac

Forces the decay of americium-241 nuclei in the calibrator and tracks the resulting neptunium-237 nuclei, alpha particles, and gamma rays from neptunium-237 de-excitation. All tracks except scintillation photons are drawn. The event summary is written to hits.out.

Planned for a future release.

sourceAm241_1000.mac

Similar to sourceAm241.mac, but for 1,000 events. Tracks are not stored.

Planned for a future release.

Environment Variables

The following variables must be set:

  • G4RADIOACTIVEDATA: Path to the radioactive-decay data files
  • G4LEDATA: Path to the low-energy database
  • G4LEVELGAMMADATA: Path to the photo-evaporation data
  • NeutronHPCrossSections: Path to the neutron data files

To use the full General Particle Source, set:

DMXENV_GPS_USE

The DMX particle gun remains available for forward compatibility if the General Particle Source changes.

Analysis

The program should produce ROOT-based histogram files. XML-compliant output can be generated by changing the default G4AnalysisManager file type in:

DMXRunAction::Book()

Random Seeds

The random seeds for events containing hits are stored in the hit-record file. They can be used to repeat events for visualisation or to investigate crashes and other anomalous behaviour.

/random/setDirectoryName ./seeds
/random/resetEngineFrom currentEvent.rndm
/random/saveThisEvent
/random/setSavingFlag

The currentEvent.rndm file should contain the two seeds written to the scintillation-hit file.

Known Visualisation Messages

When running interactively, messages similar to the following may appear:

BooleanProcessor::caseIE : unimplemented case
BooleanProcessor: boolean operation failed

These messages are caused by the visualisation of Boolean volumes. They do not affect functionality or performance and can be ignored.

Compilation and Loading Notes

When using explicit, non-shared libraries, compilation with neutrons in the physics list may take more than five minutes.

Using shared libraries is generally more efficient, although loading at runtime may still take several minutes. This is partly because the neutron implementation requires complete datasets for each specified isotope.

For Red Hat 7.0 or later, set:

G4SYSTEM=Linux-g++

Alternatively, install backward compatibility with egcs and modify:

config/sys/Linux-egcs.gmk

Set CXX to kgcc instead of the original g++.

Revision History

  • Author: Alex Howard
  • Initial date: 29 November 2001
  • Updated: 18 June 2002

Last updated: 24/11/2026 by M. A. Cortes-Giraldo