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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Nov 29 14:20:32 2007 UTC (17 years ago) by mocchiut
Branch: MAIN
Changes since 1.1: +15 -0 lines
Bugs related to plane shifting fixed, added CaloLevel2::nsatstrip variable

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

  ViewVC Help
Powered by ViewVC 1.1.23