Skip to content

Checking your geometry visually

Mark edited this page Apr 19, 2017 · 11 revisions
  • Requirements: compiled geant4 with Qt support

  • Procedure:

    • run g4sim:
g4sim
  • choose a geometry from the ResetMisc menu, for example SiR2 geometry:

choose geo

  • the button is defined in: alcap/macros/common/gui.mac
#
# Run menu :
/gui/addMenu run Run
/gui/addButton run "beamOn 1" "/run/beamOn 1"
/gui/addButton run run                   "/control/execute {ALCAPWORKROOT}/macros/run.mac"
/gui/addButton run grid_ol               "/control/execute {ALCAPWORKROOT}/macros/common/grid_ol.mac"
/gui/addButton run line_ol               "/control/execute {ALCAPWORKROOT}/macros/common/line_ol.mac"
#
# ResetMisc menu :
/gui/addMenu reset ResetMisc
/gui/addButton reset SiR2                "/control/execute {ALCAPWORKROOT}/macros/SiR2.mac"
/gui/addButton reset Al100                "/control/execute {ALCAPWORKROOT}/macros/Al100.mac"
/gui/addButton reset GeCallibration      "/control/execute {ALCAPWORKROOT}/macros/GeCallibration.mac"
/gui/addButton reset GeCalibration_Si16p_target      "/control/execute {ALCAPWORKROOT}/macros/GeCalibration_Si16p_target.mac"
/gui/addButton reset resetVerbose        "/control/execute {ALCAPWORKROOT}/macros/resetVerbose.mac"
/gui/addButton reset resetCut            "/control/execute {ALCAPWORKROOT}/macros/resetCut.mac"
/gui/addButton reset Si16p      "/control/execute {ALCAPWORKROOT}/macros/Si16p.mac"
#
# ResetOut menu :

If you are like me and had some problems initially with visualising the beam, check that this command is OK (no errors)

/vis/open OGL

then create a viewer

/vis/viewer/create

Now if you

/run/beamOn 1

You should see tracks.

![https://marie.npl.washington.edu/owncloud/remote.php/webdav/R2015/R2015b/MonteCarlo/particletrack.png](A single muon track entering from the right hitting SiT, the target and the back wall.)

Clone this wiki locally