Routines to Communicate with the JHITS data structure

+-------------+                                               +----------##
| Geant 3.11  |               GEANT User's Guide              | HITS200  ##
+-------------+                                               +----------##
                                   

Author(s) : R.Brun,F.Bruyant,W.Gebel Submitted: 01.11.83 Origin : R.Brun,W.Gebel,M.Maire Revised: 21.08. 87

   +------------------------------------------------------------------+
   | CALL GSAHIT (ISET,IDET,ITRA,NUMBV,HITS,IHIT*) |
   +------------------------------------------------------------------+
                                  

Stores element values for current hit into the data structure JHITS.

ISET
set number (can be obtained from /GCSETS/ filled by GFINDS)
IDET
detector number (can be obtained from /GCSETS/ filled by GFINDS)
ITRA
track number producing this hit
NUMBV
array of volume numbers corresponding to list NAMESV of GSDET
HITS
array of values for current hit elements
IHIT
on return, current hit number. If =0, hit has not been stored.

+------------------------------------------------------------------------+
| CALL GSCHIT (ISET,IDET,ITRA,NUMBV,HITS,NHSUM,IHIT*) |
+------------------------------------------------------------------------+
                                  
Same action as GSAHIT, but in case the physical volume specified by NUMBV contains already a hit for the same track then the routine will make a cumulative sum for the last NHSUM elements of the hit. That facility is particularly interesting in case one want to store hits generated into a calorimeter.

             +----------------------------------------------+
             | CALL GPHITS (IUSET,IUDET) |
             +----------------------------------------------+
                                  

Prints JHITS banks for detector IUDET of set IUSET.

IUSET
user set identifier if IUSET=0 prints all JHITS banks of all sets
IUDET
user detector identifier if IUDET=0 prints hits in all detectors of set IUSET.

+-----------------------------------------------------------------------------------------------------+
|CALL GFHITS (IUSET,IUDET,NVDIM,NHDIM,NHMAX,ITRS,NUMVS, ITRA*,NUMBV*,HITS*,NHITS*) |
+-----------------------------------------------------------------------------------------------------+
                                  

Returns the hits produced by track ITRS (if 0, by all tracks) in the physical volume specified by the list NUMVS with generic volume name IUDET belonging to set IUSET.

IUSET
user set identifier
IUDET
user detector identifier (name of the corresponding sensitive volume)
NVDIM
lst dimension of arrays NUMBV and NUMVS (<= argument NV of GSDET> = 1)
NHDIM
1st dimension of array HITS (<= argument NH of GSDETH)
NHMAX
maximum number of hits to be returned
ITRS
number of the selected track. If ITRS=0, all tracks are taken
NUMVS
is a 1 Dim array that must contain on input the list of volume numbers which identify the selected detector volume. Number 0 interpreted as 'all valid numbers'
ITRA
is a 1 Dim array that will contain on output for each hit the number of the track which has produced it
NUMBV
2 Dim array that will contain on output for each hit the list of volume numbers which identify each physical volume. Zeroed when no more volumes are stored
HITS
2 Dim array that will contain the NHITS hits
NHITS
returns the number of selected hits. In case the total number of hits is greater than NHMAX, NHITS is set to NHMAX+1 and only NHMAX hits are returned

HITS(1,I)
is the element 1 for hit number I
NUMBV(1,I)
is the volume number 1 for hit number I
ITRA(I)
is the track number corresponding to hit number I

In the calling routine the arrays NUMVS, NUMBV, HITS and ITRA must be dimensioned to:

    NUMVS(NVDIM)
    NUMBV(NVDIM,NHMAX)
    HITS(NHDIM,NHMAX)
    ITRA(NHMAX)

    +----------------------------------------------------------------+
    |CALL GFPATH (ISET,IDET,NUMBV,NLEV,LNAM,LNUM) |
    +----------------------------------------------------------------+
                                  

Returns the list of NLEV volume names (LNAM) and numbers (LNUM) which identify the path through the JVOLUM data structure for the volume corresponding to the detector at position IDET in set at position ISET identified by the list of volume numbers NUMBV (see GFHITS). The routine GFPATH assumes that the sensitive detectors have been declared via the routine GSDETV and not GSDET. GFPATH prepares the lists LNAM and LNUM required by the routine GLVOLU which fills the common /GCVOLU/ .