1G2ROOT(1) General Commands Manual G2ROOT(1)
2
3
4
6 g2root - convert GEANT geomtry files to ROOT files
7
9 g2rootd [-f map_name] geant_name macro_name
10
12 You can convert a GEANT (see
13 http://wwwinfo.cern.ch/asd/geant/index.html fore more on GEANT) geome‐
14 try to ROOT geometry with the following steps
15
16 1 Run the interactive version of GEANT and produce a Zebra RZ file
17 detector.geom, by typing the command:
18
19 Geant > rz/file 21 detector.geom on
20
21
22 2 Run the g2root program to convert the Zebra RZ file into a ROOT
23 macro detector.C:
24
25 g2root detector.geom detector.C
26
27
28 3 Run the following ROOT session;
29
30 root [1] .x detector.C
31 root [2] detector.Draw()
32 root [3] c1.x3d() // (this invokes the 3-d Root viewver)
33 root [4] TFile f("detector.root","NEW") //open a new root file
34 root [5] detector.Write() //Write the geometry structure
35 root [6] f.Write()
36
37 Note that the TNode structure currently in ROOT was not designed as a
38 replacement for a true geometry package. The idea was mainly to draw
39 simple geometries in event display programs. We are currently investi‐
40 gating several alternatives for a true & efficient geometry package
41 supporting;
42
43 - a disk data base with storage of multiple geometry versions
44
45 - an interactive editor and viewer
46
47 - with 3-d views
48
49 - but also 2-d cut views
50
51 - with interfaces to existing or future MC such as GEANT3 or
52 GEANT4
53
54 A second program called gh2root (see
55 http://root.cern.ch/root/gh2root.html) generates automatically C++ code
56 corresponding to the GEANT3 Zebra structures JSET, JVERTX, JKINE, JHITS
57 and JDIGI.
58
60 root(1), h2root(1),
61 and
62 The ROOT Users Guide
63 avaliable from the main ROOT website:
64 http://root.cern.ch
65
67 The ROOT team (see web page above):
68 Rene Brun and Fons Rademakers
69
71 This library is free software; you can redistribute it and/or modify it
72 under the terms of the GNU Lesser General Public License as published
73 by the Free Software Foundation; either version 2.1 of the License, or
74 (at your option) any later version.
75
76 This library is distributed in the hope that it will be useful, but
77 WITHOUT ANY WARRANTY; without even the implied warranty of MER‐
78 CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
79 General Public License for more details.
80
81 You should have received a copy of the GNU Lesser General Public
82 License along with this library; if not, write to the Free Software
83 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
84 USA
85
87 This manual page was written by Christian Holm Christensen
88 <cholm@nbi.dk>, for the Debian GNU/Linux system (but may be used by
89 others).
90
91
92
93ROOT Version 3 G2ROOT(1)