Re: ZEBRA to root tree conversion

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Jun 03 1999 - 08:35:13 MEST


Hi Tarun,
No, gh2root is not a general conversion program from Zebra to a Root
Tree !!
The title of the URL says:
    gh2root: Geant kinematics/hits/digits to ROOT conversion tool
                 Abstract
A tool to automatically generate the C++ code for a Geant3 based
application. The classes generated include code to read Geant3 data
(Kine, Hits,Digi) stored in Zebra files or equivalent and to convert
this data into a ROOT Tree. 

The input to gh2root can be a Geant3/RZ file containing the detector
definition data structures generated at initialisation time of Geant or
a Zebra/FZ file with these data structures. 

In your case, looking at the output, I guess that your FZ file does not
contain the Geant initialisation structures JVOLUM, JMATE, JTMED, JSET,
JDET.
You can generate a Zebra/RZ file with these data structures if you run
the interactive version of Geant and type the following command
   Geant > rz/file 21 phenix.geom on
Then, you will do:
   gh2root phenix.geom PH

As I already reported to you in a previous mail, the C++ code generated
to read a ZEBRA FZ file assumes that the FZ file was produced by the
standard Geant3 routines GFOUT, etc. It is my experience that many
people
organize themselves the FZ file. You may have to modify the logic
invoking the FZIN routine accordingly. Please check with the Phenix
experts who have implemented this logic (I guess C. Maguire).

Rene Brun

Tarun Kanti Ghosh wrote:
> 
> Dear Rene,
>           According to your root page I have compiled
> gh2root.f in linux machine and then I have given the following
> command to convert Zebra FZ file to root class:
> 
> gh2root geantfile.geom X 900
> 
> As a result, the executable gh2root is running and at the end
> it gave the follwing messege:
> 
> "
> FZIN.    LUN=   3 End of Run        0
> i=  0 quest(1)= 2 nuhead=  0 head1=**** head2=**** head3=END2
>   file:XRun.h has been generated
>   file:XMaker.cxx has been generated
>   jset=           0
>  GEANT file: geantfile.geom converted to ROOT classes: Xxxx"
> 
> It has also created LinkDef.h and Make-macros but there are zero bytes
> in those files as
> -rw-r--r--   1 tghosh   rhphenix        0 Jun  1 16:23 LinkDef.h
> -rw-r--r--   1 tghosh   rhphenix     6553 Jun  2 23:48 XMaker.cxx
> -rw-r--r--   1 tghosh   rhphenix     2278 Jun  2 23:48 XRun.h
> -rw-r--r--   1 tghosh   rhphenix        0 Jun  1 16:23 Make-macros
> 
> but I do not see that it has made any  XsetdetMaker.h and cxx and
> also it did not make any root macros as in the documentation
> you said : "
> *  Some Root macros are also generated by gh2root:
> *    - fake.C    : to generate random particles and hits.
> *    - run.C     : to convert a Geant FZ file into Root.
> *    - browse.C  : to browse a Root file with hits.
> *    - analyze.C : example of analysis code to loop on
> *                  generated events and make histograms."
> 
> So could you please suggest me what is going wrong here or do I need
> to change anywhere inside gh2root.f? although I assume that gh2root is
> a general program for any FZ file to convert it into root tree!
> 
>                                                             best regards,
>                                                                      Tarun



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