1 |
mocchiut |
1.1 |
SUBROUTINE CLUSTER |
2 |
|
|
C---------------------------------------------------------------------- |
3 |
|
|
C- |
4 |
|
|
C- Purpose and Methods : IT FINDS THE NUMBER OF |
5 |
|
|
C- CLUSTERS PER LAYER AND PER VIEW AND THE POSITION |
6 |
|
|
C- OF THE CENTRE OF GRAVITY OF THE DETECTED ENERGY . |
7 |
|
|
C- IN THE MATRIX CLUS 2xNPLAxNCHA WE HAVE THE |
8 |
|
|
C- CENTRES IN THE FIRST NCHA/2 ELEMENTS ORDERED FROM |
9 |
|
|
C- THE HIGHEST IN ENERGY TO THE LOWEST . THE SECOND |
10 |
|
|
C- NCHA/2 ELEMENTS ARE THE DETECTED ENERGIES IN |
11 |
|
|
C- THESE CLUSTERS . |
12 |
|
|
C- IN THE MATRIX NCL 2xNPLA WE HAVE THE NUMBER OF |
13 |
|
|
C- CLUSTERS PER LAYER . |
14 |
|
|
C- |
15 |
|
|
C- Inputs : |
16 |
|
|
C- Outputs : |
17 |
|
|
C- Controls: |
18 |
|
|
C- |
19 |
|
|
C- Created 3-FEB-1994 MIRKO BOEZIO |
20 |
|
|
C- Modified 21-FEB-2003 MIRKO BOEZIO . INTRODUCED |
21 |
|
|
C- THE SHIFT IN THE SILICON DETECTORS PLACEMENT |
22 |
|
|
C- FOR THE CALL TO MILLIM IN BARIC . |
23 |
|
|
C- |
24 |
|
|
C----------------------------------------------------- |
25 |
|
|
INCLUDE 'INTEST.TXT' |
26 |
|
|
REAL QQQ(NCHA) |
27 |
|
|
INTEGER I |
28 |
|
|
|
29 |
|
|
COMMON / SHIFT / SHIFT |
30 |
|
|
SAVE / SHIFT / |
31 |
|
|
C |
32 |
|
|
I = 0 |
33 |
|
|
DO J = 1,NPLA |
34 |
|
|
DO N = 1,2 |
35 |
|
|
DO M = 1,NCHA |
36 |
|
|
CLUS(N,J,M) = 0. |
37 |
|
|
ENDDO |
38 |
|
|
NCL(N,J) = 0 |
39 |
|
|
ENDDO |
40 |
|
|
ENDDO |
41 |
|
|
C |
42 |
|
|
DO N = 1,2 |
43 |
|
|
DO J = 1,NPLA |
44 |
|
|
DO M = 1,NCHA |
45 |
|
|
QQQ(M) = 0. |
46 |
|
|
IF (DEXY(N,J,M).GT.EMIN) THEN |
47 |
|
|
QQQ(M) = DEXY(N,J,M) |
48 |
|
|
ENDIF |
49 |
|
|
ENDDO |
50 |
|
|
C |
51 |
|
|
IGIRO = 0. |
52 |
|
|
C |
53 |
|
|
50 CONTINUE |
54 |
|
|
C |
55 |
|
|
C THE FIRST CLUSTER FOR THE LAYER J IS THAT WITH THE |
56 |
|
|
C HIGHEST DETECTED ENERGY . |
57 |
|
|
C |
58 |
|
|
MAX = LVMAX(QQQ,NCHA) |
59 |
|
|
IF (QQQ(MAX).LT.EMIN) GO TO 100 |
60 |
|
|
MSTR = MAX |
61 |
|
|
55 CONTINUE |
62 |
|
|
MSTR = MSTR + 1 |
63 |
|
|
IF (MSTR.GT.NCHA) GO TO 56 |
64 |
|
|
IF (QQQ(MSTR).GT.EMIN) GO TO 55 |
65 |
|
|
56 CONTINUE |
66 |
|
|
IB = MSTR - 1 |
67 |
|
|
C |
68 |
|
|
MSTR = MAX |
69 |
|
|
65 CONTINUE |
70 |
|
|
MSTR = MSTR - 1 |
71 |
|
|
IF (MSTR.LT.1) GO TO 66 |
72 |
|
|
IF (QQQ(MSTR).GT.EMIN) GO TO 65 |
73 |
|
|
66 CONTINUE |
74 |
|
|
IA = MSTR + 1 |
75 |
|
|
C |
76 |
|
|
NN = 0 |
77 |
|
|
IF (M.EQ.2) NN = 1 |
78 |
|
|
IF (MOD(I,2).EQ.NN) THEN |
79 |
|
|
SHIFT = +0.5 |
80 |
|
|
ELSE |
81 |
|
|
SHIFT = -0.5 |
82 |
|
|
ENDIF |
83 |
|
|
CALL BARIC(QQQ,IA,IB,BAR,ENE,IERR1) |
84 |
|
|
IGIRO = IGIRO + 1 |
85 |
|
|
IGI = IGIRO + NCHA / 2 |
86 |
|
|
CLUS(N,J,IGIRO) = BAR |
87 |
|
|
CLUS(N,J,IGI) = ENE |
88 |
|
|
C |
89 |
|
|
DO LL = IA,IB |
90 |
|
|
QQQ(LL) = 0. |
91 |
|
|
ENDDO |
92 |
|
|
GO TO 50 |
93 |
|
|
C |
94 |
|
|
100 CONTINUE |
95 |
|
|
NCL(N,J) = IGIRO |
96 |
|
|
ENDDO |
97 |
|
|
ENDDO |
98 |
|
|
C |
99 |
|
|
RETURN |
100 |
|
|
END |
101 |
|
|
|
102 |
|
|
|