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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sat Jan 27 06:22:21 2007 UTC (17 years, 10 months ago) by mocchiut
Branch: MAIN
CVS Tags: v3r04, v3r05, v3r06, v3r00, v3r03
Changes since 1.1: +3 -0 lines
Added DB reconnection routine called in between detector software

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 IF ( IBAR.LE.0 ) IBAR = 1
54 IF ( IBAR.GT.96 ) IBAR = 96
55 C
56 500 CONTINUE
57 RETURN
58 END
59 C

  ViewVC Help
Powered by ViewVC 1.1.23