[Halla12_software] CAD format

Wouter Deconinck wdconinc at jlab.org
Tue Dec 7 14:18:43 EST 2010


# Executive summary: GDML/persistency is useful,
# even if you don't export from CAD

Hi all,

For Qweak we investigated GDML as a possible option to get geometry
data from CAD into Geant4.  I think there are two different aspects to
the use of GDML/another persistency model, and it is best to keep them
apart early on because they provide benefits independent of each
other.

The first aspect is to have a meta-description of the geometry that
can be modified without having to modify the Geant4 program code.
This is generally referred to as 'persistency'.  This is equivalent to
the role that euclid plays in geant3.  This is the role fulfilled by
GDML, HDDS (Hall D geometry description), or LCDD, and could even be
done completely in ROOT using the TGeo classes which interface nicely
with TEve. You basically build up a database of geometrical objects
which can be easily modified.  How you build up the database is not
relevant in this aspect; I think Hall D edits those HDDS XML files by
hand, but you could also use something fancier like the ROOT geometry
editor and export to GDML.  The different XML-derived formats differ
in how they treat active detectors and passive geometry elements.
Implementing this for passive geometry elements is easy, but usually
that's not very useful by itself (unless you only want to study
collimator positions and shielding blocks).  The Qweak Geant4
simulation has support for importing and exporting only passive GDML
geometry elements.  Active elements are a lot/bit more difficult to
implement, and they are not supported by the bare GDML standard so you
need one of the extensions.

The second aspect is to be able to export the geometry that is stored
in a CAD model into the persistency data format.  There are indeed
programs available to transform STEP files into GDML (but they are not
free).  In the CAD model you (likely) don't have a distinction between
what is an 'active' detector and what is a 'passive' element, so that
information is not present in the translation to GDML and has to be
added by hand again.  This would require some thought on how to do
this best (GDML can probably take string tags from comment fields in
the STEP files).  Another limitation of the STEP->GDML programs that
we have used is that they don't support exporting of tesselated
objects.  Any non-standard element (e.g. the Qweak toroidal magnet
'spider' at the upstream end around the beam pipe) is not composed out
of primitives but described as a tesselated volume.  This is lost in
the translation that we used.

There are various programs to go from CAD STEP files to GDML (prices
are one year old and thus approximate).
- There is Fastrad ($1k/year) which is intended for radiative dose
simulations, mostly medical applications.  The free license for
Fastrad allowed the export of up to 20 elements, although I think they
bumped up the limit to a bit higher.  It is Windows only but runs in
Wine.
- ST-Tools ($23k+) is available, but we haven't tested it in Qweak (price).
- And finally OpenFrontier, based on OpenCascade, developed by the
European Space Agency for simulations of satellites, but that is only
available to ESA member countries (Croatia, the only Qweak
collaborator in Europe is not an ESA member).  In my opinion this
looked like the best fit to what we (Qweak) needed, but was
unfortunately unavailable to us, and not enough push by the
collaboration to get something like this (and we started using
Geant4/GDML too late anyway).  And unfortunately the website does not
mention anything about OpenFrontier anymore, but it might have been
included in ESABASE2.

Cheers,
Wouter

http://esabase2.net/product/
http://www.fastrad.net/ and http://www.trad.fr/
https://caps.latech.edu/elog/R1+Software/090929_140014/stdev12prices2009.pdf

-- 
Wouter Deconinck
Assistant Professor of Physics
College of William & Mary
Office: Millington Hall 235
Phone: (757) 221-3539


More information about the Halla12_software mailing list