ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitCommon/Ctvmft/src/dfinv.F
Revision: 1.1
Committed: Wed Sep 17 04:01:49 2008 UTC (16 years, 7 months ago) by loizides
Branch: MAIN
CVS Tags: Mit_032, Mit_031, Mit_025c_branch2, Mit_025c_branch1, Mit_030, Mit_029c, Mit_030_pre1, Mit_029a, Mit_029, Mit_029_pre1, Mit_028a, Mit_025c_branch0, Mit_028, Mit_027a, Mit_027, Mit_026, Mit_025e, Mit_025d, Mit_025c, Mit_025b, Mit_025a, Mit_025, Mit_025pre2, Mit_024b, Mit_025pre1, Mit_024a, Mit_024, Mit_023, Mit_022a, Mit_022, Mit_020d, TMit_020d, Mit_020c, Mit_021, Mit_021pre2, Mit_021pre1, Mit_020b, Mit_020a, Mit_020, Mit_020pre1, Mit_018, Mit_017, Mit_017pre3, Mit_017pre2, Mit_017pre1, V07-05-00, Mit_016, Mit_015b, Mit_015a, Mit_015, Mit_014e, Mit_014d, Mit_014c, Mit_014b, ConvRejection-10-06-09, Mit_014a, Mit_014, Mit_014pre3, Mit_014pre2, Mit_014pre1, Mit_013d, Mit_013c, Mit_013b, Mit_013a, Mit_013, Mit_013pre1, Mit_012i, Mit_012g, Mit_012f, Mit_012e, Mit_012d, Mit_012c, Mit_012b, Mit_012a, Mit_012, Mit_011a, Mit_011, Mit_010a, Mit_010, Mit_009c, Mit_009b, Mit_009a, Mit_009, Mit_008, Mit_008pre2, Mit_008pre1, Mit_006b, Mit_006a, Mit_006, Mit_005, Mit_004, HEAD
Branch point for: Mit_025c_branch
Log Message:
Moved MitVertex contents to MitCommon. MitVertex therefore is obsolute and should not be touched anymore.

File Contents

# User Rev Content
1 loizides 1.1 c $Id: dfinv.F,v 1.1 2008/07/28 11:31:56 paus Exp $
2    
3     * Inital version of CMS port of CTVMFT (CDF vertex fitter).
4    
5     SUBROUTINE DFINV(N,A,IDIM,IR)
6     INTEGER IR(*)
7     DOUBLE PRECISION A(IDIM,*),ZERO, X, Y, TI
8     DOUBLE PRECISION S31, S32, S33, S34, DOTF
9     CHARACTER*6 HNAME
10     DATA HNAME / ' DFINV' /
11     DOTF(X,Y,S31) = X*Y + S31
12     DATA ZERO / 0.D0 /
13    
14     IF(IDIM .GE. N .AND. N .GT. 0) GOTO 310
15     WRITE(*,'(A)') ' ERROR -- DIMENSIONS '
16     *** CALL TMPRNT(HNAME,N,IDIM,0)
17     RETURN
18     310 IF(N .EQ. 1) RETURN
19     A(2,1) = -A(2,2) * DOTF(A(1,1),A(2,1),ZERO)
20     A(1,2) = -A(1,2)
21     IF(N .EQ. 2) GOTO 330
22     DO 314 I = 3, N
23     IM2 = I-2
24     DO 312 J = 1, IM2
25     S31 = ZERO
26     S32 = A(J,I)
27     DO 311 K = J, IM2
28     S31 = DOTF(A(K,J),A(I,K),S31)
29     S32 = DOTF(A(J,K+1),A(K+1,I),S32)
30     311 CONTINUE
31     A(I,J) = -A(I,I) * DOTF(A(I-1,J),A(I,I-1),S31)
32     A(J,I) = -S32
33     312 CONTINUE
34     A(I,I-1) = -A(I,I) * DOTF(A(I-1,I-1),A(I,I-1),ZERO)
35     A(I-1,I) = -A(I-1,I)
36     314 CONTINUE
37     330 NM1 = N-1
38     DO 335 I = 1, NM1
39     NMI = N-I
40     DO 332 J = 1, I
41     S33 = A(I,J)
42     DO 331 K = 1, NMI
43     S33 = DOTF(A(I+K,J),A(I,I+K),S33)
44     331 CONTINUE
45     A(I,J) = S33
46     332 CONTINUE
47     DO 334 J = 1, NMI
48     S34 = ZERO
49     DO 333 K = J, NMI
50     S34 = DOTF(A(I+K,I+J),A(I,I+K),S34)
51     333 CONTINUE
52     A(I,I+J) = S34
53     334 CONTINUE
54     335 CONTINUE
55     NXCH = IR(N)
56     IF(NXCH .EQ. 0) RETURN
57     DO 342 M = 1, NXCH
58     K = NXCH - M+1
59     IJ = IR(K)
60     I = IJ / 4096
61     J = MOD(IJ,4096)
62     DO 341 K = 1, N
63     TI = A(K,I)
64     A(K,I) = A(K,J)
65     A(K,J) = TI
66     341 CONTINUE
67     342 CONTINUE
68    
69     RETURN
70     END