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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (download) (vendor branch)
Fri May 19 13:15:50 2006 UTC (18 years, 6 months ago) by mocchiut
Branch: DarthVader
CVS Tags: v0r01, v0r02, v2r01, v1r01beta, start, v1r00, v1r01, v2r00BETA
Changes since 1.1: +0 -0 lines
Imported sources

1 SUBROUTINE ELIO(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 TG(2)
38 INTEGER IBAR(2,NPLA)
39 INTEGER NTOT(2)
40 COMMON / ANGOLO / BAR, IBAR
41 SAVE / ANGOLO /
42 COMMON / DOVE / NX, NY, LUNGH
43 SAVE / DOVE /
44 COMMON / TAGLIOEN / EINF, ESUP, ENER(2)
45 SAVE / TAGLIOEN /
46 COMMON / SHIFT / SHIFT
47 SAVE / SHIFT /
48 COMMON / TANGENTI / TG
49 SAVE / TANGENTI /
50 C
51 RINDEX = 0.
52 C
53 DO K = 1,NCHA/2
54 RIL(K) = 1000.
55 ENDDO
56 C
57 ENER(1) = 0.
58 ENER(2) = 0.
59 C
60 QQQ = 0.
61 QQQQ = 0.
62 QQX = 0.
63 QQY = 0.
64 NGIR = 0
65 DO M = 1,2
66 NTOT(M) = 0
67 RPIANO(M) = 0.
68 C
69 DO J = 1,NPLA
70 IF (MOD(J,2).EQ.0) THEN
71 SHIFT = -0.5
72 ELSE
73 SHIFT = 0.5
74 ENDIF
75 C
76 DO K = 1,NGIR
77 RIL(K) = 1000.
78 ENDDO
79 C
80 IF (M.EQ.1) NQQ(J) = 0.
81 IF (M.EQ.2) NQQ(J+NPLA) = 0.
82 NNN = 0
83 C
84 NN = IBAR(M,J)
85 C
86 C EM
87 C
88 IF (NN.EQ.-1) GOTO 5
89 C
90 IF (NN.LE.0) NN = 1
91 NGIR = NCL(M,J) ! number of clusters in layer J of the M View
92 IF (NGIR.EQ.0) GOTO 5
93 IPP = 0.
94 DO L = 1,NGIR
95 CALL LASTRISCIA(CLUS(M,J,L),IN)
96 RIL(L) = FLOAT(ABS(NN - IN))
97 IF (RIL(L).GE.5) IPP = 1
98 ENDDO
99 MM = NCHA/2
100 C
101 C WE USE THE CLUSTER NEAREST THE TRACK .
102 C
103 LK = LVMIN(RIL,MM)
104 C
105 C CHECK ON THE DISTANCE OF THE CLUSTER FROM THE TRACK .
106 C
107 IF (RIL(LK).GE.5) GOTO 5
108 IF (IPP.EQ.1) INDICE = INDICE + 1
109 IF (J.EQ.1) ENER(M) = CLUS(M,J,LK+NCHA/2) ! this is the detected
110 C energy of the cluster in the first layer
111 C
112 NTOT(M) = NTOT(M) + 1
113 C
114 C CHECK ON THE DETECTED ENERGY OF THE CLUSTER .
115 C
116 IF (CLUS(M,J,LK+NCHA/2).GT.EINF.AND.CLUS(M,J,LK+NCHA/2).
117 & LT.ESUP) THEN
118 IADD = 0
119 IF (M.EQ.2) IADD = NPLA
120 NQQ(J + IADD) = NQQ(J + IADD) + CLUS(M,J,LK+NCHA/2)
121 NNN = NNN + 1
122 ENDIF
123 C
124 5 CONTINUE
125 IADD = 0
126 IF (M.EQ.2) IADD = NPLA
127 IF (NQQ(J + IADD).LT.EMIN) NQQ(J + IADD) = 10000.
128 IF (NNN.GE.1) RPIANO(M) = RPIANO(M) + 1
129 C
130 ENDDO
131 ENDDO
132 C
133 RPIATOT = RPIANO(1) + RPIANO(2)
134 C
135 IF (RPIATOT.GE.FLOAT(NPIANI)) THEN
136 NPIA = NPIANI
137 ELSE
138 NPIA = INT(ANINT(RPIATOT))
139 ENDIF
140 C
141 QQQ = 0.
142 C
143 NDIM = 2 * NPLA
144 C
145 DO I = 1,NPIA
146 N = LVMIN(NQQ,NDIM)
147 QQQ = QQQ + NQQ(N)
148 NQQ(N) = 10000.
149 ENDDO
150 C
151 IF (NPIA.NE.0) THEN
152 QQQQ = QQQ / FLOAT(NPIA) ! Truncated mean .
153 ENDIF
154 C
155 400 CONTINUE
156
157 RETURN
158 END
159 C
160

  ViewVC Help
Powered by ViewVC 1.1.23