/[PAMELA software]/calo/ground/LEVEL2/src/elio.for
ViewVC logotype

Annotation of /calo/ground/LEVEL2/src/elio.for

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Mon Dec 5 16:13:54 2005 UTC (19 years ago) by mocchiut
Branch point for: LEVEL2, MAIN
Initial revision

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

  ViewVC Help
Powered by ViewVC 1.1.23