00001 C========================= Include ctvmft.inc ========================== 00002 C============ include file for the constrained fit module CTVMFT ======= 00003 00004 C ---------------------------------------------------------------------- 00005 C Single precision stuff 00006 00007 C Counters of the used numbers of Vtx .. 00008 00009 INTEGER NVERTX ! Number of vertices 00010 INTEGER NMASSC ! Number of mass constraints 00011 INTEGER NTRACK ! Number of tracks, this fit 00012 00013 C Vertex track associations 00014 00015 LOGICAL TRKVTX(MAXTRK,MAXVTX) ! (Track,Vertex) assoc. table 00016 INTEGER VTXPNT(MAXVTX,2) ! Vertex association information 00017 00018 C Conversion constraints info 00019 00020 INTEGER CVTX (MAXVTX) ! Conversion constraint specs 00021 LOGICAL TRKMCN(MAXTRK,MAXMCN) ! (Track,Mass_Constraint) table 00022 REAL CMASS (MAXMCN) ! Constraint mass 00023 00024 C Required Input Track Specifications 00025 00026 CHARACTER*4 TKBANK(MAXTRK) ! Track bank type (e.g. 'TRKS') 00027 INTEGER LIST (MAXTRK) ! Track bank number 00028 REAL TMASS (MAXTRK) ! Track mass assignment 00029 00030 C Fit input, collected using the input specifications 00031 00032 REAL PAR0 (5,MAXTRK) ! Original trk parameter values 00033 REAL G (5,5,MAXTRK) ! Fitted trk parameter covar. 00034 00035 C Optional Input, Required Data for Pointing Constraints 00036 00037 REAL XYZPV0(3) ! Primary vertex: XYZ 00038 REAL EXYZPV(3,3) ! Primary vertex: covariance 00039 REAL XZSLOPE,YZSLOPE ! beamline slopes vs z direction 00040 INTEGER RUNNUM,TRGNUM ! Run and Event Number 00041 INTEGER ITER ! Number of iterative steps 00042 INTEGER NTSCUT ! Total number of cut steps 00043 00044 C Output; Results of the Fit 00045 00046 INTEGER MATDIM ! Dimension of matrix, this fit 00047 INTEGER NDOF ! Number of degrees of freedom 00048 LOGICAL VTXVTX(MAXVTX,MAXVTX) ! Vertex geneology 00049 REAL CHISQR(0:MAXITR) ! Overall fit Chi Square result 00050 REAL CHIT (MAXTRK) ! Track contr. to Chi Square 00051 REAL CHIV (0:MAXVTX) ! Vertex fit Chi Squares 00052 REAL CHIM (MAXMCN) ! Mass constraint Chi Squares 00053 REAL PAR (5,MAXTRK) ! Fitted trk helix parameters 00054 REAL PARDIF(5,MAXTRK) ! Parameter diff (fit-input) 00055 REAL FMCDIF(MAXMCN) ! Mass constraint residuals 00056 REAL PCON (MAXVTX,2) ! Pointing constraint tests 00057 REAL SANG (MAXVTX,2) ! Pointing constraint tests 00058 REAL XYZVRT(3,0:MAXVTX) ! Primary, Second vertices 00059 REAL TRKP4 (MAXTRK,6) ! Track Px,Py,Pz,E,Pt P 00060 REAL VTXP4 (4,MAXVTX) ! Vertex 4-momentum sum 00061 REAL MCNP4 (4,MAXMCN) ! 4-mom sum for mass constr. 00062 REAL DDA (MAXTRK,8) ! d(Px,Py)/d(Crv,Phi,Xs,Ys) 00063 REAL DXYZPV(3) ! Primary displacement in fit 00064 INTEGER VOFF (MAXVTX) ! Vertex offset pointers 00065 INTEGER POFF (MAXVTX) ! Point Phi offset pointers 00066 INTEGER COFF (MAXVTX) ! Point Cotan offset pointers 00067 INTEGER TOFF (MAXTRK) ! Track offset pointers 00068 INTEGER MOFF ! Mass offset pointers 00069 00070 C Memory 00071 00072 INTEGER TKERR (MAXTRK) ! Trk error flag, previous fit 00073 INTEGER IJKERR(3) ! Error code reporting 00074 REAL XYZPV (3) 00075 INTEGER UVWXYZ(UDIM) 00076 EQUIVALENCE(XYZPV,XYZVRT(1,0)) ! Danger: equiv. statements 00077 EQUIVALENCE(UVWXYZ,ITER) 00078 00079 C CTC first approximation and track-vertex step parameters 00080 00081 REAL DRMAX,RVMAX,DZMAX,TRNMAX,DSMIN 00082 00083 C Useful conversion parameter 00084 00085 REAL PSCALE ! Mom.scale conversion 00086 ! [cm^-1 -> Gev/c] 00087 00088 COMMON /CTVMFR/ 00089 > RUNNUM,TRGNUM,ITER,NTSCUT 00090 > ,NVERTX,NMASSC,NTRACK 00091 > ,TRKVTX,TRKMCN,VTXPNT,CMASS,CVTX 00092 > ,VTXVTX 00093 > ,TKBANK,LIST,TMASS 00094 > ,MATDIM 00095 > ,TKERR 00096 > ,NDOF,CHISQR,CHIT,CHIV,CHIM 00097 > ,XYZPV0,EXYZPV 00098 > ,XZSLOPE,YZSLOPE 00099 > ,XYZVRT,DXYZPV 00100 > ,PAR,G 00101 > ,TRKP4,VTXP4,MCNP4,DDA 00102 > ,VOFF,TOFF,POFF,COFF,MOFF 00103 > ,PAR0,PARDIF 00104 > ,FMCDIF,PCON,SANG 00105 > ,DRMAX,RVMAX,DZMAX,TRNMAX,DSMIN 00106 > ,IJKERR 00107 > ,PSCALE 00108 00109 C ---------------------------------------------------------------------- 00110 C Double precision stuff 00111 00112 C Covariance matrix, fit parameters 00113 REAL*8 VMAT(MAXDIM,MAXDIM+1) 00114 COMMON /CTVMFD/ 00115 > VMAT