Mirrors Example



Upcoming in the next release.

This example showcases the GEMC optical surfaces (“mirrors”). Three identical 1 GeV electrons cross a low-index gas radiator, each aimed at the center of one reflector plate. The Cherenkov photons stay in a narrow forward cone around each electron and land on that electron’s plate. Each plate demonstrates a different mirror definition:

Each plate reflects its photons back onto its own upstream photon detector panel (using the gPhotonDetector digitization and drawn in its mirror’s color), so the panels see identical conditions and only the reflection differs. A fourth panel counts the transmitted photons after they cross a large gap behind the semi-transparent plate. Typical relative photon counts (flat panel = 1):

Panel Surface Relative count
flat (gold) polished, R = 0.90 1.00
rough (tomato) specular lobe, sigmaAlpha = 0.03 about 0.99 (blurred image, slight leak)
semi (blue) reflected, R = 0.60 about 0.69 (= 0.60 / 0.90)
behind (blue) transmitted, T = 0.30 about 0.37 (= 0.30 / 0.90)


Quickstart

Copy the example to your current directory. To create the geometry, run 10 events, and produce CSV output files:

cp -r $GEMC_HOME/examples/optical/mirrors .
cd mirrors
./mirrors.py
gemc mirrors.yaml -n=10


Geometry

The geometry is defined in mirrors.py. The world volume root contains a 1 m^3 gas radiator (radiatorGas, a demonstration gas with refractive index about 1.001). Inside the radiator:

Interactive viewer:

Mirrors simulation with 1 generated event.


Mirror definitions

Each mirror is a GMirror published alongside the geometry:

polished = GMirror("polished_metal")
polished.type = "dielectric_metal"
polished.finish = "polished"
polished.model = "unified"
polished.border = "SkinSurface"
polished.photonEnergy = "2.0*eV 3.0*eV 4.0*eV 5.0*eV 6.0*eV"
polished.reflectivity = "0.90 0.90 0.89 0.88 0.87"
polished.publish(cfg)

and volumes reference them by name:

plate.mirror = "polished_metal"

See the Mirrors documentation for the complete field reference.


Physics

The steering card enables optical physics:

phys_list: FTFP_BERT + G4OpticalPhysics

Running the example prints the surfaces created by GEMC:

G4World: created optical surface <mirrors/polished_metal> type <dielectric_metal>,
finish <polished>, model <unified>
G4World: created 3 optical surfaces, attached to 2 skin and 1 border logical surfaces

Plotting with the GEMC Analyzer

Run GEMC with 10 events first. The default YAML file writes the analyzer CSV streams.

gemc mirrors.yaml -n=10

Per-panel y vs x

The plots below split the optical-photon hit positions by panel. The back transmitted panel is shown as its own plot, not merged into the semi-transparent reflected-panel plot. The count shown on each image is the number of rows selected from the true-information stream.

   
flat panel y vs x rough panel y vs x
flat reflected panel
counts = 2,339
rough reflected panel
counts = 2,347
semi panel y vs x back panel y vs x
semi-transparent reflected panel
counts = 1,650
back transmitted panel
counts = 877