SUBROUTINE VER_BHITS ( FULL,SET_ID,N_CAGES,N_CAGE_TYPE, x NHH, NAMESH, NBITSH_V, VORIG, VFACT ) C ============================================================ IMPLICIT NONE C C Description:- C ============= C This subroutine defines the hits structures in the barrel C part of the MVD. It looks in the configuration of the MVD C specified in N_CAGE_TYPE to decide which hits banks need C to be defined. C C Author:- C ======== C JPSullivan C C Creation Date: 14-Sept-2000 based on code previously in VER C =========================== C C Revisions:- C =========== C Date Name Description C ---- ---- ---------------------------------------- C C Arguments:- C =========== CHARACTER*4 FULL ! set before call in gugeom INTEGER NHH ! number of elements per hit CHARACTER*4 SET_ID ! Set identifier INTEGER N_CAGES ! total number of cages to be positioned INTEGER N_CAGE_TYPE(*) ! 0-6 = # Si detectors on cage CHARACTER*4 NAMESH(NHH) ! names of hit elements INTEGER NBITSH_V(NHH) ! #bits per hit element REAL VORIG(NHH) ! origin for each hit element REAL VFACT(NHH) ! factor for each hit element C C Implicit inputs, outputs, side effects:- C ======================================== C C Called by: VER C Calls : GSDET, GSDETH C Side effects: Numerous changes to Geant HITS banks. C C Global Specifications:- C ======================= C include 'g77trigdef.inc' C c include 'gugeom.inc' c include 'gcunit.inc' C c include 'fstore.inc' c include 'sublink.inc' c include 'fpvlink.inc' C C External Specifications:- C ========================= C None C C Local Specifications:- C ====================== C INTEGER IDTYPE ! Detector type INTEGER NV ! Number of volume descriptors INTEGER NBITSV( 3 ) ! # of bits for each volume number INTEGER NWPA ! INTEGER NWSA ! INTEGER ISET ! GEANT set identifier INTEGER IDET ! GEANT det identifier C CHARACTER*4 NAMESV ( 3 ) ! Names for each volume descriptors C C======================================================================== C INTEGER I,J ! Loop index INTEGER NFOUND C C------------------------------------------------------------------------- C DATA NWPA, NWSA/ 1000, 1000 / DATA NBITSV/ 5, 3, 1 / C C------------------------------------------------------------------------- C C Executable Statements:- C ======================= C IF (FULL.EQ.'FULL') THEN ! check volume option C DO I=1,6 !loop over different "types" of C-cage C NFOUND = 0 !count C-cages of this type in the !current setup DO J=1,N_CAGES IF ( N_CAGE_TYPE(J).EQ.I ) NFOUND = NFOUND + 1 END DO C IF ( NFOUND.GT.0 ) THEN NV = 3 WRITE ( NAMESV(1), 100 ) I 100 FORMAT ( 'VCG',I1) WRITE ( NAMESV(2), 110 ) I 110 FORMAT ( 'VSI',I1) WRITE ( NAMESV(3), 120 ) I 120 FORMAT ( 'VAI',I1) C C The hits banks are named after the Si volume used -- C NAMESV(3). C IDTYPE = 3 CALL GSDET (SET_ID,NAMESV(3),NV, & NAMESV , NBITSV, & IDTYPE , NWPA,NWSA,ISET,IDET ) CALL GSDETH(SET_ID,NAMESV(3),NHH, & NAMESH , NBITSH_V,VORIG,VFACT ) C IF ( I.GT.1 ) THEN !I=1 means no outer detector here NV = 3 WRITE ( NAMESV(1), 200 ) I 200 FORMAT ( 'VCG',I1) WRITE ( NAMESV(2), 210 ) I 210 FORMAT ( 'VSO',I1) WRITE ( NAMESV(3), 220 ) I 220 FORMAT ( 'VAO',I1) C C The hits banks are named after the Si volume used -- C NAMESV(3). C IDTYPE = 3 CALL GSDET (SET_ID,NAMESV(3),NV, & NAMESV , NBITSV, & IDTYPE , NWPA,NWSA,ISET,IDET ) CALL GSDETH(SET_ID,NAMESV(3),NHH, & NAMESH , NBITSH_V,VORIG,VFACT ) END IF END IF END DO ENDIF C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C RETURN END