/[PAMELA software]/gpamela/gpcal/gpdcal.F
ViewVC logotype

Annotation of /gpamela/gpcal/gpdcal.F

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3.1.1.1 - (hide annotations) (download) (vendor branch)
Thu Jul 11 16:02:14 2002 UTC (22 years, 4 months ago) by cafagna
Branch: v3r0
CVS Tags: firstrelease, v3r3, v3r1, v3r2
Changes since 3.1: +0 -0 lines
First GPAMELA release on CVS

1 cafagna 3.1 *
2     * $Id$
3     *
4     * $Log$
5     *
6     *CMZ : 2.03/00 31/10/2000 11.18.51 by Francesco Cafagna
7     *CMZ : 2.02/00 10/10/2000 14.09.00 by Francesco Cafagna
8     *CMZ : 2.01/00 05/04/2000 14.35.18 by Marialuigia Ambriola
9     *CMZ : 2.00/00 29/02/2000 17.39.10 by Francesco Cafagna
10     *CMZ : 1.02/00 10/02/2000 17.28.08 by Francesco Cafagna
11     *CMZ : 1.01/00 21/05/96 17.33.38 by Francesco Cafagna
12     *CMZ : 1.00/02 05/04/96 11.26.03 by Francesco Cafagna
13     *-- Author : Francesco Cafagna 23/02/96
14     SUBROUTINE GPDCAL
15     ************************************************************************
16     * *
17     * To perform CAL digitization *
18     * *
19     * Called by: GUDIGI *
20     * Author: Francesco Cafagna, 23/02/96 12.50.38 *
21     * *
22     ************************************************************************
23     #include "gcunit.inc"
24     #include "gpphit.inc"
25     PARAMETER (NH=NHCAL,NHM=NHMCAL,NVOL=3,NVOL1=2)
26     #include "gprhit.inc"
27     #include "gpcal.inc"
28     #include "gpsed.inc"
29     #include "gpkey.inc"
30     #include "gpgeo.inc"
31     *
32     INTEGER IS,ID,NV,NVM,NNHM
33     CHARACTER*4 CSET
34     INTEGER NUMD1(NVOL1),NUMBV1(NVOL1,NHM)
35     *
36     * Vector zeroed
37     *
38     CALL VZERO(ICAPL ,NHMCAL)
39     CALL VZERO(ICASI ,NHMCAL)
40     CALL VZERO(ICAST ,NHMCAL)
41     CALL VZERO(XCASI,NHMCAL)
42     CALL VZERO(YCASI,NHMCAL)
43     CALL VZERO(ZCASI,NHMCAL)
44     CALL VZERO(IPARCAL,NHMCAL)
45     CALL VZERO(ERCASI,NHMCAL)
46     CALL VZERO(NUMD ,NVOL)
47     CALL VZERO(NUMD1 ,NVOL1)
48     *
49     NV = NVOL
50     NVM= NVMAX
51     NTHCAL = 0
52     *
53     * The tungsten plane case
54     *
55     IS = ISCAL
56     ID = IDCASI
57     IT = -1
58     CSET = 'CAL '
59     *
60     * Check on the volume level
61     *
62     IF (NV.GT.NVM) THEN
63     WRITE(CHMAIL,10000) CSET,CNSED(IS,ID),NVOL,NVMAX,
64     + IDRUN,IDEVT
65     CALL GMAIL(1,0)
66     GO TO 10
67     ENDIF
68     CALL VZERO(VHITS,NH*NHM)
69     CALL VZERO(ITRA ,NHM)
70     NHITS = -1
71     *
72     * Update the max number of hits to be retrived
73     *
74     NNHM = NHM
75     IF(NNHM.LE.0) THEN
76     WRITE(CHMAIL,10100) CSET,CNSED(IS,ID),NTHCAL,NHM,
77     + IDRUN,IDEVT
78     CALL GMAIL(1,0)
79     GO TO 10
80     ENDIF
81     CALL VZERO(NUMBV,NVOL*NHM)
82     CALL GPRHIT(CSET,CNSED(IS,ID),IS,ID,NVOL,NH,NNHM,1,
83     + IT,NUMD,ITRA,NUMBV,VHITS,NHITS)
84     *
85     * If there was a problem in GPRHIT then exit
86     *
87     IF(NHITS.LT.0) THEN
88     WRITE(CHMAIL,10200) CSET,CNSED(IS,ID),NHITS,NHM,
89     + IDRUN,IDEVT
90     CALL GMAIL(1,0)
91     GO TO 10
92     ENDIF
93     *
94     * >>>>>>>>>>>>>>>>>>>>>> DIGI action
95     *
96     *
97     * Fill the CWN common
98     *
99     DO I=1,NHITS
100     NTHCAL = NTHCAL + 1
101     ICAPL(NTHCAL) = NUMBV((NVCAL-2),I)
102     ICASI(NTHCAL) = NUMBV((NVCAL-1),I)
103     ICAST(NTHCAL) = NUMBV((NVCAL),I)
104     XINCAL(NTHCAL) = VHITS(1,I)
105     YINCAL(NTHCAL) = VHITS(2,I)
106     ZINCAL(NTHCAL) = VHITS(3,I)
107     ERELCAL(NTHCAL) = VHITS(4,I)
108     c IPARCAL(NTHCAL) = VHITS(5,I)
109     c P0CAL(NTHCAL) = VHITS(6,I)
110     ENDDO
111     10000 FORMAT(' GPDCAL: VOLUME level too big: SET=',A4,', DET=',A4,',
112     + NVOL=',I3,', NVMAX=',I3,', RUN=',I5,', EVT=',I8)
113     10100 FORMAT(' GPDCAL: MAX number of hits retrived: SET=',A4,
114     + ', DET=',A4,',NHREAD=',I5,', NHMAX=',I5,
115     + ', RUN=',I5,', EVT=',I8)
116     10200 FORMAT(' GPDCAL: Error in GPRHIT: SET=',A4,
117     + ', DET=',A4,',NHITS=',I5,', NHMAX=',I5,
118     + ', RUN=',I5,', EVT=',I8)
119     10 RETURN
120     END

  ViewVC Help
Powered by ViewVC 1.1.23