next up previous index
Next: HITS299 JHITS data Up: GEANT Previous: HITS199 The SET

HITS200 Routines to store and retrieve HITS

Routine ID: HITS200
Author(s): Submitted: 01.11.83
Origin: R.Brun, F.Bruyant, W.Gebel, M.MaireRevised: 17.12.93

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

ISET
( INTEGER) set number (see below);
IDET
( INTEGER) detector number;
ITRA
( INTEGER) number of the track producing this hit
NUMBV
( INTEGER) array of volume numbers corresponding to list NAMESV of GSDET;
HITS
( REAL) array of values for current hit elements;
IHIT
( INTEGER) current hit number, if 0 the hit has not been stored.

Stores element values for current hit into the data structure JHITS. The values ISET, IDET and NUMBV can be found in the corresponding variables of common /GCSETS/. These values are set by the routine GFINDS every time that a particle is in a defined detector.

CALL GSCHIT (ISET,IDET,ITRA,NUMBV,HITS,NHSUM,IHIT*) Same action as GSAHIT, but in case the detector identified by ISET, IDET and NUMBV contains already a hit for the same track, the routine will make a cummulative sum for the latest NHSUM elements of JHITS. The other previous elements of JHITS are replaced. That facility is particularly interesting in the case of hits generated into a calorimeter. No packing (i.e. 32 bits per hit element) should be requested for the last NHSUM hits in GSDETH and for these hits ORIG should be set to 0.

CALL GPHITS (CHSET,CHDET)

CHSET
( CHARACTER*4) set name, if '*' prints all JHITS banks of all sets;
CHDET
( CHARACTER*4) detector name, if '*' prints hits in all detectors of set CHSET.
Prints JHITS banks for detector CHDET of set CHSET.

CALL GFHITS (CHSET,CHDET,NVDIM,NHDIM,NHMAX,ITRS,NUMVS, ITRA*,NUMBV*,HITS*,NHITS*)

CHSET
( CHARACTER*4) set name;
CHDET
( CHARACTER*4) detector name;
NVDIM
( INTEGER) 1st dimension of arrays NUMBV and NUMVS: 1 NVDIM NV argument of GSDET;
NHDIM
( INTEGER) 1st dimension of array HITS: 1 NHDIM NH argument of GSDETH;
NHMAX
( INTEGER) maximum number of hits to be returned, this should be not larger than the second dimension of array NUMBV and HITS;
ITRS
( INTEGER) number of the selected track, if ITRS=0, all tracks are taken;
NUMVS
( INTEGER) is a 1-dimension array of NVDIM elements that contains the list of volume numbers which identify the selected detector, 0 is interpreted as 'all valid numbers';
ITRA
( INTEGER) is a 1-dim array of dimension NHMAX that contains on output for each hit the number of the track which has produced it;
NUMBV
( INTEGER) 2-dim array ( NVDIM,NHMAX) that containis on output for each hit the list of volume numbers which identify the detector, all values set to 0 means that no more volumes are stored;
HITS
( REAL) 2-dim array ( NHDIM,NHMAX) that containis NHITS hits;
NHITS
( INTEGER) number of hits returned, in case the total number of hits is greater than NHMAX, NHITS is set to NHMAX+1 and NHMAX hits are returned.

This rotine returns the hits produced by track ITRS (or by any track) in the detector CHDET identified by the list NUMVS belonging to set CHSET.

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

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*)

ISET
( INTEGER) set number;
IDET
( INTEGER) detector number;
NUMBV
( INTEGER) array of numbers which identify uniquely detector number IDET;
NLEV
( INTEGER) number of elements filled of arrays LNAM and LNUM;
LNAM
( INTEGER) array of NLEV volume names stored in ASCII code in integers;
LNUM
( INTEGER) array of NLEV copy numbers.

This routine returns the list of volume names and numbers which identify the complete ancestry in the JVOLUM data structure of the volume corresponding to the detector number IDET in set number ISET and which is identified by the volume numbers NUMBV (see GFHITS).

GFPATH assumes that the detectors have been declared via GSDETV and not GSDET. The main use of GFPATH is to prepare the lists LNAM and LNUM required by the routine GLVOLU to fill the common /GCVOLU/. Once /GCVOLU/ is properly filled, it is possible to use the GEANT routines to transform from the local to the master reference system and so on.

HITS299


next up previous index
Next: HITS299 JHITS data Up: GEANT Previous: HITS199 The SET


Janne Saarela
Mon Apr 3 12:46:29 METDST 1995