Yes, you can also do it in Fortran.
In your Geant program, add the following statement after your already
existing statement
call ggclos
the following line
call grfile(21,'detector.geom','ON')
Rene Brun
> Thanks
> Michael Katz-Hyman
>
> On Thu, 1 Jul 1999, Rene Brun wrote:
>
> > 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
> > > >
> > > >
> >