| 1 | 
*************************************************************************** | 
| 2 | 
* | 
| 3 | 
*     Common for the track analysis, performed by the routine mini.f | 
| 4 | 
* | 
| 5 | 
*************************************************************************** | 
| 6 | 
c      PARAMETER (PIGR=3.141592654)!??????????????????? | 
| 7 | 
 | 
| 8 | 
*     ------------------------------------------------------------------------- | 
| 9 | 
*     A TRACK is defined by:  | 
| 10 | 
*     - the measured points associated to it  | 
| 11 | 
*     - their spatial resolution  | 
| 12 | 
*     - the track status vector AL-pha  | 
| 13 | 
*      | 
| 14 | 
*     This common must be filled when calling mini_2. After the fit,  | 
| 15 | 
*     the initial values of AL-pha (initial guess, for instance from Hough)  | 
| 16 | 
*     are replaced with the minimization result. | 
| 17 | 
* | 
| 18 | 
*     About the measured points: | 
| 19 | 
*     - a COUPLE defines a point in the space; in this case you should set | 
| 20 | 
* | 
| 21 | 
*       XGOOD     = 1 | 
| 22 | 
*       YGOOD     = 1 | 
| 23 | 
*       XM,YM,ZM  = coordinates of the point in cm | 
| 24 | 
*       RESX      = spatial resolution of cl-x | 
| 25 | 
*       RESY      = spatial resolution of cl-y | 
| 26 | 
* | 
| 27 | 
*     - a SINGLET (single cluster x/y) defines a segment AB, parallel to  | 
| 28 | 
*       the x/y strips; in this case you should set, for example in the case | 
| 29 | 
*       of a cl-x: | 
| 30 | 
* | 
| 31 | 
*       XGOOD     = 1 | 
| 32 | 
*       YGOOD     = 0 | 
| 33 | 
*       ZM        = average z coordinate of the segment AB in cm | 
| 34 | 
*       XM_A,YM_A = coordinates of extreme point A | 
| 35 | 
*       XM_B,YM_B = coordinates of extreme point B | 
| 36 | 
*       RESX      = spatial resolution of cl-x | 
| 37 | 
* | 
| 38 | 
*     NB!!! ZM must be always initialized, at least with the mechanical positions | 
| 39 | 
* | 
| 40 | 
*     (All the needed quantities for couples and singlets can be evaluated | 
| 41 | 
*     by means of the routine xyz_PAM) | 
| 42 | 
*     ------------------------------------------------------------------------- | 
| 43 | 
      REAL*8 AL | 
| 44 | 
      REAL*8 XM,YM,ZM | 
| 45 | 
      REAL*8 XM_A,YM_A!,ZM_A | 
| 46 | 
      REAL*8 XM_B,YM_B!,ZM_B | 
| 47 | 
      REAL*8 XGOOD,YGOOD | 
| 48 | 
      REAL*8 RESX,RESY | 
| 49 | 
c     REAL*8 DEDXTRK            !(1) | 
| 50 | 
      REAL*8 DEDXTRK_X          !(1) | 
| 51 | 
      REAL*8 DEDXTRK_Y          !(1) | 
| 52 | 
      COMMON/TRACK/ | 
| 53 | 
     $      AL(5)                                      !track parameters | 
| 54 | 
     $     ,XM(NPLANES),YM(NPLANES),ZM(NPLANES)        !couple    => xyz point  | 
| 55 | 
     $     ,XM_A(NPLANES),YM_A(NPLANES)!,ZM_A(NPLANES) !single cl => segment AB | 
| 56 | 
     $     ,XM_B(NPLANES),YM_B(NPLANES)!,ZM_B(NPLANES) ! | 
| 57 | 
     $     ,RESX(NPLANES),RESY(NPLANES)                !spatial resolution | 
| 58 | 
     $     ,XGOOD(NPLANES),YGOOD(NPLANES)              !mask of included views | 
| 59 | 
c     $     ,DEDXTRK(NPLANES)                           !energy release | 
| 60 | 
     $     ,DEDXTRK_X(NPLANES),DEDXTRK_Y(NPLANES) !(1) | 
| 61 | 
c****************************************************** | 
| 62 | 
cccccc 06/10/2005 modified by elena vannuccini ---> (1) | 
| 63 | 
c****************************************************** | 
| 64 | 
 | 
| 65 | 
*     ------------------------------------------------------------------------- | 
| 66 | 
*     The FIT info includes: | 
| 67 | 
*     - REDUCED chi2  | 
| 68 | 
*     - number of d.o.f. | 
| 69 | 
*     - evaluated coordinates (track intersection with the silicon planes) | 
| 70 | 
*     - projected angles | 
| 71 | 
*     - parameter covariance matrix | 
| 72 | 
*     ------------------------------------------------------------------------- | 
| 73 | 
      REAL*8 CHI2 | 
| 74 | 
      REAL*8 XV,YV,ZV | 
| 75 | 
      REAL*8 AXV,AYV | 
| 76 | 
      REAL*8 COV | 
| 77 | 
      COMMON/FIT_INFO/ | 
| 78 | 
     $      CHI2 | 
| 79 | 
     $     ,XV(NPLANES),YV(NPLANES),ZV(NPLANES) | 
| 80 | 
     $     ,AXV(NPLANES),AYV(NPLANES) | 
| 81 | 
     $     ,COV(5,5)             | 
| 82 | 
 | 
| 83 | 
 | 
| 84 | 
 | 
| 85 | 
 | 
| 86 | 
 | 
| 87 | 
*     ------------------------------------------------------------------------- | 
| 88 | 
*     Other commons needed by the minimization procedures: | 
| 89 | 
*     ------------------------------------------------------------------------- | 
| 90 | 
*     computation of chi^2 and its derivatives  | 
| 91 | 
      REAL*8 CHI2D,CHI2DD       !first and second derivatives of chi^2  | 
| 92 | 
      REAL*8 DXDAL,DYDAL        !first derivatives of x and y on AL-pha  | 
| 93 | 
      REAL*8 STEPAL             ! | 
| 94 | 
      REAL*8 ZINI               !z coordinate of reference plane | 
| 95 | 
      COMMON/MINICOM/ | 
| 96 | 
     $      CHI2D(5),CHI2DD(5,5) | 
| 97 | 
     $     ,DXDAL(NPLANES,5),DYDAL(NPLANES,5) | 
| 98 | 
     $     ,STEPAL(5) | 
| 99 | 
     $     ,ZINI | 
| 100 | 
*     ------------------------------------------------------------------------- | 
| 101 | 
*     convergence conditions  | 
| 102 | 
      REAL*8 ALTOL              !tolerances on AL-pha parameters | 
| 103 | 
      REAL*8 ALMAX,ALMIN        !maximum and minimum value for AL-pha parameters | 
| 104 | 
      INTEGER ISTEPMAX          !maximum number of steps       | 
| 105 | 
      COMMON/MINICON/ | 
| 106 | 
     $      ALTOL(5) | 
| 107 | 
     $     ,ALMAX(5),ALMIN(5) | 
| 108 | 
     $     ,ISTEPMAX | 
| 109 | 
*     ------------------------------------------------------------------------- | 
| 110 | 
*     variables for the tracking (routine posxy) | 
| 111 | 
      REAL*8 VECT,VECTINI,VOUT  !vectors for Runge-Kutta method | 
| 112 | 
      REAL*8 TOLL               !tolerance from plane | 
| 113 | 
      REAL*8 STEPMAX            !maximum number of steps | 
| 114 | 
      REAL*8 CHARGE             !sign of electric charge | 
| 115 | 
      COMMON/TRACKING/VECT(7),VECTINI(7),VOUT(7),TOLL,STEPMAX, | 
| 116 | 
     $     CHARGE | 
| 117 | 
 | 
| 118 | 
      |