Re: GEANT3 to ROOT files

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Jul 01 1999 - 09:35:36 MEST


Hi Michael,
You can convert a Geant geometry to Root geometry with the following
steps
 1- run the interactive version of Geant and type the command;
        Geant > rz/file 21 detector.geom on
    This produces a Zebra RZ file detector.geom.
    
 2- run the g2root program in $ROOTSYS/bin/g2root
       g2root detector.geom detector.C
    this converts the Zebra RZ file into a Root macro detector.C

 3- run the following Root session;
    Root > .x detector.C
    Root > detector.Draw()
    Root > c1.x3d()    (this invokes the 3-d Root viewver)
    Root > TFile f("detector.root","NEW")  //open a new root file
    Root > detector.Write()                //Write the geometry
structure
    Root > f.Write()                  

Note that the TNode structure currently in Root was not designed
as a replacement for a true geometry package. The idea was mainly to
draw
simple geometries in event display programs.
We are currently investigating several alternatives for a true &
efficient
geometry package supporting;
  - a disk data base with storage of multiple geometry versions
  - an interactive editor and viewer
     - with 3-d views
     - but also 2-d cut views
  - with interfaces to existing or future MC such as Geant3 or Geant4

Rene Brun


Michael Katz-Hyman wrote:
> 
> I am aware of those programs.
> 
> Out old event display is written in Fortran and GEANT and our geometries
> are half way hard-coded into the FORTRAN.  Under ROOT you can move in the
> ROOT Canvas to save as a macro under the file menu.  Is there a GEANT
> routine that would essentially do the same for volumes created by GEANT?
> 
>         Thanks
>         Michael Katz-Hyman
> 
> On Wed, 30 Jun 1999, Valeri Fine (Faine) wrote:
> 
> > There are many ways to do this depends of your goals.
> >
> > Go to
> >
> > http://root.cern.ch/root/Search.phtml
> >
> > and look for "g2root" and "gh2root"
> >
> > An example of another "home-made, but still ROOT-based" solution is present
> > on:
> >
> > http://www.star.bnl.gov/STAR/html/comp_l/root/html/St_geom_Maker.html
> >
> >   With my regards,
> >                                 Valery
> >
> >



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:35 MET