ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitCommon/Ctvmft/src/mydfinv.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:$
2    
3     * Inital version of CMS port of CTVMFT (CDF vertex fitter).
4     *
5     * Revision 1.1 2004/10/08 01:32:56 paus
6     * Include fast version of vertex fit.
7     *
8     * Revision 1.1 2004/03/09 03:16:45 paus
9     * *** empty log message ***
10     *
11     * Revision 1.1 2001/04/26 23:00:22 murat
12     * - port CTVMFT (starting from Craig's interface)
13     * - add first definition of e+e- conversion
14    
15     SUBROUTINE MYDFINV(N,A,IDIM,IR)
16     INTEGER IR(*)
17     DOUBLE PRECISION A(IDIM,*),ZERO, X, Y, TI
18     DOUBLE PRECISION S31, S32, S33, S34, DOTF
19     c
20     integer n, idim, i, im2, j, k, nm1, nmi, nxch, m, ij
21     c
22     CHARACTER*6 HNAME
23     DATA HNAME / ' DFINV' /
24     DOTF(X,Y,S31) = X*Y + S31
25     DATA ZERO / 0.D0 /
26     c-----------------------------------------------------------------------
27     c$$$ #include "finv.inc"
28     IF (N.eq.0.or.IDIM .lt.N) return
29     IF (N .EQ. 1) RETURN
30    
31     A(2,1) = -A(2,2) * DOTF(A(1,1),A(2,1),ZERO)
32     A(1,2) = -A(1,2)
33     IF(N .EQ. 2) GOTO 330
34     DO 314 I = 3, N
35     IM2 = I-2
36     DO 312 J = 1, IM2
37     S31 = ZERO
38     S32 = A(J,I)
39     DO 311 K = J, IM2
40     S31 = DOTF(A(K,J),A(I,K),S31)
41     S32 = DOTF(A(J,K+1),A(K+1,I),S32)
42     311 CONTINUE
43     A(I,J) = -A(I,I) * DOTF(A(I-1,J),A(I,I-1),S31)
44     A(J,I) = -S32
45     312 CONTINUE
46     A(I,I-1) = -A(I,I) * DOTF(A(I-1,I-1),A(I,I-1),ZERO)
47     A(I-1,I) = -A(I-1,I)
48     314 CONTINUE
49     330 NM1 = N-1
50     DO 335 I = 1, NM1
51     NMI = N-I
52     DO 332 J = 1, I
53     S33 = A(I,J)
54     DO 331 K = 1, NMI
55     S33 = DOTF(A(I+K,J),A(I,I+K),S33)
56     331 CONTINUE
57     A(I,J) = S33
58     332 CONTINUE
59     DO 334 J = 1, NMI
60     S34 = ZERO
61     DO 333 K = J, NMI
62     S34 = DOTF(A(I+K,I+J),A(I,I+K),S34)
63     333 CONTINUE
64     A(I,I+J) = S34
65     334 CONTINUE
66     335 CONTINUE
67     NXCH = IR(N)
68     IF(NXCH .EQ. 0) RETURN
69     DO 342 M = 1, NXCH
70     K = NXCH - M+1
71     IJ = IR(K)
72     I = IJ / 4096
73     J = MOD(IJ,4096)
74     DO 341 K = 1, N
75     TI = A(K,I)
76     A(K,I) = A(K,J)
77     A(K,J) = TI
78     341 CONTINUE
79     342 CONTINUE
80     RETURN
81     END