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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (download) (vendor branch)
Fri May 19 13:15:50 2006 UTC (18 years, 6 months ago) by mocchiut
Branch: DarthVader
CVS Tags: v0r01, v0r02, v2r01, v1r01beta, start, v1r00, v1r01, v2r00BETA
Changes since 1.1: +0 -0 lines
Imported sources

1 SUBROUTINE DIRECTION(DEVIA)
2 C-----------------------------------------------------
3 C-
4 C- Purpose and Methods : PROGRAM THAT DETERMINES THE
5 C- TRACK PROJECTIONS ON THE PLANE XZ AND YZ USING
6 C- ONLY CALORIMETER INFORMATION .
7 C-
8 C- Inputs :
9 C- Outputs :
10 C- Controls:
11 C-
12 C- Created 9-FEB-1994 MIRKO BOEZIO
13 C- Modified 21-FEB-2003 MIRKO BOEZIO . ADAPTED TO
14 C- BE USED FOR PAMELA CALORIMETER .
15 C-
16 C------------------------------------------------------
17
18 IMPLICIT NONE
19
20 INCLUDE 'INTEST.TXT'
21
22 INTEGER NVAR,NPAR
23 PARAMETER (NVAR=1,NPAR=2)
24
25 REAL X(NPLA),Y(NPLA),W(NPLA)
26 REAL DEVIA(2),TG(2)
27 REAL BAR(2,NPLA)
28 REAL A, B, VAR
29 REAL PIANO(22)
30 REAL VARFIT(2)
31
32 INTEGER ICONT, M, I
33 INTEGER NPFIT(2)
34
35 INTEGER IBAR(2,NPLA)
36 COMMON/ANGOLO/BAR,IBAR
37 SAVE /ANGOLO/
38
39 REAL CX, CY
40 COMMON/WHERE/CX,CY,PIANO
41 SAVE /WHERE/
42
43 COMMON/CALOFIT/VARFIT,NPFIT
44 SAVE/CALOFIT/
45 C
46 ICONT = 0
47 DEVIA(1) = 0.
48 DEVIA(2) = 0.
49 CX = 0.
50 CY = 0.
51 C
52 NPFIT(1) = NPLA
53 NPFIT(2) = NPLA
54 VARFIT(1) = 0.
55 VARFIT(2) = 0.
56 C
57 C THE FIT IS PERFORMED WHEN THERE ARE AT LEAST TWO
58 C LAYERS WITH SIGNAL . FOR THE FIT THE CLUSTER WITH THE
59 C HIGHEST DETECTED ENERGY IS USED .
60 C
61 DO M = 1,2
62 ICONT = 0
63 CALL VZERO(X,NPLA)
64 CALL VZERO(Y,NPLA)
65 CALL VZERO(W,NPLA)
66 DO I = 1,NPLA
67 C
68 IF (MOD(M,2).EQ.0) THEN
69 X(I) = PIANO(I) - 5.81
70 ELSE
71 X(I) = PIANO(I)
72 ENDIF
73 C X(I) = -(I-1) * PIANO
74 Y(I) = 0.
75 IF (NCL(M,I).GE.1) THEN
76 ICONT = ICONT + 1
77 Y(I) = CLUS(M,I,1)
78 W(I) = ((CLUS(M,I,1+NCHA/2)**0.79))**2.
79 IF (W(I).GT.2000.) W(I) = 2000.
80 ENDIF
81 if (Y(I).eq.0.or.W(I).eq.2000.) NPFIT(M) = NPFIT(M) - 1
82 ENDDO
83 C
84
85 A = 0.
86 B = 0.
87 IF (ICONT.GE.2) CALL LFITW(X,Y,W,NPLA,0,A,B,VAR)
88 VARFIT(M) = VAR
89 IF (M.EQ.1) CX = B
90 IF (M.EQ.2) CY = B
91 C
92 DEVIA(M) = A
93 TG(M) = A
94 ENDDO
95 C
96
97 500 CONTINUE
98 RETURN
99 END

  ViewVC Help
Powered by ViewVC 1.1.23