[Halld-offline] Fwd: r10030 - in trunk/sim-recon/src/programs/Utilities: . hd_geom_query
David Lawrence
davidl at jlab.org
Wed Nov 28 16:37:45 EST 2012
Hi All,
As I mentioned at the Offline Software meeting today, I have written
a new
utility for examining the geometry. Specifically, if one gives it an
X,Y,Z coordinate
in the lab frame, it will print the volume and material properties for the
volume at that point. It will also list the entire volume hierarchy of
that volume
outwards to the outermost Mother volume. Here is an example querying the
center
of the target.
>hd_geom_query 0 0 65
Location: (X, Y, Z) = (0, 0, 65)
===============================================
Volume: LIH2
material: LiqHydrogen
density: 0.0708 g/cm^3
rad. length: 816.933 cm
A: 1.00797
Z: 1
ancestory: LIH2 -> TGTV -> TARG -> HALL -> SITE
One can also have it generate the geometry from the XML at run-time
using external HDDS tools similar to what was recently done with hdgeant.
If the program is run with no arguments, a Usage statement is printed:
>hd_geom_query
Usage:
hd_geom_query [options] X Y Z
Print the material properties for the specified point in lab
coordinates. Units of X,Y, and Z are cm.
By default, this uses the geometry built into the file libHDGEOMETRY.a
that was used to link this executable. The -xml switch may be used
to dynamically compile and link code generated from the XML at run
time. If an equals sign "=" follows the -xml switch then the
main_HDDS.xml file is taken from the remainder of that argument.
If the -xml switch is specified, then a file named "tmp_hddsroot.so"
is searched for in the current directory. If found, it is opened and
the geometry checksum is read from it and compared to that of the XML
specified (which may be the default of $HDDS_HOME/main_HDDS.xml).
If the two match, then that shared object is used, bypassing the
(expensive) compilation phase. If the file is not present, is unreadable,
or the checksums don't match, then the shared object is automatically
(re)generated.
options:
-h or --help Print this usage statement
-xml[=main_HDDS.xml] Dynamically generate geometry
-checksum Print the MD5 checksum of the
geometry and exit
If the -xml option is given and no file is specified,
then a value of: $HDDS_HOME/main_HDDS.xml
is used.
The source for this is now in the sim-recon tree and can be found here:
https://halldsvn.jlab.org/repos/trunk/sim-recon/src/programs/Utilities/hd_geom_query
Regards,
-David
-------- Original Message --------
Subject: r10030 - in trunk/sim-recon/src/programs/Utilities: .
hd_geom_query
Date: Wed, 28 Nov 2012 10:37:40 -0500
From: Hall-D.SVN.Repository at jlab.org
To: davidl at jlab.org, brash at pcs.cnu.edu, wolin at jlab.org,
zisis at uregina.ca, mashephe at indiana.edu, remitche at indiana.edu,
zihlmann at jlab.org, somov at jlab.org, staylor at jlab.org,
kmoriya at indiana.edu, pmatt at jlab.org, leckey at jlab.org
Author: davidl
Date: 2012-11-28 10:37:40 -0500 (Wed, 28 Nov 2012)
New Revision: 10030
Added:
trunk/sim-recon/src/programs/Utilities/hd_geom_query/
trunk/sim-recon/src/programs/Utilities/hd_geom_query/Makefile
trunk/sim-recon/src/programs/Utilities/hd_geom_query/hd_geom_query.cc
Log:
A new utility to get info on the volume located at a
specific location in lab coordinates. This uses the
ROOT TGeo facility. The hddsroot.h file generated by
HDDS is compiled in and used by default. An option
exists to regenerate this file and compile and link
it dynamically similar to what is now done in hdgeant.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.jlab.org/pipermail/halld-offline/attachments/20121128/8e1ec1d7/attachment-0002.html>
More information about the Halld-offline
mailing list