Converting Geant3 geometry to root, and checking for volume overlaps


This is all work by Zhengyun You (zhengyunyou@gmail.com) who is stationed
at Los Alamos right now (2007). These steps worked for me:

in gffgo.dat, change line 
SWIT    5 0 1 0 0 0 0 0 0  ! ...       to
SWIT    2 0 1 0 0 0 0 0 0  ! 

in phnx.par, change line 
  sili_endcap_strip_on = 0,   to 
  sili_endcap_strip_on = 1,

Start Pisa, and exit.

change gffgo.dat and phnx.par back 

Now you should have a file geometry.dat

[ as an aside, you also get a file phnx.dat.cZ. Rename this
  to pisafile.dat.cZ. This file is used by offline mut,fvtx code ]

convert geometry.dat to a root macro: 

 g2root geometry.dat geometry.C 

Run the macro and make a root file that contains the geometry: 
root -l
root [0] .x geometry.C
===> geometry, geometry.C created
...
----------------modeler ready----------------
root [1]
root [2] gGeoManager->Export("geom.root","PHENIX")

PHENIX is the name of the object that is the geometry.


-------------- THIS IS AS FAR AS YOU NEED TO GO TO PRODUCE GEOMETRY FILES FOR OFFLINE RUNNING -----------


root -l geom.root
root [1] TBrowser aaa
if you click down you can right-click on volumes and draw them, and do 
many other things. (like ask for overlaps)


-----------------------

Download a copy of macro checkOverlap.C here:  checkOverlap.C

root -l
.L checkOverlap.C
checkOverlap(0.1)

The parameter 0.1 is the minimum distance (units? cm, mm) of overlap 
or protrusion. Try successively smaller parameters. The macro 
issues warnings if it finds overlaps or protrusions. Fix them, and
run through the whole thing again. 


Jan 07, updated June 08 Hubert van Hecke