How the geometry is defined

Each geometry is a subdirectory of hps-detectors/detectors, and must contain the following:

  • compact.xml: defines the geometry in terms of detector modules, each of which corresponds to classes in GeomConverter - used by GeomConverter and LCSim
  • other (non-geometry) detector parameters
  • SamplingFractions: sampling fractions for each calorimeter
  • LCDD file for the geometry: generated from the compact.xml - used by SLIC

Current "official" geometries

Conventions followed for all geometries unless noted otherwise:

  • Beam spot on target defines (0, 0, 0); Y is vertical, Z points down the magnet bore

HPS-Proposal2014-v6 (three versions with different B-fields)

Official geometry for 2014 mock data challenge.

  • SVT rotated 30.52 mrad around target; single sensors for layers 1-3, double sensors with double readout (unganged) for layers 4-6
  • ECal flange face at z=1318 mm and photon hole aligned at 30.52 mrad from target
  • Front face of ECal crystals is z=1393 mm; ECal aligned so the 30.52 mrad photon beam intersects centerline of ECal at its front face
  • All dead material defined using Geant4 primitives: SVT vacuum chamber, ECal flange and vacuum chamber (with honeycomb)
  • Uniform magnetic field extending from z=-8.28 to 99.72 cm
  • Vacuum (zero density) planes at z=15 cm, same shape as standard SVT layers; hits are saved for charged particles passing through these planes (for use in recoil electron studies)
  • Vacuum (zero density) planes at magnetic field boundaries; hits are saved for charged particles passing through these planes

SLIC crashes on approximately 1 in a billion events. This bug is believed to be resolved in v7.


Engineering run geometry with surveyed SVT and ECAL.  Identical to HPS-EngRun2015-Nominal-v2, except:

  • Top ECAL shifted up by 2.7 mm
  • Bottom ECAL shifted down by 0.9 mm


Engineering run geometry with surveyed SVT. 

  • Based on HPS-EngRun2015-v1
  • Includes first pass of  SVT survey.


Engineering run geometry. Replaces the v0.  The SVTPosition is either "Nominal" (+/- 1.5 mm to active sensor) or "Open" (+/~ 7mm to active sensor). 

  • Based on HPS-EngRun2015-v0
  • Fixed bug in local sensor coordinate system.


First version of engineering run geometry.  The SVTPosition is either "Nominal" (+/- 1.5 mm to active sensor) or "Open" (+/~ 7mm to active sensor). 

HPS-ECalCommissioning-V3 (with and w/o fieldmap)

Official geometry for the Decembers 2014 ECal commissioning run

  • As designed ECAL with asymmetric top/bottom gaps
  • no SVT!
  • B-field of -0.33T (in y)


Official geometry for 2012 test run as-built.

  • Current best guess at alignment of SVT
  • Plate-and-pipe ECal flange
  • ECal as surveyed

Adding a new detector

  • ALWAYS create a new detector when you make changes to the geometry
  • make a subdirectory of hps-detectors/detectors; name of the subdirectory is the name of the detector
  • copy from another detector: compact.xml,, SamplingFractions
  • in compact.xml: change name and comment in <info> block
  • in change name
  • Create the LCDD file for use in slic: see below

Converting the compact.xml file to LCDD

Note that in these examples 3.4.0-SNAPSHOT will need to be appropriately modified.

The following will directly create the lcdd file:

java -cp distribution/target/hps-distribution-3.4.0-SNAPSHOT-bin.jar org.hps.detector.DetectorConverter -f lcdd -i compact.xml -o detectorName.lcdd

Note that it is easiest to run this command from the HPS detector-data directory, as the gdml directory, needed by most recent detectors, will be found automatically.

You also need to specify the run number using -r <runNumber> to have the detector added to the conditions database


Viewing LCDD

The LCDD file can be viewed directly using SLIC:

slic -g mygeom.lcdd -n

This puts you in an interactive Geant4 session; here is a suggested series of commands (from How do I visualize with OpenGL):

/vis/open OGLSX

There is a Python script that converts LCDD to GDML and views it in ROOT:

  1. The script requires ROOT to be installed and in the path. It also requires ROOT to have the gdml module, but that is pretty standard by now.
  2. Invoke with -h for options. Main useful option would be to call with -N to only make the lcdd_cleaned.gdml file.
  3. It cannot show tessellated objects. These cause ROOT to crash, so tessellated stuff gets stripped.
  4. It pollutes your working directory with two files: lcdd_cleaned.gdml and lcdd_cleaned.C. The first is a pure gdml file, the second is a root script to render it.
  5. You can rotate and zoom in, make cutaway planes etc all using ROOT interactively. It is useful for checking your geometry.

Viewing GDML

ROOT can view GDML, but not tessellated volumes: How do I visualize with ROOT

Viewing HepRep

WIRED can view HepRep files and can be run as a JAS3 plugin.

  • No labels

1 Comment

  1. We should rewrite the section on GeomConverter, which is now in lcsim/trunk/detector-framework in the SVN.  I also did not move the Makefile from hps-detectors to the new HPS detector-data package, so the command line tool should probably just be used directly.