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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Tue Aug 4 14:01:20 2009 UTC (15 years, 4 months ago) by mocchiut
Branch: MAIN
CVS Tags: v10RED, v9r00, v9r01, v10REDr01, HEAD
Changes since 1.4: +2 -1 lines
Changed to work with GCC 4.x (gfortran) + ROOT >= 5.24

1 C
2 C---------------------------------------------------------------------
3 SUBROUTINE LATERALE(RQT1,RQT2)
4 C---------------------------------------------------------------------
5 C RQT1 (IT WILL BE CALLED QTRACK IN THE N-TUPLE) IS THE SUM OF THE DETECTED
6 C ENERGY IN THE STRIP ALONG THE TRACK AND THE TWO CLOSEST STRIPS . FOR ALL THE
7 C LAYERS . RQT2 (IS NOT USED IN THE N-TUPLA) IS THE TOTAL ENERGY MINUS RQT1 .
8 C
9 INCLUDE 'INTEST.TXT'
10 C
11 INTEGER A,B, INPIA
12 INTEGER IBAR(2,NPLAV)
13 REAL BAR(2,NPLAV)
14 REAL RQT1, RQT2
15 COMMON / ANGOLO / BAR, IBAR
16 SAVE / ANGOLO /
17 C
18 RQT1 = 0.
19 RQT2 = 0.
20 C
21 INPIA = 1
22 C
23 DO I = INPIA, NPLA
24 A = IBAR(1,I)
25 C
26 C EM
27 C
28 IF (A.EQ.-1) GOTO 600
29 C
30 C END EM
31 C
32 IF (A.LE.2) A = 2
33 IF (A.GE.NCHA) A = NCHA - 1
34 DO J = A-1,A+1
35 IF (DEXY(1,I,J).GE.EMIN) RQT1 = RQT1 + DEXY(1,I,J)
36 ENDDO
37 C
38 IF ((A-2).GE.1) THEN
39 DO J=1,A-2
40 PXY = DEXY(1,I,J)
41 IF (PXY.GE.EMIN) RQT2 = RQT2 + PXY
42 ENDDO
43 ENDIF
44 C
45 IF ((A+2).LE.NCHA) THEN
46 DO J=A+2,NCHA
47 PXY = DEXY(1,I,J)
48 IF (PXY.GE.EMIN) RQT2 = RQT2 + PXY
49 ENDDO
50 ENDIF
51 C
52 c print *,' I ',I,' A ',RQT1
53 600 CONTINUE
54 C
55 B = IBAR(2,I)
56 C
57 C EM
58 C
59 IF (B.EQ.-1) GOTO 700
60 C
61 C END EM
62 C
63 IF (B.LE.2) B = 2
64 IF (B.GE.NCHA) B = NCHA - 1
65 DO J = B-1,B+1
66 IF (DEXY(2,I,J).GE.EMIN) RQT1 = RQT1 + DEXY(2,I,J)
67 c print *,' ==> J ',j,' dexy ',DEXY(2,I,J)
68 ENDDO
69 C
70 IF ((B-2).GE.1) THEN
71 DO J=1,B-2
72 PXY = DEXY(2,I,J)
73 IF (PXY.GE.EMIN) RQT2 = RQT2 + PXY
74 ENDDO
75 ENDIF
76 C
77 IF ((B+2).LE.NCHA) THEN
78 DO J=B+2,NCHA
79 PXY = DEXY(2,I,J)
80 IF (PXY.GE.EMIN) RQT2 = RQT2 + PXY
81 ENDDO
82 ENDIF
83 C
84 c print *,' I ',I,' B ',RQT1
85 700 CONTINUE
86 ENDDO
87 C
88 C
89 c 800 RETURN
90 RETURN
91 END
92

  ViewVC Help
Powered by ViewVC 1.1.23