*
* $Id: gphit.F,v 3.7 2006/05/11 00:14:40 cafagna Exp $
*
* $Log: gphit.F,v $
* Revision 3.7  2006/05/11 00:14:40  cafagna
* A bug in hits retrival for calorimeter
*
* Revision 3.6  2006/05/02 11:46:13  pam-ba
* TOF geometry and position updated and a new material, the mylar, added
*
* Revision 3.5  2006/04/09 23:28:34  cafagna
* Several new things, among this: ND and CARD
*
* Revision 3.4  2005/12/20 12:21:03  cafagna
* gpnd directory added along with ND files
*
* Revision 3.3  2005/06/21 02:41:50  cafagna
* Major modification to the geometry and to the random number chain
*
* Revision 3.2  2002/12/04 15:12:54  pamela
* CAS and CALO geometry modified
*
* Revision 3.1.1.1  2002/07/11 16:02:00  cafagna
* First GPAMELA release on CVS
*
*
*               19/09/2002  11.17.29  by  Jens Lund
*CMZ :  2.03/00 06/11/2000  01.11.37  by  Francesco Cafagna
*CMZ :  2.01/00 05/04/2000  14.35.17  by  Marialuigia Ambriola
*CMZ :  2.00/00 03/03/2000  15.39.05  by  Francesco Cafagna
*CMZ :  1.02/00 21/10/99  16.30.25  by  Francesco Cafagna
*CMZ :  1.00/02 15/03/96  16.25.51  by  Francesco Cafagna
*-- Author :    Francesco Cafagna   13/02/96
      SUBROUTINE GPHIT
************************************************************************
*                                                                      *
* HITS definition                                                      *
*                                                                      *
* Called by: UGINIT                                                    *
* Author: Francesco Cafagna, 13/02/96 18.20.10                         *
*                                                                      *
************************************************************************
#include "gphit.inc"
#include "gpsed.inc"
#include "gpkey.inc"
*
* Tof
*
      IF(PTOF) THEN
         CALL GSDETH ('S1  ',CNSED(ISS1,IDS11Y),NHTOF,CHTOF, NBHTOF,
     +   OHTOF,FHTOF)
         CALL GSDETH ('S1  ',CNSED(ISS1,IDS12X),NHTOF,CHTOF, NBHTOF,
     +   OHTOF,FHTOF)
*
         CALL GSDETH ('S2  ',CNSED(ISS2,IDS21X),NHTOF,CHTOF, NBHTOF,
     +   OHTOF,FHTOF)
         CALL GSDETH ('S2  ',CNSED(ISS2,IDS22Y),NHTOF,CHTOF, NBHTOF,
     +   OHTOF,FHTOF)
*
         CALL GSDETH ('S3  ',CNSED(ISS3,IDS31Y),NHTOF,CHTOF, NBHTOF,
     +   OHTOF,FHTOF)
         CALL GSDETH ('S3  ',CNSED(ISS3,IDS32X),NHTOF,CHTOF, NBHTOF,
     +   OHTOF,FHTOF)
*
         CALL GSDETH ('S4  ',CNSED(ISS4,IDS4),NHTOF,CHTOF, NBHTOF,
     +   OHTOF,FHTOF)
      ENDIF
*
* TRD
*
      IF(PTRD) THEN
         CALL GSDETH ('TRD ',CNSED(ISTRD,IDTRSO),NHTRD,CHTRD,NBHTRD,
     +   OHTRD,FHTRD)
      ENDIF
*
* CAT
*
      IF(PCAT) THEN
*JeL:
         CALL GSDETH ('CAT ',CNSED(ISCAT,IDCATL),NHCAT,CHCAT, NBHCAT,
     +   OHCAT,FHCAT)
C         CALL GSDETH ('CAT ',CNSED(ISCAT,IDCATT),NHCAT,CHCAT, NBHCAT,
C     +   OHCAT,FHCAT)
*END: JeL.
      ENDIF
*
* CAS
*
      IF(PCAS) THEN
*JeL:
         CALL GSDETH ('CAS ',CNSED(ISCAS,IDCASX),NHCAS,CHCAS,NBHCAS,
     +   OHCAS,FHCAS)
C         CALL GSDETH ('CAS ',CNSED(ISCAS,IDCASY),NHCAS,CHCAS,NBHCAS,
C     +   OHCAS,FHCAS)
*END: JeL.
      ENDIF
*
* SPE
*
      IF(PSPE) CALL GSDETH ('SPE ',CNSED(ISSPE,IDTSPA),
     +             NHSPE,CHSPE,NBHSPE,OHSPE,FHSPE)
*
* CAL
*
      IF(PCAL) THEN
         CALL GSDETH ('CAL ',CNSED(ISCAL,IDCASI),
     +                NHCALI,CHCALI,NBHCALI,OHCALI,FHCALI)
         CALL GSDETH ('CAL ',CNSED(ISCAL,IDCAST),
     +                NHCAL,CHCAL,NBHCAL,OHCAL,FHCAL)
      ENDIF
*
* ND
*
      IF(PND) CALL GSDETH ('ND  ',CNSED(ISND,IDNDTI),
     +             NHND,CHND,NBHND,OHND,FHND)
*
* CARD
*
      IF(PCARD) THEN
         CALL GSDETH ('CARD',CNSED(ISCARD,IDCAR1),NHCARD,
     +        CHCARD,NBHCARD,OHCARD,FHCARD)
         CALL GSDETH ('CARD',CNSED(ISCARD,IDCAR2),NHCARD,
     +        CHCARD,NBHCARD,OHCARD,FHCARD)
      ENDIF
*
* User action
*
      CALL GPUHIT
*
      RETURN
      END
