Re: g2root

Jayoung Wu (jayoung@glue.umd.edu)
Wed, 1 Jul 1998 15:14:39 -0400 (EDT)


On Tue, 30 Jun 1998, Rene Brun wrote:

> To generate a Geant geometry RZ file, add one line after GGCLOS
> to your Fortran program
> call grfile(21,"mygeom.rz","ON")
>
> then use the g2root converter with
> g2root mygeom.rz mygeom.root
>
> Rene Brun
>

Still I do not understand how "mygeom.rz" file is generated.
Even if I add call grfile(21,"mygeom.rz","ON")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
to my fortran program "mygeom.f", still I do not have "mygeom.rz".
To generate "mygeom.rz" what should I do with "mygeom.f"?
Should I compile it? Or any other way?

> >
> > ---------------------- mygeom.f ---------------------------------
> > c+DECK, UGEOM.
> > ***************************************************************************
> > SUBROUTINE UGEOM
> > ***************************************************************************
> > c/*
> > c#include "/cern/97a/inc/gckine.inc"
> > c#include "/cern/97a/inc/usphys.inc"
> > c#include "/cern/97a/inc/matidc.inc"
> > c#include "/cern/97a/inc/gmsize.inc"
> > c*/
> >
> > include '/home/sina/CERNINCLUDES/myugeom.inc'
> >
> > ******* MATERIAL DESCRIPTION
> > CALL GSMIXT(MATBGO,'BGO$',ABGO,ZBGO, 7.1, -3, WBGO)
> >
> > CALL GSMATE(MATSCN,'SCINTILLATOR$', 20.0, 10.0, 1.032,
> > + 42.4, 58.4, 0, 0)
> >
> > CALL GPMATE(0) !PRINT OUT ALL MATERIALS
> >
> > ******* TRACKING MEDIUM
> > IFIELD = 0
> > FIELDM = 0.
> > TMAXFD = 10.
> > STEMAX = 1. !DEDXMX
> > DEEMAX = 0.05
> > EPSIL = 0.001
> > STMIN = 0.001
> >
> > CALL GSTMED(ITRAIR,'AIR$',MATAIR, 0, IFIELD,
> > + FIELDM, TMAXFD, STEMAX, DEEMAX, EPSIL, STMIN, 0, 0)
> >
> > CALL GSTMED(ITRBGO,'BGO$',MATBGO, 0, IFIELD,
> > + FIELDM, TMAXFD, STEMAX, DEEMAX, EPSIL, STMIN, 0, 0)
> >
> > CALL GSTMED(ITRCAR,'CARBON$',MATCAR, 0, IFIELD,
> > + FIELDM, TMAXFD, STEMAX, DEEMAX, EPSIL, STMIN, 0, 0)
> >
> > CALL GSTMED(ITRSCN,'SCINTILLATOR$',MATSCN, 0, IFIELD,
> > + FIELDM, TMAXFD, STEMAX, DEEMAX, EPSIL, STMIN, 0, 0)
> >
> >
> > ******* DEFINE THE GEOMETRICAL SETUP
> > !First of all, create volumes
> > SIZE(1) = 100. !half of length in x direction
> > SIZE(2) = 100. !y
> > SIZE(3) = 100. !z
> > CALL GSVOLU('ROOT','BOX ', ITRAIR, SIZE, 3, IVOLU)
> >
> > SIZE(1) = 50. / 2.
> > SIZE(2) = 50. / 2.
> > SIZE(3) = 2.5 / 2.
> > CALL GSVOLU('BGOL','BOX ', ITRBGO, SIZE, 3, IVOLU)
> > CALL GSVOLU('BGEL','BOX ', ITRBGO, SIZE, 3, IVOLU)
> >
> > thkscn = 2.0
> > SIZE(3) = thkscn / 2.
> > SIZE(1) = 25.0
> > SIZE(2) = SIZE(1)
> > CALL GSVOLU('SCN1','BOX ', ITRSCN, SIZE, 3, IVOLU)
> >
> > !Position the volumes --- easy part, which is CARBON and SCIN.
> > LAYERS
> > CALL GSPOS('SCN1',1,'ROOT', 0, 0, 31., 0, 'ONLY')
> >
> > !BGO crystals
> > K=0
> > DO I=1, 15
> > K=K+1
> > CALL GSPOS('BGOL', K, 'ROOT', 0, 0,-1.25-(I-1)*5.0, 0, 'ONLY')
> > CALL GSPOS('BGEL', K, 'ROOT', 0, 0,-3.75-(I-1)*5.0, 0, 'ONLY')
> > ENDDO
> > CALL GSDVN('BGOX','BGOL', 2,1) !divide BGOL into two BGOX in the
> > x-axis
> > CALL GSDVN('XBGO','BGOX',20,2)
> > CALL GSDVN('BGOY','BGEL', 2,2) !divide BGEL into two BGOY in the
> > y-axis
> > CALL GSDVN('YBGO','BGOY',20,1)
> >
> > !split the S1,S2,S3,S4,S5 layer along the z-direction
> > CALL GSDVN('S1AB','SCN1', 2, 3)
> >
> > call gpvolu(0)
> >
> > ******* FINISH GEOMETRICAL SETUP
> > CALL GGCLOS

CALL GRFILE(21,"mygeom.rz","ON")
> >
> > END
> >
> > ---
> > PS. I am on linux and ROOT version1.03.
>

---
Thanks a lot!
Jayoung