]> git.uio.no Git - u/mrichter/AliRoot.git/blob - GEANT321/ghits/gsdetu.F
This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / GEANT321 / ghits / gsdetu.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1995/10/24 10:21:12  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 GSDETU(IUSET,IUDET,NUPAR,UPAR)
13 C.
14 C.    ******************************************************************
15 C.    *                                                                *
16 C.    *      Storing and Retrieving User Detector parameters           *
17 C.    *      -----------------------------------------------           *
18 C.    *                                                                *
19 C.    *   Stores user parameters for detector IUDET of set IUSET.      *
20 C.    * IUSET     user set identifier                                  *
21 C.    * IUDET     user detector identifier                             *
22 C.    * NUPAR     number of user parameters                            *
23 C.    * UPAR      array of NUPAR user floating point parameters.       *
24 C.    *   The  routine  is  used at  initialisation  time  once  the   *
25 C.    * geometrical volumes have been defined.                         *
26 C.    *                                                                *
27 C.    *                                                                *
28 C.    *       JS = LQ(JSET-ISET)                                       *
29 C.    *       JD = LQ(JS-IDET)                                         *
30 C.    *       JDU= LQ(JD-1)                                            *
31 C.    *       Q(JDU+1) = UPAR(1)  1st user parameter,etc               *
32 C.    *                                                                *
33 C.    *    ==>Called by : <USER>, UGEOM                                *
34 C.    *       Author    R.Brun  *********                              *
35 C.    *                                                                *
36 C.    ******************************************************************
37 C.
38 #include "geant321/gcbank.inc"
39 #include "geant321/gcunit.inc"
40       DIMENSION UPAR(1)
41       CHARACTER*4 IUSET,IUDET
42 C.
43 C.    ------------------------------------------------------------------
44 C.
45       IF(JSET.LE.0)GO TO 90
46       NSET=IQ(JSET-1)
47       IF(NSET.LE.0)GO TO 90
48       CALL GLOOK(IUSET,IQ(JSET+1),NSET,ISET)
49       IF(ISET.LE.0)GO TO 90
50       JS=LQ(JSET-ISET)
51       NDET=IQ(JS-1)
52       IF(NDET.LE.0)GO TO 90
53       CALL GLOOK(IUDET,IQ(JS+1),NDET,IDET)
54       IF(IDET.LE.0)GO TO 90
55       JD=LQ(JS-IDET)
56 C
57       IF(NUPAR.LE.0)GO TO 90
58       CALL MZBOOK(IXCONS,JDU,JD,-3,'SJDU',0,0,NUPAR,3,0)
59 C
60       CALL UCOPY(UPAR,Q(JDU+1),NUPAR)
61       GO TO 99
62 C
63 C              Error
64 C
65   90  WRITE(CHMAIL,1000)IUSET,IUDET
66       CALL GMAIL(0,0)
67  1000 FORMAT(' ***** GSDETU ERROR FOR SET ',A4,' OR DETECTOR ',A4)
68 C
69   99  RETURN
70       END