/[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.1 - (hide annotations) (download)
Fri May 19 13:15:50 2006 UTC (18 years, 6 months ago) by mocchiut
Branch: MAIN
Branch point for: DarthVader
Initial revision

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     C
11     C EM: IF TRACK GO OUT OF THE CALORIMETER GIVE BACK AS STRIP VALUE -1 TO FLAG THE SITUATION
12     C
13     IF ( BAR.LT.-6..OR.BAR.GT.246. ) THEN
14     IBAR = -1
15     GOTO 500
16     ENDIF
17     C
18     C END EM
19     C
20     BBAR = BAR - SHIFT
21     IBAR = 0
22     DO L = 1, NCHA
23     ALUNG = INT((FLOAT(L) - 1.) / 32.) * ADIST + AA
24     II = L - 1
25     K = MOD(II,32)
26     RLINF = FLOAT(K) * 2.44 + ALUNG
27     RLSUP = FLOAT(K + 1) * 2.44 + ALUNG
28     IF (BBAR.GT.RLINF.AND.BBAR.LT.RLSUP) THEN
29     IBAR = L
30     GO TO 500
31     ENDIF
32     ENDDO
33     C
34     C SE BAR SI TROVA SU UN'AREA MORTA SI PRENDE LA STRISCIA INFERIORE PIU`
35     C PROSSIMA TRANNE QUANDO SI TRATTA DELLA PRIMA AREA MORTA NEL QUAL CASO SI
36     C PRENDE IBAR = 1 .
37     C
38     IF (IBAR.EQ.0.AND.BBAR.GT.0.0001) THEN
39     LK = INT(BBAR / ADIST)
40     DIS = BBAR - ADIST * FLOAT(LK+1)
41     IF (DIS.LT.-1.96) THEN
42     IBAR = 32 * LK
43     ELSE IF (DIS.GE.-1.96.AND.DIS.LE.-0.5) THEN
44     IBAR = 32 * (LK + 1)
45     ELSE IF (DIS.GT.-0.5.AND.DIS.LE.0.) THEN
46     IBAR = 32 * (LK + 1) + 1
47     ELSE
48     PRINT *,'PROBLEMS :',BBAR
49     ENDIF
50     IF (IBAR.EQ.0) IBAR = 1
51     ENDIF
52     C
53     500 CONTINUE
54     RETURN
55     END
56     C

  ViewVC Help
Powered by ViewVC 1.1.23