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

Annotation of /DarthVader/CalorimeterLevel2/src/lastriscia.for

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Fri Aug 10 12:31:42 2007 UTC (17 years, 3 months ago) by mocchiut
Branch: MAIN
CVS Tags: v5r00, v4r00, v10RED, v9r00, v9r01, v10REDr01, v6r01, v6r00, HEAD
Changes since 1.2: +1 -0 lines
Small changes

1 mocchiut 1.1 C
2     C---------------------------------------------------------------------
3     SUBROUTINE LASTRISCIA(BAR,IBAR)
4     C---------------------------------------------------------------------
5     C TRASFORMA UN VALORE IN mm NELL'EQUIVALENTE VALORE IN NUMERO DI STRISCIA .
6     C
7     INCLUDE 'INTEST.TXT'
8     C
9     COMMON / SHIFT / SHIFT
10 mocchiut 1.3 SAVE / SHIFT /
11 mocchiut 1.1 C
12     C EM: IF TRACK GO OUT OF THE CALORIMETER GIVE BACK AS STRIP VALUE -1 TO FLAG THE SITUATION
13     C
14     IF ( BAR.LT.-6..OR.BAR.GT.246. ) THEN
15     IBAR = -1
16     GOTO 500
17     ENDIF
18     C
19     C END EM
20     C
21     BBAR = BAR - SHIFT
22     IBAR = 0
23     DO L = 1, NCHA
24     ALUNG = INT((FLOAT(L) - 1.) / 32.) * ADIST + AA
25     II = L - 1
26     K = MOD(II,32)
27     RLINF = FLOAT(K) * 2.44 + ALUNG
28     RLSUP = FLOAT(K + 1) * 2.44 + ALUNG
29     IF (BBAR.GT.RLINF.AND.BBAR.LT.RLSUP) THEN
30     IBAR = L
31     GO TO 500
32     ENDIF
33     ENDDO
34     C
35     C SE BAR SI TROVA SU UN'AREA MORTA SI PRENDE LA STRISCIA INFERIORE PIU`
36     C PROSSIMA TRANNE QUANDO SI TRATTA DELLA PRIMA AREA MORTA NEL QUAL CASO SI
37     C PRENDE IBAR = 1 .
38     C
39     IF (IBAR.EQ.0.AND.BBAR.GT.0.0001) THEN
40     LK = INT(BBAR / ADIST)
41     DIS = BBAR - ADIST * FLOAT(LK+1)
42     IF (DIS.LT.-1.96) THEN
43     IBAR = 32 * LK
44     ELSE IF (DIS.GE.-1.96.AND.DIS.LE.-0.5) THEN
45     IBAR = 32 * (LK + 1)
46     ELSE IF (DIS.GT.-0.5.AND.DIS.LE.0.) THEN
47     IBAR = 32 * (LK + 1) + 1
48     ELSE
49     PRINT *,'PROBLEMS :',BBAR
50     ENDIF
51     IF (IBAR.EQ.0) IBAR = 1
52     ENDIF
53     C
54 mocchiut 1.2 IF ( IBAR.LE.0 ) IBAR = 1
55     IF ( IBAR.GT.96 ) IBAR = 96
56     C
57 mocchiut 1.1 500 CONTINUE
58     RETURN
59     END
60     C

  ViewVC Help
Powered by ViewVC 1.1.23