/[PAMELA software]/DarthVader/CalorimeterLevel2/src/cluster4.for
ViewVC logotype

Contents of /DarthVader/CalorimeterLevel2/src/cluster4.for

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Thu Jan 16 15:29:13 2014 UTC (10 years, 10 months ago) by mocchiut
Branch: MAIN
CVS Tags: v10REDr01, v10RED, HEAD
Changes since 1.2: +1 -1 lines
Compilation warnings using GCC4.7 fixed

1 C
2 C----------------------------------------------------------------------
3 SUBROUTINE CLUSTER4
4 C----------------------------------------------------------------------
5 C-
6 C- Purpose and Methods : IT WORKS AS CLUSTER BUT USING TWO PARTS OF THE
7 C- CALORIMETER (LAYERS 1 - 4 AND LAYERS 5 - 8) INSTEAD OF THE 8
8 C- LAYERS .
9 C-
10 C- Created 25-FEB-1995 MIRKO BOEZIO
11 C- Modified 30-MAR-1995 MIRKO BOEZIO . CORRECTED AN ERROR IN THE
12 C- DEFINITION OF THE TWO PARTS , OTHERWISE IT WAS LAYERS 1 - 5 AND
13 C- LAYERS 6 - 8 .
14 C-
15 C----------------------------------------------------------------------
16 INCLUDE 'INTEST.TXT'
17
18 REAL QQQ(NCHA)
19 COMMON / SHIFT / SHIFT
20 SAVE / SHIFT /
21 C
22 DO J = 1,4
23 DO N = 1,2
24 DO M = 1,NCHA
25 CLUS4(N,J,M) = 0.
26 ENDDO
27 NCL4(N,J) = 0
28 ENDDO
29 ENDDO
30 C
31 LPIANO = NPLA / 2
32 C
33 DO N = 1,2
34 DO J = 1,4
35 DO M = 1,NCHA
36 QQQ(M) = 0.
37 DO L = 1,NPLA
38 NLK = (M - 1) * NPLA + L
39 EN = DEXY(N,L,M)
40 IF (EN.GT.EMIN.AND.J.EQ.1.AND.L.LE.(LPIANO-6)) THEN
41 QQQ(M) = QQQ(M) + EN
42 ENDIF
43 IF (EN.GT.EMIN.AND.J.EQ.2.AND.L.GT.(LPIANO-6).AND.L.LE.
44 + LPIANO) THEN
45 QQQ(M) = QQQ(M) + EN
46 ENDIF
47 IF (EN.GT.EMIN.AND.J.EQ.3.AND.L.GT.LPIANO.AND.L.LE.
48 + (LPIANO+6)) THEN
49 QQQ(M) = QQQ(M) + EN
50 ENDIF
51 IF (EN.GT.EMIN.AND.J.EQ.4.AND.L.GT.(LPIANO+6)) THEN
52 QQQ(M) = QQQ(M) + EN
53 ENDIF
54 ENDDO
55 ENDDO
56 C
57 IGIRO = 0
58 C
59 50 CONTINUE
60 MAX = LVMAX(QQQ,NCHA)
61 IF (QQQ(MAX).LT.EMIN) GO TO 100
62 MSTR = MAX
63 55 CONTINUE
64 MSTR = MSTR + 1
65 IF (MSTR.GT.NCHA) GO TO 56
66 IF (QQQ(MSTR).GT.EMIN) GO TO 55
67 56 CONTINUE
68 IB = MSTR - 1
69 C
70 MSTR = MAX
71 65 CONTINUE
72 MSTR = MSTR - 1
73 IF (MSTR.LT.1) GO TO 66
74 IF (QQQ(MSTR).GT.EMIN) GO TO 65
75 66 CONTINUE
76 IA = MSTR + 1
77 C
78 NN = 0
79 c IF (M.EQ.2) NN = 1
80 c IF (MOD(I,2).EQ.NN) THEN
81 IF (MOD(J,2).EQ.NN) THEN
82 IF (REVERSE.EQ.0) THEN
83 SHIFT = -0.5
84 ELSE
85 SHIFT = +0.5
86 ENDIF
87 ELSE
88 IF (REVERSE.EQ.0) THEN
89 SHIFT = +0.5
90 ELSE
91 SHIFT = -0.5
92 ENDIF
93 ENDIF
94 CALL BARIC(QQQ,IA,IB,BAR,ENE,IERR1)
95 IGIRO = IGIRO + 1
96 IGI = IGIRO + NCHA / 2
97 CLUS4(N,J,IGIRO) = BAR
98 CLUS4(N,J,IGI) = ENE
99 C
100 DO LL = IA,IB
101 QQQ(LL) = 0.
102 ENDDO
103 GO TO 50
104 C
105 100 CONTINUE
106 NCL4(N,J) = IGIRO
107 ENDDO
108 ENDDO
109 C
110 RETURN
111 END

  ViewVC Help
Powered by ViewVC 1.1.23