<html>
  <head>
    
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">David,<br>
      <br>
      My tool also accepts plain old 3-vectors that you type in at the
      command line.<br>
      <br>
      -Richard J.<br>
      <br>
      <br>
      On 11/28/2012 11:05 PM, David Lawrence wrote:<br>
    </div>
    <blockquote cite="mid:50B6DF0E.90009@jlab.org" type="cite">
      
      <br>
      Hi Richard,<br>
      <br>
        Yes, I'm aware of that functionality. I believe this
      command-line tool compliments that by providing something that can
      be used quickly when the 3-D coordinates of interest are already
      known. It is *much* simpler than figuring out how to plot the
      right cutaway and then click on the 3-D point of interest on a 2-D
      screen. While the resulting information may be the same, the path
      to it is different making this a useful addition to our toolbox.<br>
      <br>
      Regards,<br>
      -David<br>
      <br>
      <div class="moz-cite-prefix">On 11/28/12 6:44 PM, Richard Jones
        wrote:<br>
      </div>
      <blockquote cite="mid:50B6A1C6.3040702@uconn.edu" type="cite">
        <div class="moz-cite-prefix">Hello,<br>
          <br>
          A tool for this already existed in hdgeant.  My tool allows
          you to click on a drawing of the detector that is cut through
          any arbitrary plane (origin, orientation selected with numbers
          or a mouse) and see the entire volume hierarchy plus the local
          value of the magnetic field.  Of course there is nothing wrong
          with having another tool that does the same thing.<br>
          <br>
          -Richard J.<br>
          <br>
          <br>
          <br>
          <br>
          On 11/28/2012 4:37 PM, David Lawrence wrote:<br>
        </div>
        <blockquote cite="mid:50B68429.3050207@jlab.org" type="cite"> <br>
          Hi All,<br>
          <br>
            As I mentioned at the Offline Software meeting today, I have
          written a new<br>
          utility for examining the geometry. Specifically, if one gives
          it an X,Y,Z coordinate<br>
          in the lab frame, it will print the volume and material
          properties for the<br>
          volume at that point. It will also list the entire volume
          hierarchy of that volume<br>
          outwards to the outermost Mother volume. Here is an example
          querying the center<br>
          of the target.<br>
          <div class="moz-forward-container"><br>
            <tt>>hd_geom_query 0 0 65</tt><br>
            <br>
            <tt>   Location: (X, Y, Z) = (0, 0, 65)</tt><tt><br>
            </tt><tt>===============================================</tt><tt><br>
            </tt><tt>     Volume: LIH2</tt><tt><br>
            </tt><tt>   material: LiqHydrogen</tt><tt><br>
            </tt><tt>    density: 0.0708 g/cm^3</tt><tt><br>
            </tt><tt>rad. length: 816.933 cm</tt><tt><br>
            </tt><tt>          A: 1.00797</tt><tt><br>
            </tt><tt>          Z: 1</tt><tt><br>
            </tt><tt>  ancestory: LIH2 -> TGTV -> TARG -> HALL
              -> SITE</tt><br>
            <br>
            One can also have it generate the geometry from the XML at
            run-time<br>
            using external HDDS tools similar to what was recently done
            with hdgeant.<br>
            <br>
            If the program is run with no arguments, a Usage statement
            is printed:<br>
            <br>
            <tt>>hd_geom_query<br>
              <br>
              Usage:<br>
                  hd_geom_query [options] X Y Z<br>
              <br>
              Print the material properties for the specified point in
              lab<br>
               coordinates. Units of X,Y, and Z are cm.<br>
              <br>
              By default, this uses the geometry built into the file
              libHDGEOMETRY.a<br>
              that was used to link this executable. The -xml switch may
              be used<br>
              to dynamically compile and link code generated from the
              XML at run<br>
              time. If an equals sign "=" follows the -xml switch then
              the<br>
              main_HDDS.xml file is taken from the remainder of that
              argument.<br>
              <br>
              If the -xml switch is specified, then a file named
              "tmp_hddsroot.so"<br>
              is searched for in the current directory. If found, it is
              opened and<br>
              the geometry checksum is read from it and compared to that
              of the XML<br>
              specified (which may be the default of
              $HDDS_HOME/main_HDDS.xml).<br>
              If the two match, then that shared object is used,
              bypassing the<br>
              (expensive) compilation phase. If the file is not present,
              is unreadable,<br>
              or the checksums don't match, then the shared object is
              automatically<br>
              (re)generated.<br>
              <br>
               options:<br>
                  -h or --help          Print this usage statement<br>
                  -xml[=main_HDDS.xml]  Dynamically generate geometry<br>
                  -checksum             Print the MD5 checksum of the <br>
                                        geometry and exit<br>
              <br>
              If the -xml option is given and no file is specified,<br>
              then a value of: $HDDS_HOME/main_HDDS.xml<br>
              is used.<br>
            </tt><br>
            The source for this is now in the sim-recon tree and can be
            found here:<br>
            <br>
            <a href="https://halldsvn.jlab.org/repos/trunk/sim-recon/src/programs/Utilities/hd_geom_query">https://halldsvn.jlab.org/repos/trunk/sim-recon/src/programs/Utilities/hd_geom_query</a><br>
            <br>
            <br>
            Regards,<br>
            -David<br>
            <br>
            <br>
            -------- Original Message --------
            <table class="moz-email-headers-table">
              <tbody>
                <tr>
                  <th nowrap="nowrap">Subject: </th>
                  <td>r10030 - in
                    trunk/sim-recon/src/programs/Utilities: .
                    hd_geom_query</td>
                </tr>
                <tr>
                  <th nowrap="nowrap">Date: </th>
                  <td>Wed, 28 Nov 2012 10:37:40 -0500</td>
                </tr>
                <tr>
                  <th nowrap="nowrap">From: </th>
                  <td><a href="mailto:Hall-D.SVN.Repository@jlab.org">Hall-D.SVN.Repository@jlab.org</a></td>
                </tr>
                <tr>
                  <th nowrap="nowrap">To: </th>
                  <td><a href="mailto:davidl@jlab.org">davidl@jlab.org</a>,
                    <a href="mailto:brash@pcs.cnu.edu">brash@pcs.cnu.edu</a>,
                    <a href="mailto:wolin@jlab.org">wolin@jlab.org</a>, <a href="mailto:zisis@uregina.ca">zisis@uregina.ca</a>,
                    <a href="mailto:mashephe@indiana.edu">mashephe@indiana.edu</a>,
                    <a href="mailto:remitche@indiana.edu">remitche@indiana.edu</a>,
                    <a href="mailto:zihlmann@jlab.org">zihlmann@jlab.org</a>,
                    <a href="mailto:somov@jlab.org">somov@jlab.org</a>, <a href="mailto:staylor@jlab.org">staylor@jlab.org</a>,
                    <a href="mailto:kmoriya@indiana.edu">kmoriya@indiana.edu</a>,
                    <a href="mailto:pmatt@jlab.org">pmatt@jlab.org</a>, <a href="mailto:leckey@jlab.org">leckey@jlab.org</a></td>
                </tr>
              </tbody>
            </table>
            <br>
            <br>
            <pre>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.


</pre>
            <br>
          </div>
          <br>
          <br>
          <fieldset class="mimeAttachmentHeader"></fieldset>
          <br>
          <pre wrap="">_______________________________________________
Halld-offline mailing list
<a href="mailto:Halld-offline@jlab.org">Halld-offline@jlab.org</a>
<a href="https://mailman.jlab.org/mailman/listinfo/halld-offline">https://mailman.jlab.org/mailman/listinfo/halld-offline</a></pre>
        </blockquote>
        <br>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">_______________________________________________
Halld-offline mailing list
<a href="mailto:Halld-offline@jlab.org">Halld-offline@jlab.org</a>
<a href="https://mailman.jlab.org/mailman/listinfo/halld-offline">https://mailman.jlab.org/mailman/listinfo/halld-offline</a></pre>
      </blockquote>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Halld-offline mailing list
<a href="mailto:Halld-offline@jlab.org">Halld-offline@jlab.org</a>
<a href="https://mailman.jlab.org/mailman/listinfo/halld-offline">https://mailman.jlab.org/mailman/listinfo/halld-offline</a></pre>
    </blockquote>
    <br>
  </body>
</html>