]> git.uio.no Git - u/mrichter/AliRoot.git/blame - GEANT321/ghits/gfdeth.F
Bugfix in AliPoints2Memory
[u/mrichter/AliRoot.git] / GEANT321 / ghits / gfdeth.F
CommitLineData
fe4da5cc 1*
2* $Id$
3*
4* $Log$
5* Revision 1.1.1.1 1995/10/24 10:21:09 cernlib
6* Geant
7*
8*
9#include "geant321/pilot.h"
10*CMZ : 3.21/02 29/03/94 15.41.20 by S.Giani
11*-- Author :
12 SUBROUTINE GFDETH(IUSET,IUDET,NH,NAMESH,NBITSH,ORIG,FACT)
13C.
14C. ******************************************************************
15C. * *
16C. * Returns hit parameters for detector IUDET of set IUSET. *
17C. * *
18C. * Input parameters *
19C. * IUSET user set identifier *
20C. * IUDET user detector identifier *
21C. * *
22C. * Output parameters *
23C. * NH number of elements per hit *
24C. * NAMESH the NH variable names for the hit elements *
25C. * NBITSH the NH bit numbers for packing the variable values *
26C. * ORIG The quantity packed in the structure JHITS for the *
27C. * Ith variable is a positive integer with NBITSH(I) *
28C. * bits and such that *
29C. * FACT IVAR(I) = (VAR(I)+ORIG(I))*FACT(I) *
30C. * *
31C. * ==>Called by : <USER> *
32C. * Author R.Brun ,M.Maire ********* *
33C. * *
34C. ******************************************************************
35C.
36#include "geant321/gcbank.inc"
37#include "geant321/gcunit.inc"
38 DIMENSION NBITSH(1),ORIG(1),FACT(1)
39 CHARACTER*4 IUSET,IUDET,NAMESH(1)
40C.
41C. ------------------------------------------------------------------
42C.
43 IF(JSET.LE.0)GO TO 90
44 NSET=IQ(JSET-1)
45 IF(NSET.LE.0)GO TO 90
46 CALL GLOOK(IUSET,IQ(JSET+1),NSET,ISET)
47 IF(ISET.LE.0)GO TO 90
48 JS=LQ(JSET-ISET)
49 NDET=IQ(JS-1)
50 IF(NDET.LE.0)GO TO 90
51 CALL GLOOK(IUDET,IQ(JS+1),NDET,IDET)
52 IF(IDET.LE.0)GO TO 95
53 JD=LQ(JS-IDET)
54 JDH=LQ(JD-1)
55 NH=IQ(JD+4)
56C
57 IF(NH.GT.0)THEN
58 DO 10 I=1,NH
59 CALL UHTOC(IQ(JDH+4*I-3),4,NAMESH(I),4)
60 NBITSH(I)=IQ(JDH+4*I-2)
61 ORIG(I) = Q(JDH+4*I-1)
62 FACT(I) = Q(JDH+4*I )
63 10 CONTINUE
64 ENDIF
65 GO TO 99
66C
67C Error
68C
69 90 WRITE (CHMAIL, 1000) IUSET
70 CALL GMAIL(0,0)
71 1000 FORMAT (' ***** GFDETH ERROR SET ',A4,' NOT FOUND')
72 GO TO 99
73 95 WRITE (CHMAIL, 2000) IUSET,IUDET
74 CALL GMAIL(0,0)
75 2000 FORMAT (' ***** GFDETH ERROR FOR SET ',A4,
76 + ' DETECTOR ',A4,' NOT FOUND')
77C
78 99 RETURN
79 END