1 |
loizides |
1.1 |
C========================= Include ctvmft.inc ==========================
|
2 |
|
|
C============ include file for the constrained fit module CTVMFT =======
|
3 |
|
|
|
4 |
|
|
C ----------------------------------------------------------------------
|
5 |
|
|
C Single precision stuff
|
6 |
|
|
|
7 |
|
|
C Counters of the used numbers of Vtx ..
|
8 |
|
|
|
9 |
|
|
INTEGER NVERTX ! Number of vertices
|
10 |
|
|
INTEGER NMASSC ! Number of mass constraints
|
11 |
|
|
INTEGER NTRACK ! Number of tracks, this fit
|
12 |
|
|
|
13 |
|
|
C Vertex track associations
|
14 |
|
|
|
15 |
|
|
LOGICAL TRKVTX(MAXTRK,MAXVTX) ! (Track,Vertex) assoc. table
|
16 |
|
|
INTEGER VTXPNT(MAXVTX,2) ! Vertex association information
|
17 |
|
|
|
18 |
|
|
C Conversion constraints info
|
19 |
|
|
|
20 |
|
|
INTEGER CVTX (MAXVTX) ! Conversion constraint specs
|
21 |
|
|
LOGICAL TRKMCN(MAXTRK,MAXMCN) ! (Track,Mass_Constraint) table
|
22 |
|
|
REAL CMASS (MAXMCN) ! Constraint mass
|
23 |
|
|
|
24 |
|
|
C Required Input Track Specifications
|
25 |
|
|
|
26 |
|
|
CHARACTER*4 TKBANK(MAXTRK) ! Track bank type (e.g. 'TRKS')
|
27 |
|
|
INTEGER LIST (MAXTRK) ! Track bank number
|
28 |
|
|
REAL TMASS (MAXTRK) ! Track mass assignment
|
29 |
|
|
|
30 |
|
|
C Fit input, collected using the input specifications
|
31 |
|
|
|
32 |
|
|
REAL PAR0 (5,MAXTRK) ! Original trk parameter values
|
33 |
|
|
REAL G (5,5,MAXTRK) ! Fitted trk parameter covar.
|
34 |
|
|
|
35 |
|
|
C Optional Input, Required Data for Pointing Constraints
|
36 |
|
|
|
37 |
|
|
REAL XYZPV0(3) ! Primary vertex: XYZ
|
38 |
|
|
REAL EXYZPV(3,3) ! Primary vertex: covariance
|
39 |
|
|
REAL XZSLOPE,YZSLOPE ! beamline slopes vs z direction
|
40 |
|
|
INTEGER RUNNUM,TRGNUM ! Run and Event Number
|
41 |
|
|
INTEGER ITER ! Number of iterative steps
|
42 |
|
|
INTEGER NTSCUT ! Total number of cut steps
|
43 |
|
|
|
44 |
|
|
C Output; Results of the Fit
|
45 |
|
|
|
46 |
|
|
INTEGER MATDIM ! Dimension of matrix, this fit
|
47 |
|
|
INTEGER NDOF ! Number of degrees of freedom
|
48 |
|
|
LOGICAL VTXVTX(MAXVTX,MAXVTX) ! Vertex geneology
|
49 |
|
|
REAL CHISQR(0:MAXITR) ! Overall fit Chi Square result
|
50 |
|
|
REAL CHIT (MAXTRK) ! Track contr. to Chi Square
|
51 |
|
|
REAL CHIV (0:MAXVTX) ! Vertex fit Chi Squares
|
52 |
|
|
REAL CHIM (MAXMCN) ! Mass constraint Chi Squares
|
53 |
|
|
REAL PAR (5,MAXTRK) ! Fitted trk helix parameters
|
54 |
|
|
REAL PARDIF(5,MAXTRK) ! Parameter diff (fit-input)
|
55 |
|
|
REAL FMCDIF(MAXMCN) ! Mass constraint residuals
|
56 |
|
|
REAL PCON (MAXVTX,2) ! Pointing constraint tests
|
57 |
|
|
REAL SANG (MAXVTX,2) ! Pointing constraint tests
|
58 |
|
|
REAL XYZVRT(3,0:MAXVTX) ! Primary, Second vertices
|
59 |
|
|
REAL TRKP4 (MAXTRK,6) ! Track Px,Py,Pz,E,Pt P
|
60 |
|
|
REAL VTXP4 (4,MAXVTX) ! Vertex 4-momentum sum
|
61 |
|
|
REAL MCNP4 (4,MAXMCN) ! 4-mom sum for mass constr.
|
62 |
|
|
REAL DDA (MAXTRK,8) ! d(Px,Py)/d(Crv,Phi,Xs,Ys)
|
63 |
|
|
REAL DXYZPV(3) ! Primary displacement in fit
|
64 |
|
|
INTEGER VOFF (MAXVTX) ! Vertex offset pointers
|
65 |
|
|
INTEGER POFF (MAXVTX) ! Point Phi offset pointers
|
66 |
|
|
INTEGER COFF (MAXVTX) ! Point Cotan offset pointers
|
67 |
|
|
INTEGER TOFF (MAXTRK) ! Track offset pointers
|
68 |
|
|
INTEGER MOFF ! Mass offset pointers
|
69 |
|
|
|
70 |
|
|
C Memory
|
71 |
|
|
|
72 |
|
|
INTEGER TKERR (MAXTRK) ! Trk error flag, previous fit
|
73 |
|
|
INTEGER IJKERR(3) ! Error code reporting
|
74 |
|
|
REAL XYZPV (3)
|
75 |
|
|
INTEGER UVWXYZ(UDIM)
|
76 |
|
|
EQUIVALENCE(XYZPV,XYZVRT(1,0)) ! Danger: equiv. statements
|
77 |
|
|
EQUIVALENCE(UVWXYZ,ITER)
|
78 |
|
|
|
79 |
|
|
C CTC first approximation and track-vertex step parameters
|
80 |
|
|
|
81 |
|
|
REAL DRMAX,RVMAX,DZMAX,TRNMAX,DSMIN
|
82 |
|
|
|
83 |
|
|
C Useful conversion parameter
|
84 |
|
|
|
85 |
|
|
REAL PSCALE ! Mom.scale conversion
|
86 |
|
|
! [cm^-1 -> Gev/c]
|
87 |
|
|
|
88 |
|
|
COMMON /DCTVMFR/
|
89 |
|
|
> RUNNUM,TRGNUM,ITER,NTSCUT
|
90 |
|
|
> ,NVERTX,NMASSC,NTRACK
|
91 |
|
|
> ,TRKVTX,TRKMCN,VTXPNT,CMASS,CVTX
|
92 |
|
|
> ,VTXVTX
|
93 |
|
|
> ,TKBANK,LIST,TMASS
|
94 |
|
|
> ,MATDIM
|
95 |
|
|
> ,TKERR
|
96 |
|
|
> ,NDOF,CHISQR,CHIT,CHIV,CHIM
|
97 |
|
|
> ,XYZPV0,EXYZPV
|
98 |
|
|
> ,XZSLOPE,YZSLOPE
|
99 |
|
|
> ,XYZVRT,DXYZPV
|
100 |
|
|
> ,PAR,G
|
101 |
|
|
> ,TRKP4,VTXP4,MCNP4,DDA
|
102 |
|
|
> ,VOFF,TOFF,POFF,COFF,MOFF
|
103 |
|
|
> ,PAR0,PARDIF
|
104 |
|
|
> ,FMCDIF,PCON,SANG
|
105 |
|
|
> ,DRMAX,RVMAX,DZMAX,TRNMAX,DSMIN
|
106 |
|
|
> ,IJKERR
|
107 |
|
|
> ,PSCALE
|
108 |
|
|
|
109 |
|
|
C ----------------------------------------------------------------------
|
110 |
|
|
C Double precision stuff
|
111 |
|
|
|
112 |
|
|
C Covariance matrix, fit parameters
|
113 |
|
|
REAL*8 VMAT(MAXDIM,MAXDIM+1)
|
114 |
|
|
COMMON /DCTVMFD/
|
115 |
|
|
> VMAT
|