1 |
mocchiut |
1.1 |
SUBROUTINE NUCLEI(RPIANO,NPIANI,QQQQ,NTOT,INDICE) |
2 |
|
|
C---------------------------------------------------------------------- |
3 |
|
|
C- |
4 |
|
|
C- Purpose and Methods : IT FINDS THE NUMBER OF LAYERS (RPIANO) IN WHICH |
5 |
|
|
C- THERE IS A DETECTED ENERGY BETWEEN EINF AND ESUP . FOR EXAMPLE IF |
6 |
|
|
C- EINF = 2.5 mip AND ESUP = 10 mip WE INDENTIFY PARTICLE WITH A |
7 |
|
|
C- CHARACTERISTIC AS ALPHA AT MINIMUM . |
8 |
|
|
C- QQQQ IS THE TRUNCATED MEAN OF THE DETECTED ENERGY OF THE BARICENTRA OF THE |
9 |
|
|
C- DEFINED LAYERS . |
10 |
|
|
C- NTOT GIVES THE NUMBER OF LAYERS WITH DETECTED ENERGY ALONG THE TRACK |
11 |
|
|
C- DEFINED BY THE TRACKING SYSTEM . WE SAY THAT IS ALONG THE TRACK IF THE |
12 |
|
|
C- CLUSTER IS INSIDE A RADIUS OF 4 STRIPS BY THE POSITION DEFINED BY THE |
13 |
|
|
C- TRACKING SYSTEM . |
14 |
|
|
C- INDICE IS THE NUMBER OF CLUSTERS BESIDES THAT ALONG THE TRACK THAT ARE |
15 |
|
|
C- MORE THAN 4 STRIPS FAR AWAY BY THE TRACK . |
16 |
|
|
C- |
17 |
|
|
C- Inputs : NPIANI |
18 |
|
|
C- Outputs : RPIANO,QQQQ,NTOT,INDICE |
19 |
|
|
C- Controls: |
20 |
|
|
C- |
21 |
|
|
C- Created 9-FEB-1994 MIRKO BOEZIO |
22 |
|
|
C- Modified 28-APR-1994 MIRKO BOEZIO . IF ISTRISCIA IS NEGATIVE AND GREATER |
23 |
|
|
C- THAN NX THAN NN IS EQUAL 1 . |
24 |
|
|
C- Modified 8-JUL-1994 MIRKO BOEZIO . CORRECTED AN ERROR ON THE DEFINITION |
25 |
|
|
C- OF ISTRISCIA . |
26 |
|
|
C- Modified 14-DEC-1994 MIRKO BOEZIO . THE TRACK IS DEFINED BY THE |
27 |
|
|
C- TRACKING SYSTEM THROUGH IBAR AND BAR . |
28 |
|
|
C- |
29 |
|
|
C---------------------------------------------------------------------- |
30 |
|
|
INCLUDE 'INTEST.TXT' |
31 |
|
|
C |
32 |
|
|
REAL LUNGH |
33 |
|
|
REAL RPIANO(2) |
34 |
|
|
REAL BAR(2,NPLA) |
35 |
|
|
REAL NQQ(2*NPLA) |
36 |
|
|
REAL RIL(NCHA/2) |
37 |
|
|
REAL REL(NCHA/2) |
38 |
|
|
REAL TG(2) |
39 |
|
|
INTEGER IBAR(2,NPLA) |
40 |
|
|
INTEGER NTOT(2),LH |
41 |
|
|
COMMON / ANGOLO / BAR, IBAR |
42 |
|
|
SAVE / ANGOLO / |
43 |
|
|
COMMON / DOVE / NX, NY, LUNGH |
44 |
|
|
SAVE / DOVE / |
45 |
|
|
COMMON / TAGLIOEN / EINF, ESUP, ENER(2) |
46 |
|
|
SAVE / TAGLIOEN / |
47 |
|
|
COMMON / SHIFT / SHIFT |
48 |
|
|
SAVE / SHIFT / |
49 |
|
|
COMMON / TANGENTI / TG |
50 |
|
|
SAVE / TANGENTI / |
51 |
|
|
C |
52 |
|
|
RINDEX = 0. |
53 |
|
|
C |
54 |
|
|
DO K = 1,NCHA/2 |
55 |
|
|
RIL(K) = 1000. |
56 |
|
|
ENDDO |
57 |
|
|
C |
58 |
|
|
ENER(1) = 0. |
59 |
|
|
ENER(2) = 0. |
60 |
|
|
C |
61 |
|
|
QQQ = 0. |
62 |
|
|
QQQQ = 0. |
63 |
|
|
QQX = 0. |
64 |
|
|
QQY = 0. |
65 |
|
|
NGIR = 0 |
66 |
|
|
DO M = 1,2 |
67 |
|
|
NTOT(M) = 0 |
68 |
|
|
RPIANO(M) = 0. |
69 |
|
|
C |
70 |
|
|
DO J = 1,NPLA |
71 |
|
|
IF (MOD(J,2).EQ.0) THEN |
72 |
|
|
SHIFT = -0.5 |
73 |
|
|
ELSE |
74 |
|
|
SHIFT = 0.5 |
75 |
|
|
ENDIF |
76 |
|
|
C |
77 |
|
|
DO K = 1,NGIR |
78 |
|
|
RIL(K) = 1000. |
79 |
|
|
ENDDO |
80 |
|
|
C |
81 |
|
|
IF (M.EQ.1) NQQ(J) = 0. |
82 |
|
|
IF (M.EQ.2) NQQ(J+NPLA) = 0. |
83 |
|
|
NNN = 0 |
84 |
|
|
C |
85 |
|
|
NN = IBAR(M,J) |
86 |
|
|
C |
87 |
|
|
C EM |
88 |
|
|
C |
89 |
|
|
IF (NN.EQ.-1) GOTO 5 |
90 |
|
|
C |
91 |
|
|
IF (NN.LE.0) NN = 1 |
92 |
|
|
NGIR = NCL(M,J) ! number of clusters in layer J of the M View |
93 |
|
|
IF (NGIR.EQ.0) GOTO 5 |
94 |
|
|
C IF (NGIR.NE.1) GOTO 5 |
95 |
|
|
IPP = 0. |
96 |
|
|
DO L = 1,NGIR |
97 |
|
|
CALL LASTRISCIA(CLUS(M,J,L),IN) |
98 |
|
|
RIL(L) = FLOAT(ABS(NN - IN)) |
99 |
|
|
REL(L) = CLUS(M,J,L+NCHA/2) |
100 |
|
|
IF (RIL(L).GE.5) IPP = 1 |
101 |
|
|
ENDDO |
102 |
|
|
MM = NCHA/2 |
103 |
|
|
C |
104 |
|
|
C WE USE THE CLUSTER NEAREST THE TRACK . |
105 |
|
|
C |
106 |
|
|
c LK = LVMIN(RIL,MM) |
107 |
|
|
LH = LVMAX(REL,MM) |
108 |
|
|
C |
109 |
|
|
C CHECK ON THE DISTANCE OF THE CLUSTER FROM THE TRACK . |
110 |
|
|
C |
111 |
|
|
C IF (RIL(LK).GE.5) GOTO 5 |
112 |
|
|
IF (RIL(LH).GE.10) GOTO 5 |
113 |
|
|
IF (IPP.EQ.1) INDICE = INDICE + 1 |
114 |
|
|
IF (J.EQ.1) ENER(M) = CLUS(M,J,LH+NCHA/2) ! this is the detected |
115 |
|
|
C energy of the cluster in the first layer |
116 |
|
|
C |
117 |
|
|
NTOT(M) = NTOT(M) + 1 |
118 |
|
|
C |
119 |
|
|
C CHECK ON THE DETECTED ENERGY OF THE CLUSTER . |
120 |
|
|
C |
121 |
|
|
IF (CLUS(M,J,LH+NCHA/2).GT.EINF.AND.CLUS(M,J,LH+NCHA/2). |
122 |
|
|
& LT.ESUP) THEN |
123 |
|
|
IADD = 0 |
124 |
|
|
IF (M.EQ.2) IADD = NPLA |
125 |
|
|
NQQ(J + IADD) = NQQ(J + IADD) + CLUS(M,J,LH+NCHA/2) |
126 |
|
|
NNN = NNN + 1 |
127 |
|
|
ENDIF |
128 |
|
|
C |
129 |
|
|
5 CONTINUE |
130 |
|
|
IADD = 0 |
131 |
|
|
IF (M.EQ.2) IADD = NPLA |
132 |
|
|
IF (NQQ(J + IADD).LT.EMIN) NQQ(J + IADD) = 10000. |
133 |
|
|
IF (NNN.GE.1) RPIANO(M) = RPIANO(M) + 1 |
134 |
|
|
C |
135 |
|
|
ENDDO |
136 |
|
|
ENDDO |
137 |
|
|
C |
138 |
|
|
RPIATOT = RPIANO(1) + RPIANO(2) |
139 |
|
|
C |
140 |
|
|
IF (RPIATOT.GE.FLOAT(NPIANI)) THEN |
141 |
|
|
NPIA = NPIANI |
142 |
|
|
ELSE |
143 |
|
|
NPIA = INT(ANINT(RPIATOT)) |
144 |
|
|
ENDIF |
145 |
|
|
C |
146 |
|
|
QQQ = 0. |
147 |
|
|
C |
148 |
|
|
NDIM = 2 * NPLA |
149 |
|
|
C |
150 |
|
|
DO I = 1,NPIA |
151 |
|
|
N = LVMIN(NQQ,NDIM) |
152 |
|
|
QQQ = QQQ + NQQ(N) |
153 |
|
|
NQQ(N) = 10000. |
154 |
|
|
ENDDO |
155 |
|
|
C |
156 |
|
|
IF (NPIA.NE.0) THEN |
157 |
|
|
QQQQ = QQQ / FLOAT(NPIA) ! Truncated mean . |
158 |
|
|
ENDIF |
159 |
|
|
C |
160 |
|
|
400 CONTINUE |
161 |
|
|
|
162 |
|
|
RETURN |
163 |
|
|
END |
164 |
|
|
C |
165 |
|
|
|