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

Contents of /gpamela/gpcard/gpdcard.F

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sun Apr 9 23:28:48 2006 UTC (18 years, 7 months ago) by cafagna
Branch: MAIN
CVS Tags: v4r4
Several new things, among this: ND and CARD

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
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 DO ID=IDCAR1,IDCAR2
44 *
45 * Check on the volume level
46 *
47 IF (NV.GT.NVM) THEN
48 WRITE(CHMAIL,10000) CSET,CNSED(IS,ID),NVOL,NVMAX,
49 + IDRUN,IDEVT
50 CALL GMAIL(1,0)
51 GO TO 10
52 ENDIF
53 CALL VZERO(VHITS,NH*NHM)
54 CALL VZERO(ITRA ,NHM)
55 CALL VZERO(NUMBV,NVOL*NHM)
56 NHITS = -1
57 CALL GPRHIT(CSET,CNSED(IS,ID),IS,ID,NVOL,NH,NHM,1,
58 + IT,NUMD,ITRA,NUMBV,VHITS,NHITS)
59 *
60 * If there was a problem in GPRHIT then exit
61 *
62 IF(NHITS.LT.0) THEN
63 WRITE(CHMAIL,10100) CSET,CNSED(IS,ID),NHITS,NHM,
64 + IDRUN,IDEVT
65 CALL GMAIL(1,0)
66 GO TO 10
67 ENDIF
68 *
69 * >>>>>>>>>>>>>>>>>>>>>> DIGI action
70 *
71 *
72 * Fill the CWN common
73 *
74 NTHCARD = NTHCARD + NHITS
75 DO I=1,NHITS
76 ICARD(I) = NUMBV(1,I) + 2*(ID-1)
77 #if defined(GPAMELA_INTER)
78 XINCARD(I) = 2*VHITS(1,I)-VHITS(4,I)
79 YINCARD(I) = 2*VHITS(2,I)-VHITS(5,I)
80 ZINCARD(I) = 2*VHITS(3,I)-VHITS(6,I)
81 #endif
82 #if !defined(GPAMELA_INTER)
83 XINCARD(I) = VHITS(1,I)
84 YINCARD(I) = VHITS(2,I)
85 ZINCARD(I) = VHITS(3,I)
86 #endif
87 XOUTCARD(I) = VHITS(4,I)
88 YOUTCARD(I) = VHITS(5,I)
89 ZOUTCARD(I) = VHITS(6,I)
90 ERELCARD(I) = VHITS(7,I)
91 TIMECARD(I)= VHITS(8,I)
92 PATHCARD(I) = VHITS(9,I)
93 IPARCARD(I) = VHITS(10,I)
94 P0CARD(I) = VHITS(11,I)
95 ENDDO
96 ENDDO
97 10000 FORMAT(' GPDCARD: VOLUME level too big: SET=',A4,', DET=',A4,',
98 + NVOL=',I3,', NVMAX=',I3,', RUN=',I5,', EVT=',I8)
99 10100 FORMAT(' GPDCARD: Error in GPRHIT: SET=',A4,
100 + ', DET=',A4,',NHITS=',I5,', NHMAX=',I5,
101 + ', RUN=',I5,', EVT=',I8)
102 10200 FORMAT(' GPDCARD: Error in GPRHIT: SET=',A4,
103 + ', DET=',A4,',NHITS=',I5,', NHMAX=',I5,
104 + ', RUN=',I5,', EVT=',I8)
105 10 RETURN
106 END
107

  ViewVC Help
Powered by ViewVC 1.1.23