/[PAMELA software]/gpamela/gpcard/gpdcard.F
ViewVC logotype

Contents of /gpamela/gpcard/gpdcard.F

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Mon Apr 10 17:15:57 2006 UTC (18 years, 7 months ago) by bruno
Branch: MAIN
CVS Tags: v4r6, v4r7, v4r8, v4r9, v4r14, v4r12, v4r13, v4r10, v4r11, HEAD
Changes since 1.1: +18 -16 lines
Error occurred while calculating annotation data.
Few modification to the hit retrival, MAX hit for CARD updated

1 SUBROUTINE GPDCARD
2 ************************************************************************
3 * *
4 * To perform CARD digitization *
5 * *
6 * Called by: GUDIGI *
7 * Author: Francesco Cafagna, 23/02/96 12.50.38 *
8 * *
9 ************************************************************************
10 #include "gcunit.inc"
11 #include "gpphit.inc"
12 PARAMETER (NH=NHCARD,NHM=NHMCARD,NVOL=2)
13 #include "gprhit.inc"
14 #include "gpcard.inc"
15 #include "gpsed.inc"
16 *
17 INTEGER IS,ID,NV,NVM,INDEX
18 CHARACTER*4 CSET
19 *
20 *
21 * Vector zeroed
22 *
23 CALL VZERO(ICARD,NHM)
24 CALL VZERO(XCARD,NHM)
25 CALL VZERO(YCARD,NHM)
26 CALL VZERO(ZCARD,NHM)
27 CALL VZERO(XOCARD,NHM)
28 CALL VZERO(YOCARD,NHM)
29 CALL VZERO(ZOCARD,NHM)
30 CALL VZERO(ERCARD,NHM)
31 CALL VZERO(TIMECARD,NHM)
32 CALL VZERO(PATHCARD,NHM)
33 CALL VZERO(P0CARD,NHM)
34 CALL VZERO(ICARDPAR,NHM)
35 CALL VZERO(NUMD ,NVOL)
36 *
37 NV = NVOL
38 NVM= NVMAX
39 IS = ISCARD
40 CSET = 'CARD'
41 IT = -1
42 NTHCARD = 0
43 INDEX = 0
44 DO ID=IDCAR1,IDCAR2
45 *
46 * Check on the volume level
47 *
48 IF (NV.GT.NVM) THEN
49 WRITE(CHMAIL,10000) CSET,CNSED(IS,ID),NVOL,NVMAX,
50 + IDRUN,IDEVT
51 CALL GMAIL(1,0)
52 GO TO 10
53 ENDIF
54 CALL VZERO(VHITS,NH*NHM)
55 CALL VZERO(ITRA ,NHM)
56 CALL VZERO(NUMBV,NVOL*NHM)
57 NHITS = -1
58 CALL GPRHIT(CSET,CNSED(IS,ID),IS,ID,NVOL,NH,NHM,1,
59 + IT,NUMD,ITRA,NUMBV,VHITS,NHITS)
60 *
61 * If there was a problem in GPRHIT then exit
62 *
63 IF(NHITS.LT.0) THEN
64 WRITE(CHMAIL,10100) CSET,CNSED(IS,ID),NHITS,NHM,
65 + IDRUN,IDEVT
66 CALL GMAIL(1,0)
67 GO TO 10
68 ENDIF
69 *
70 * >>>>>>>>>>>>>>>>>>>>>> DIGI action
71 *
72 *
73 * Fill the CWN common
74 *
75 NTHCARD = NTHCARD + NHITS
76 DO I=1,NHITS
77 INDEX=INDEX+1
78 ICARD(INDEX) = NUMBV(1,I) + 2*(ID-1)
79 #if defined(GPAMELA_INTER)
80 XINCARD(INDEX) = 2*VHITS(1,I)-VHITS(4,I)
81 YINCARD(INDEX) = 2*VHITS(2,I)-VHITS(5,I)
82 ZINCARD(INDEX) = 2*VHITS(3,I)-VHITS(6,I)
83 #endif
84 #if !defined(GPAMELA_INTER)
85 XINCARD(INDEX) = VHITS(1,I)
86 YINCARD(INDEX) = VHITS(2,I)
87 ZINCARD(INDEX) = VHITS(3,I)
88 #endif
89 XOUTCARD(INDEX) = VHITS(4,I)
90 YOUTCARD(INDEX) = VHITS(5,I)
91 ZOUTCARD(INDEX) = VHITS(6,I)
92 ERELCARD(INDEX) = VHITS(7,I)
93 TIMECARD(INDEX)= VHITS(8,I)
94 PATHCARD(INDEX) = VHITS(9,I)
95 IPARCARD(INDEX) = VHITS(10,I)
96 P0CARD(INDEX) = VHITS(11,I)
97 ENDDO
98 ENDDO
99 10000 FORMAT(' GPDCARD: VOLUME level too big: SET=',A4,', DET=',A4,',
100 + NVOL=',I3,', NVMAX=',I3,', RUN=',I5,', EVT=',I8)
101 10100 FORMAT(' GPDCARD: Error in GPRHIT: SET=',A4,
102 + ', DET=',A4,',NHITS=',I5,', NHMAX=',I5,
103 + ', RUN=',I5,', EVT=',I8)
104 10200 FORMAT(' GPDCARD: Error in GPRHIT: SET=',A4,
105 + ', DET=',A4,',NHITS=',I5,', NHMAX=',I5,
106 + ', RUN=',I5,', EVT=',I8)
107 10 RETURN
108 END
109

  ViewVC Help
Powered by ViewVC 1.1.23