On Mon, 23 Feb 1998, Pasha Murat wrote:
> hello rooters,
>
> ...
> 3. We at CDF have taken a very different approach. We also decided to use a
> mixed-language
> environment with detector geometry described by a set of C++ classes
> derived from some generic geometry class. This generic class interfaces
> us to G3: its constructors(init methods) call GSPOS/GSVOLU. This allowed us
> to avoid explicit conversion of G3 geometry structure into C++, we
> just used what was already available and wrappered it in C++ jacket.
> ....
> 5 We are not using G3 tools to generate hits: GUSTEP passes all the
> necessary information to C++ code, which directly stores hits in C++
> structures using whatever container classes are chosen (ROOT
> collections, STL containers, ...)
> By doing this we saved ourselves from writing one more convertor...
> Remember: available manpower (especially with knowledge of C++) is
> limited in HEP these days!
Working for the Phobos experiment I have gone along a similar
path. However having a working Geant application and a set of C++ geometry
classes used for the track reconstruction purposes I have decided so far
not to build the structure of the full geometry in C++.
A faster approach (especially if there are fortran programmers
available) is a direct conversion/information-transfer from the Geant
application to Root by a call to global interface C functions from the
fortran code. In this way only the Geant initialization functions and
eventually a custom fortran function to transfer mass-momentum info are
called, and then the control is transferred to the (linked) Geant
application.
Output can be written in various formats and can also be transferred
directly to the C++ objects in memory.
Having a less detailed and not necessarily fully Geant compatible
"reconstruction" geometry makes it possible to optimize the geometry
logical structure for the reconstruction and data analysis purposes.
> 5. To use ROOT visualization tools one could derive this generic class from
> TNode, and to organize nodes into TGeometry, which in this case would be
> maintained in parallel to G3 geometry structure, we didn't do it yet though.
> G3 graphics still seems to be suitable for many practical applications.
This has already been done in the Phobos "reconstruction" geometry.
The database of the changing geometry parameters of the active volume
elements can be kept in the Root geometry version, and it can be
used to update the Geant full geometry.
> 6. In conclusion (and we live in this mixed-language environment for
> already about 1.5 years) this way still seems to be the most efficient
> one to get G3 working in C++ environment, which in this case could be
> based on ROOT.
> Regards, Pasha.
These are my personal comments that I have come to while doing
development of the code and have nothing to do with the Phobos policy in
the future.
Andrzej Olszewski.