      FUNCTION Width_Z2uu_EW(ischeme)
      USE ParamModule
      USE mis_warp
      USE Func_PSI
      IMPLICIT NONE
      INTEGER::ischeme
      REAL(KIND(1d0))::EL,MT,MW,MZ,MH
      COMPLEX(KIND(1d0))::res,resdiff,C0F
      COMPLEX(KIND(1d0)),DIMENSION(4)::C0RES
      REAL(KIND(1d0))::Width_Z2uu_EW
      REAL(KIND(1d0))::prefactor
      COMPLEX(KIND(1d0)),EXTERNAL::dZe1_Gmu_MZ
      IF(ischeme.NE.1.AND.ischeme.NE.2)THEN
         WRITE(*,*)"ERROR:Unkonwn scheme:",ischeme
         WRITE(*,*)"Please choose 1(alpha(MZ)) or 2(Gmu)"
         STOP
      ENDIF
      EL=Decay_e
      MT=Decay_MT
      MW=Decay_MW
      MH=Decay_MH
      MZ=Decay_MZ
      prefactor=1d0/48d0/pi/MZ
      res=(4.8862453531219986e-6*
     -    EL**4*
     -    ((12*
     -         (MW**2*MZ**4*
     -            (1024*MW**8 -
     -            3328*MW**6*
     -            MZ**2 +
     -            4128*MW**4*
     -            MZ**4 -
     -            2152*MW**2*
     -            MZ**6 + 409*MZ**8
     -            ) +
     -           MT**4*
     -            (-20480*MW**10 +
     -            69632*MW**8*
     -            MZ**2 -
     -            94272*MW**6*
     -            MZ**4 +
     -            61040*MW**4*
     -            MZ**6 -
     -            16310*MW**2*
     -            MZ**8 +
     -            714*MZ**10) +
     -           MT**2*
     -            (-2048*MW**10*
     -            MZ**2 +
     -            6656*MW**8*
     -            MZ**4 -
     -            8256*MW**6*
     -            MZ**6 +
     -            4520*MW**4*
     -            MZ**8 -
     -            1736*MW**2*
     -            MZ**10 +
     -            459*MZ**12))*
     -         Arg(2*MT**2 -
     -           MZ**2 +
     -           (0,1)*MZ*
     -            Csqrt2(4*MT**2 -
     -            MZ**2)))/
     -       (MW**4*MZ*
     -         (4*MT**2 - MZ**2)**
     -          0.5) +
     -      (9*MZ**5*
     -         (4*MW**2 - MZ**2)**
     -          1.5*
     -         (12*MW**4 +
     -           20*MW**2*MZ**2 +
     -           MZ**4)*
     -         (8*MW**4 -
     -           34*MW**2*MZ**2 +
     -           17*MZ**4)*
     -         Arg(-MZ +
     -           (0,1)*
     -            Csqrt2(4*MW**2 -
     -            MZ**2)))/MW**8 -
     -      (9*MZ**5*
     -         (4*MW**2 - MZ**2)**
     -          1.5*
     -         (12*MW**4 +
     -           20*MW**2*MZ**2 +
     -           MZ**4)*
     -         (8*MW**4 -
     -           34*MW**2*MZ**2 +
     -           17*MZ**4)*
     -         Arg(MZ +
     -           (0,1)*
     -            Csqrt2(4*MW**2 -
     -            MZ**2)))/MW**8 +
     -      (9*(2*MW - MZ)*
     -         (2*MW + MZ)*
     -         (7680*MW**16 -
     -           13440*MW**14*
     -            MZ**2 +
     -           816*MW**12*
     -           MZ**4 +
     -           13320*MW**10*
     -            MZ**6 -
     -           6388*MW**8*
     -           MZ**8 +
     -           2122*MW**6*
     -            MZ**10 -
     -           1692*MW**4*
     -            MZ**12 +
     -           238*MW**2*
     -           MZ**14 + 17*MZ**16
     -           )*
     -         Arg(2*MW**2 -
     -           MZ**2 +
     -           (0,1)*MZ*
     -            Csqrt2(4*MW**2 -
     -            MZ**2)))/
     -       (MW**8*MZ*
     -         (4*MW**2 - MZ**2)**
     -          0.5) +
     -      (9*MZ**5*
     -         (4*MW**2 - MZ**2)**
     -          1.5*
     -         (12*MW**4 +
     -           20*MW**2*MZ**2 +
     -           MZ**4)*
     -         (8*MW**4 -
     -           34*MW**2*MZ**2 +
     -           17*MZ**4)*
     -         Arg(-2*MW**2 +
     -           MZ**2 +
     -           (0,1)*MZ*
     -            Csqrt2(4*MW**2 -
     -            MZ**2)))/MW**8 +
     -      (9*MH*
     -         (4*MH**2*MZ**4*
     -            (256*MW**6 -
     -            632*MW**4*
     -           MZ**2 +
     -            694*MW**2*
     -           MZ**4 - 255*MZ**6)
     -             + MH**6*
     -            (64*MW**6 -
     -            152*MW**4*
     -           MZ**2 +
     -            148*MW**2*
     -           MZ**4 - 51*MZ**6)
     -            + 12*MZ**6*
     -            (-96*MW**6 +
     -            248*MW**4*
     -           MZ**2 -
     -            307*MW**2*
     -           MZ**4 + 119*MZ**6)
     -             + MH**4*
     -            (-416*MW**6*
     -            MZ**2 +
     -            1000*MW**4*
     -            MZ**4 -
     -            1013*MW**2*
     -            MZ**6 + 357*MZ**8
     -            ))*
     -         Arg(-MH +
     -           (0,1)*
     -            Csqrt2(-MH**2 +
     -            4*MZ**2)))/
     -       (MW**4*
     -         (-MH**2 + 4*MZ**2)**
     -          0.5) +
     -      (9*MH*
     -         (12*MZ**6*
     -            (96*MW**6 -
     -            248*MW**4*
     -           MZ**2 +
     -            307*MW**2*
     -           MZ**4 - 119*MZ**6)
     -             + MH**6*
     -            (-64*MW**6 +
     -            152*MW**4*
     -           MZ**2 -
     -            148*MW**2*
     -           MZ**4 + 51*MZ**6)
     -            + 4*MH**2*MZ**4*
     -            (-256*MW**6 +
     -            632*MW**4*
     -           MZ**2 -
     -            694*MW**2*
     -           MZ**4 + 255*MZ**6)
     -             + MH**4*
     -            (416*MW**6*
     -            MZ**2 -
     -            1000*MW**4*
     -            MZ**4 +
     -            1013*MW**2*
     -            MZ**6 - 357*MZ**8
     -            ))*
     -         Arg(MH +
     -           (0,1)*
     -            Csqrt2(-MH**2 +
     -            4*MZ**2)))/
     -       (MW**4*
     -         (-MH**2 + 4*MZ**2)**
     -          0.5) +
     -      (9*MH*
     -         (4*MH**2*MZ**4*
     -            (256*MW**6 -
     -            632*MW**4*
     -           MZ**2 +
     -            694*MW**2*
     -           MZ**4 - 255*MZ**6)
     -             + MH**6*
     -            (64*MW**6 -
     -            152*MW**4*
     -           MZ**2 +
     -            148*MW**2*
     -           MZ**4 - 51*MZ**6)
     -            + 12*MZ**6*
     -            (-96*MW**6 +
     -            248*MW**4*
     -           MZ**2 -
     -            307*MW**2*
     -           MZ**4 + 119*MZ**6)
     -             + MH**4*
     -            (-416*MW**6*
     -            MZ**2 +
     -            1000*MW**4*
     -            MZ**4 -
     -            1013*MW**2*
     -            MZ**6 + 357*MZ**8
     -            ))*
     -         Arg(MH**2 -
     -           2*MZ**2 +
     -           (0,1)*MH*
     -            Csqrt2(-MH**2 +
     -            4*MZ**2)))/
     -       (MW**4*
     -         (-MH**2 + 4*MZ**2)**
     -          0.5) +
     -      (9*MH*
     -         (12*MZ**6*
     -            (96*MW**6 -
     -            248*MW**4*
     -           MZ**2 +
     -            307*MW**2*
     -           MZ**4 - 119*MZ**6)
     -             + MH**6*
     -            (-64*MW**6 +
     -            152*MW**4*
     -           MZ**2 -
     -            148*MW**2*
     -           MZ**4 + 51*MZ**6)
     -            + 4*MH**2*MZ**4*
     -            (-256*MW**6 +
     -            632*MW**4*
     -           MZ**2 -
     -            694*MW**2*
     -           MZ**4 + 255*MZ**6)
     -             + MH**4*
     -            (416*MW**6*
     -            MZ**2 -
     -            1000*MW**4*
     -            MZ**4 +
     -            1013*MW**2*
     -            MZ**6 - 357*MZ**8
     -            ))*
     -         Arg(-MH**2 +
     -           2*MZ**2 +
     -           (0,1)*MH*
     -            Csqrt2(-MH**2 +
     -            4*MZ**2)))/
     -       (MW**4*
     -         (-MH**2 + 4*MZ**2)**
     -          0.5) -
     -      (9*MH*
     -         (MH**4 -
     -           4*MH**2*MW**2 +
     -           12*MW**4)*MZ**6*
     -         (8*MW**4 -
     -           34*MW**2*MZ**2 +
     -           17*MZ**4)*
     -         Arg(-MH +
     -           (0,1)*
     -            Csqrt2(-MH**2 +
     -            4*MW**2))*
     -         Csqrt2(-MH**2 +
     -           4*MW**2))/MW**8 +
     -      (9*MH*
     -         (MH**4 -
     -           4*MH**2*MW**2 +
     -           12*MW**4)*MZ**6*
     -         (8*MW**4 -
     -           34*MW**2*MZ**2 +
     -           17*MZ**4)*
     -         Arg(MH +
     -           (0,1)*
     -            Csqrt2(-MH**2 +
     -            4*MW**2))*
     -         Csqrt2(-MH**2 +
     -           4*MW**2))/MW**8 -
     -      (9*MH*
     -         (MH**4 -
     -           4*MH**2*MW**2 +
     -           12*MW**4)*MZ**6*
     -         (8*MW**4 -
     -           34*MW**2*MZ**2 +
     -           17*MZ**4)*
     -         Arg(MH**2 -
     -           2*MW**2 +
     -           (0,1)*MH*
     -            Csqrt2(-MH**2 +
     -            4*MW**2))*
     -         Csqrt2(-MH**2 +
     -           4*MW**2))/MW**8 +
     -      (9*MH*
     -         (MH**4 -
     -           4*MH**2*MW**2 +
     -           12*MW**4)*MZ**6*
     -         (8*MW**4 -
     -           34*MW**2*MZ**2 +
     -           17*MZ**4)*
     -         Arg(-MH**2 +
     -           2*MW**2 +
     -           (0,1)*MH*
     -            Csqrt2(-MH**2 +
     -            4*MW**2))*
     -         Csqrt2(-MH**2 +
     -           4*MW**2))/MW**8 -
     -      (432*(MW - MZ)*
     -         (2*MW - MZ)*
     -         (MW + MZ)*
     -         (2*MW + MZ)*
     -         (MW**2 + MZ**2)**2*
     -         (2*MW**2 + MZ**2)*
     -         li2(1d0 + MZ**2/MW**2)
     -         )/MW**2 -
     -      5184*MW**2*(MW - MZ)*
     -       (2*MW - MZ)*(MW + MZ)*
     -       (2*MW + MZ)*
     -       (MW**2 + 2*MZ**2)*
     -       li2(-2d0/
     -         (-1d0 +
     -           Csqrt2(1 -
     -            (4*MW**2)/MZ**2))
     -         ) -
     -      5184*MW**2*(MW - MZ)*
     -       (2*MW - MZ)*(MW + MZ)*
     -       (2*MW + MZ)*
     -       (MW**2 + 2*MZ**2)*
     -       li2(2d0/
     -         (1d0 +
     -           Csqrt2(1 -
     -            (4*MW**2)/MZ**2))
     -         ) +
     -      (18*(MW - MZ)*
     -         (MW + MZ)*
     -         (12*MW**4*MZ**6*
     -            (32*MW**4 -
     -            40*MW**2*MZ**2 +
     -            17*MZ**4) +
     -           MH**6*
     -            (-64*MW**8 +
     -            88*MW**6*MZ**2 -
     -            60*MW**4*MZ**4 -
     -            17*MW**2*MZ**6 +
     -            17*MZ**8) +
     -           3*MH**4*
     -            (96*MW**8*
     -           MZ**2 -
     -            136*MW**6*
     -           MZ**4 +
     -            119*MW**4*
     -           MZ**6 -
     -            34*MW**2*MZ**8)
     -            - 18*MH**2*
     -            (32*MW**8*
     -           MZ**4 -
     -            40*MW**6*MZ**6 +
     -            17*MW**4*MZ**8))*
     -         log2(MH))/MW**8 +
     -      (216*MZ**6*
     -         (-24*MW**8*MZ**2 +
     -           15*MW**6*MZ**4 +
     -           MT**6*
     -            (8*MW**4 -
     -            34*MW**2*MZ**2 +
     -            17*MZ**4) -
     -           3*MT**2*
     -            (8*MW**8 -
     -            34*MW**6*MZ**2 +
     -            17*MW**4*MZ**4))*
     -         log2(MT))/MW**8 -
     -      (108*(MT - MW)**2*
     -         (MT + MW)**2*
     -         (MT**2 + 2*MW**2)*
     -         MZ**6*
     -         (8*MW**4 -
     -           34*MW**2*MZ**2 +
     -           17*MZ**4)*
     -         log2(MT - MW))/MW**8
     -        + (18*
     -         (6*MW**6*MZ**6*
     -            (-8*MH**4 -
     -            102*MH**2*
     -           MZ**2 + 397*MZ**4)
     -             + 2*MW**4*MZ**6*
     -            (4*MH**6 +
     -            102*MH**4*
     -           MZ**2 +
     -            153*MH**2*
     -           MZ**4 - 1101*MZ**6
     -            ) -
     -           34*MW**2*MZ**8*
     -            (MH**6 +
     -            3*MH**4*MZ**2 -
     -            6*MZ**6) +
     -           17*MZ**10*
     -            (MH**6 + MZ**6)
     -            + 288*MW**12*
     -            MZ**2*
     -            (MZ**2 -
     -            3*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4))
     -            + 384*MW**14*
     -            (MZ**2 +
     -            3*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4))
     -            + 8*MW**8*MZ**6*
     -            (18*MH**2 +
     -            199*MZ**2 +
     -            18*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4))
     -            - 16*MW**10*
     -            MZ**4*
     -            (76*MZ**2 +
     -            27*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4)))*
     -         log2(MW))/MW**8 -
     -      (108*(MT - MW)**2*
     -         (MT + MW)**2*
     -         (MT**2 + 2*MW**2)*
     -         MZ**6*
     -         (8*MW**4 -
     -           34*MW**2*MZ**2 +
     -           17*MZ**4)*
     -         log2(MT + MW))/MW**8
     -        - (6*
     -         (-7218*MW**4*
     -            MZ**12 +
     -           612*MW**2*
     -           MZ**14 +
     -           51*MZ**16 +
     -           9*MH**4*MW**4*
     -            MZ**2*
     -            (96*MW**6 -
     -            232*MW**4*
     -           MZ**2 +
     -            239*MW**2*
     -           MZ**4 - 85*MZ**6)
     -            - 3*MH**6*MW**4*
     -            (64*MW**6 -
     -            152*MW**4*
     -           MZ**2 +
     -            148*MW**2*
     -           MZ**4 - 51*MZ**6)
     -            - 54*MH**2*MW**4*
     -            MZ**4*
     -            (32*MW**6 -
     -            80*MW**4*MZ**2 +
     -            91*MW**2*MZ**4 -
     -            34*MZ**6) +
     -           2*MW**6*MZ**10*
     -            (4257 -
     -            (0,1088)*Pi) +
     -           32*MW**12*MZ**2*
     -            (MZ**2*
     -            (27 + (0,416)*Pi)
     -             - 81*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4))
     -            + 128*MW**14*
     -            (MZ**2*
     -            (9 - (0,32)*Pi)
     -            + 27*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4))
     -            - 48*MW**10*
     -            (8*MZ**6*
     -            (8 + (0,43)*Pi)
     -            + 27*MZ**4*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4))
     -            + MW**8*
     -            (8*MZ**8*
     -            (471 +
     -            (0,1184)*Pi) +
     -            432*MZ**6*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4)))*
     -         log2(MZ))/MW**8 +
     -      (-108*MT**4*MZ**6*
     -          (8*MW**4 -
     -            34*MW**2*MZ**2 +
     -            17*MZ**4) +
     -         12*MT**2*MW**2*
     -          (10240*MW**10 -
     -            34816*MW**8*
     -            MZ**2 +
     -            47136*MW**6*
     -            MZ**4 -
     -            30664*MW**4*
     -            MZ**6 +
     -            8767*MW**2*
     -            MZ**8 -
     -            663*MZ**10) +
     -         2*(MW**2 - MZ**2)*
     -          (-153*MZ**8*
     -            (MH**4 + MZ**4)
     -            + 288*MW**12*
     -            (-240 + Pi**2) +
     -            MW**2*MZ**6*
     -            (612*MH**4 -
     -            918*MH**2*
     -           MZ**2 +
     -            MZ**4*
     -            (5289 -
     -            (0,7710)*Pi -
     -            2056*Pi**2 +
     -            12336*li2(2d0))) +
     -            8*MW**10*
     -            ((0,648)*Pi*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4) -
     -            MZ**2*
     -            (431*Pi**2 -
     -            16*
     -            (623 +
     -            192*li2(2d0)) +
     -            (0,24)*Pi*
     -            (151 +
     -            64*log2(2) +
     -            32*log2(Pi)))) +
     -            12*MW**6*
     -            (48*MH**4*
     -           MZ**2 -
     -            144*MH**2*
     -           MZ**4 -
     -            (0,54)*MZ**4*Pi*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4) -
     -            MZ**6*
     -            (2989 +
     -            1088*Pi**2 -
     -            6528*li2(2d0) +
     -            (0,12)*Pi*
     -            (527 +
     -            152*log2(2) +
     -            76*log2(Pi)))) +
     -            MW**4*
     -            (-792*MH**4*
     -            MZ**4 +
     -            2160*MH**2*
     -            MZ**6 +
     -            2*MZ**8*
     -            (5557 +
     -            4142*Pi**2 -
     -            24960*li2(2d0) +
     -            (0,6)*Pi*
     -            (3253 +
     -            544*log2(2) +
     -            272*log2(Pi))))
     -            + 4*MW**8*
     -            ((0,324)*MZ**2*
     -            Pi*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4) +
     -            MZ**4*
     -            (2659*Pi**2 -
     -            12*
     -            (221 +
     -            1280*li2(2d0)) +
     -            (0,12)*Pi*
     -            (1583 +
     -            576*log2(2) +
     -            288*log2(Pi))))))
     -        /MW**6 -
     -      2592*(-2*MW + MZ)*
     -       (-MW + MZ)*(MW + MZ)*
     -       (2*MW + MZ)*
     -       (2*MW**2 + MZ**2)*
     -       Csqrt2(-4*MW**2*
     -          MZ**2 + MZ**4)*
     -       log2(-0.5 +
     -         (0.5*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4))/
     -          MZ**2)))/
     -  ((MW - MZ)**3*(MW + MZ)**3)
      Width_Z2uu_EW=prefactor*DBLE(res)
      IF(ischeme.EQ.1)RETURN
      ! Gmu scheme, diff/|Born ME|^2 = 2d0*dZe1_Gmu_MZ(0)
      resdiff=2d0*dZe1_Gmu_MZ(0)*EL**2*MZ**2*(9d0-24d0*Decay_R_SW2
     $     +32d0*Decay_R_SW2**2)/6d0/Decay_R_CW2/Decay_R_SW2
      Width_Z2uu_EW=Width_Z2uu_EW+prefactor*DBLE(resdiff)
      RETURN
      END

      FUNCTION Width_Z2dd_EW(ischeme)
      USE ParamModule
      USE mis_warp
      USE Func_PSI
      IMPLICIT NONE
      INTEGER::ischeme
      REAL(KIND(1d0))::EL,MT,MW,MZ,MH
      COMPLEX(KIND(1d0))::res,resdiff,C0F
      COMPLEX(KIND(1d0)),DIMENSION(4)::C0RES
      REAL(KIND(1d0))::Width_Z2dd_EW
      REAL(KIND(1d0))::prefactor
      COMPLEX(KIND(1d0)),EXTERNAL::dZe1_Gmu_MZ
      IF(ischeme.NE.1.AND.ischeme.NE.2)THEN
         WRITE(*,*)"ERROR:Unkonwn scheme:",ischeme
         WRITE(*,*)"Please choose 1(alpha(MZ)) or 2(Gmu)"
         STOP
      ENDIF
      EL=Decay_e
      MT=Decay_MT
      MW=Decay_MW
      MH=Decay_MH
      MZ=Decay_MZ
      prefactor=1d0/48d0/pi/MZ
      res=(4.8862453531219986e-6*
     -    EL**4*
     -    ((12*
     -         (MW**2*MZ**4*
     -            (256*MW**8 -
     -            640*MW**6*
     -           MZ**2 +
     -            744*MW**4*
     -           MZ**4 -
     -            376*MW**2*
     -           MZ**6 + 97*MZ**8)
     -            - 2*MT**4*
     -            (2560*MW**10 -
     -            6784*MW**8*
     -            MZ**2 +
     -            8184*MW**6*
     -            MZ**4 -
     -            5740*MW**4*
     -            MZ**6 +
     -            1723*MW**2*
     -            MZ**8 -
     -            105*MZ**10) +
     -           MT**2*
     -            (-512*MW**10*
     -            MZ**2 +
     -            1280*MW**8*
     -            MZ**4 -
     -            1488*MW**6*
     -            MZ**6 +
     -            644*MW**4*
     -           MZ**8 -
     -            464*MW**2*
     -            MZ**10 +
     -            135*MZ**12))*
     -         Arg(2*MT**2 +
     -           (0,1)*MZ*
     -            ((0,1)*MZ +
     -            Csqrt2(4*MT**2 -
     -            MZ**2))))/
     -       (MW**4*MZ*
     -         (4*MT**2 - MZ**2)**
     -          0.5) -
     -      (9*MZ**5*
     -         (4*MW**2 - MZ**2)**
     -          1.5*
     -         (4*MW**4 +
     -           10*MW**2*MZ**2 -
     -           5*MZ**4)*
     -         (12*MW**4 +
     -           20*MW**2*MZ**2 +
     -           MZ**4)*
     -         Arg(-2*MW**2 +
     -           MZ*
     -            (MZ +
     -            (0,1)*
     -            Csqrt2(4*MW**2 -
     -            MZ**2))))/MW**8
     -       - (9*MZ**5*
     -         (4*MW**2 - MZ**2)**
     -          1.5*
     -         (4*MW**4 +
     -           10*MW**2*MZ**2 -
     -           5*MZ**4)*
     -         (12*MW**4 +
     -           20*MW**2*MZ**2 +
     -           MZ**4)*
     -         Arg(-MZ +
     -           (0,1)*
     -            Csqrt2(4*MW**2 -
     -            MZ**2)))/MW**8 +
     -      (9*MZ**5*
     -         (4*MW**2 - MZ**2)**
     -          1.5*
     -         (4*MW**4 +
     -           10*MW**2*MZ**2 -
     -           5*MZ**4)*
     -         (12*MW**4 +
     -           20*MW**2*MZ**2 +
     -           MZ**4)*
     -         Arg(MZ +
     -           (0,1)*
     -            Csqrt2(4*MW**2 -
     -            MZ**2)))/MW**8 +
     -      (9*(2*MW - MZ)*
     -         (2*MW + MZ)*
     -         (1920*MW**16 -
     -           1920*MW**14*
     -            MZ**2 +
     -           432*MW**12*
     -           MZ**4 +
     -           2808*MW**10*
     -            MZ**6 -
     -           676*MW**8*MZ**8 +
     -           538*MW**6*
     -           MZ**10 -
     -           504*MW**4*
     -           MZ**12 +
     -           70*MW**2*MZ**14 +
     -           5*MZ**16)*
     -         Arg(2*MW**2 +
     -           (0,1)*MZ*
     -            ((0,1)*MZ +
     -            Csqrt2(4*MW**2 -
     -            MZ**2))))/
     -       (MW**8*MZ*
     -         (4*MW**2 - MZ**2)**
     -          0.5) +
     -      (9*MH*
     -         (4*MH**2*MZ**4*
     -            (64*MW**6 -
     -            68*MW**4*MZ**2 +
     -            142*MW**2*
     -           MZ**4 - 75*MZ**6)
     -            + MH**6*
     -            (16*MW**6 -
     -            20*MW**4*MZ**2 +
     -            28*MW**2*MZ**4 -
     -            15*MZ**6) +
     -           12*MZ**6*
     -            (-24*MW**6 +
     -            20*MW**4*MZ**2 -
     -            67*MW**2*MZ**4 +
     -            35*MZ**6) +
     -           MH**4*
     -            (-104*MW**6*
     -            MZ**2 +
     -            124*MW**4*
     -           MZ**4 -
     -            197*MW**2*
     -           MZ**6 + 105*MZ**8)
     -           )*
     -         Arg(-MH +
     -           (0,1)*
     -            Csqrt2(-MH**2 +
     -            4*MZ**2)))/
     -       (MW**4*
     -         (-MH**2 + 4*MZ**2)**
     -          0.5) +
     -      (9*MH*
     -         (12*MZ**6*
     -            (24*MW**6 -
     -            20*MW**4*MZ**2 +
     -            67*MW**2*MZ**4 -
     -            35*MZ**6) +
     -           MH**6*
     -            (-16*MW**6 +
     -            20*MW**4*MZ**2 -
     -            28*MW**2*MZ**4 +
     -            15*MZ**6) +
     -           4*MH**2*MZ**4*
     -            (-64*MW**6 +
     -            68*MW**4*MZ**2 -
     -            142*MW**2*
     -           MZ**4 + 75*MZ**6)
     -            + MH**4*
     -            (104*MW**6*
     -            MZ**2 -
     -            124*MW**4*
     -           MZ**4 +
     -            197*MW**2*
     -           MZ**6 - 105*MZ**8)
     -           )*
     -         Arg(MH +
     -           (0,1)*
     -            Csqrt2(-MH**2 +
     -            4*MZ**2)))/
     -       (MW**4*
     -         (-MH**2 + 4*MZ**2)**
     -          0.5) +
     -      (9*MH*
     -         (4*MH**2*MZ**4*
     -            (64*MW**6 -
     -            68*MW**4*MZ**2 +
     -            142*MW**2*
     -           MZ**4 - 75*MZ**6)
     -            + MH**6*
     -            (16*MW**6 -
     -            20*MW**4*MZ**2 +
     -            28*MW**2*MZ**4 -
     -            15*MZ**6) +
     -           12*MZ**6*
     -            (-24*MW**6 +
     -            20*MW**4*MZ**2 -
     -            67*MW**2*MZ**4 +
     -            35*MZ**6) +
     -           MH**4*
     -            (-104*MW**6*
     -            MZ**2 +
     -            124*MW**4*
     -           MZ**4 -
     -            197*MW**2*
     -           MZ**6 + 105*MZ**8)
     -           )*
     -         Arg(MH**2 -
     -           2*MZ**2 +
     -           (0,1)*MH*
     -            Csqrt2(-MH**2 +
     -            4*MZ**2)))/
     -       (MW**4*
     -         (-MH**2 + 4*MZ**2)**
     -          0.5) +
     -      (9*MH*
     -         (12*MZ**6*
     -            (24*MW**6 -
     -            20*MW**4*MZ**2 +
     -            67*MW**2*MZ**4 -
     -            35*MZ**6) +
     -           MH**6*
     -            (-16*MW**6 +
     -            20*MW**4*MZ**2 -
     -            28*MW**2*MZ**4 +
     -            15*MZ**6) +
     -           4*MH**2*MZ**4*
     -            (-64*MW**6 +
     -            68*MW**4*MZ**2 -
     -            142*MW**2*
     -           MZ**4 + 75*MZ**6)
     -            + MH**4*
     -            (104*MW**6*
     -            MZ**2 -
     -            124*MW**4*
     -           MZ**4 +
     -            197*MW**2*
     -           MZ**6 - 105*MZ**8)
     -           )*
     -         Arg(-MH**2 +
     -           2*MZ**2 +
     -           (0,1)*MH*
     -            Csqrt2(-MH**2 +
     -            4*MZ**2)))/
     -       (MW**4*
     -         (-MH**2 + 4*MZ**2)**
     -          0.5) +
     -      (9*MH*
     -         (MH**4 -
     -           4*MH**2*MW**2 +
     -           12*MW**4)*MZ**6*
     -         (4*MW**4 +
     -           10*MW**2*MZ**2 -
     -           5*MZ**4)*
     -         Arg(-MH +
     -           (0,1)*
     -            Csqrt2(-MH**2 +
     -            4*MW**2))*
     -         Csqrt2(-MH**2 +
     -           4*MW**2))/MW**8 -
     -      (9*MH*
     -         (MH**4 -
     -           4*MH**2*MW**2 +
     -           12*MW**4)*MZ**6*
     -         (4*MW**4 +
     -           10*MW**2*MZ**2 -
     -           5*MZ**4)*
     -         Arg(MH +
     -           (0,1)*
     -            Csqrt2(-MH**2 +
     -            4*MW**2))*
     -         Csqrt2(-MH**2 +
     -           4*MW**2))/MW**8 +
     -      (9*MH*
     -         (MH**4 -
     -           4*MH**2*MW**2 +
     -           12*MW**4)*MZ**6*
     -         (4*MW**4 +
     -           10*MW**2*MZ**2 -
     -           5*MZ**4)*
     -         Arg(MH**2 -
     -           2*MW**2 +
     -           (0,1)*MH*
     -            Csqrt2(-MH**2 +
     -            4*MW**2))*
     -         Csqrt2(-MH**2 +
     -           4*MW**2))/MW**8 -
     -      (9*MH*
     -         (MH**4 -
     -           4*MH**2*MW**2 +
     -           12*MW**4)*MZ**6*
     -         (4*MW**4 +
     -           10*MW**2*MZ**2 -
     -           5*MZ**4)*
     -         Arg(-MH**2 +
     -           2*MW**2 +
     -           (0,1)*MH*
     -            Csqrt2(-MH**2 +
     -            4*MW**2))*
     -         Csqrt2(-MH**2 +
     -           4*MW**2))/MW**8 -
     -      (432*(MW - MZ)*
     -         (2*MW - MZ)*
     -         (MW + MZ)*
     -         (2*MW + MZ)*
     -         (MW**2 + MZ**2)**2*
     -         (2*MW**2 + MZ**2)*
     -         li2(1 + MZ**2/MW**2)
     -         )/MW**2 -
     -      5184*MW**2*(MW - MZ)*
     -       (MW + MZ)*
     -       (2*MW**2 + MZ**2)*
     -       (MW**2 + 2*MZ**2)*
     -       li2(-2/
     -         (-1 +
     -           Csqrt2(1 -
     -            (4*MW**2)/MZ**2))
     -         ) -
     -      5184*MW**2*(MW - MZ)*
     -       (MW + MZ)*
     -       (2*MW**2 + MZ**2)*
     -       (MW**2 + 2*MZ**2)*
     -       li2(2/
     -         (1 +
     -           Csqrt2(1 -
     -            (4*MW**2)/MZ**2))
     -         ) +
     -      (18*(MW - MZ)*
     -         (MW + MZ)*
     -         (12*MW**4*MZ**6*
     -            (8*MW**4 -
     -            4*MW**2*MZ**2 +
     -            5*MZ**4) +
     -           MH**6*
     -            (-16*MW**8 +
     -            4*MW**6*MZ**2 -
     -            24*MW**4*MZ**4 -
     -            5*MW**2*MZ**6 +
     -            5*MZ**8) +
     -           3*MH**4*
     -            (24*MW**8*
     -           MZ**2 -
     -            4*MW**6*MZ**4 +
     -            35*MW**4*MZ**6 -
     -            10*MW**2*MZ**8)
     -            - 18*MH**2*
     -            (8*MW**8*MZ**4 -
     -            4*MW**6*MZ**6 +
     -            5*MW**4*MZ**8))*
     -         log2(MH))/MW**8 +
     -      (216*MZ**6*
     -         (-8*MW**10 -
     -           8*MW**8*MZ**2 +
     -           7*MW**6*MZ**4 +
     -           MT**6*
     -            (-4*MW**4 -
     -            10*MW**2*MZ**2 +
     -            5*MZ**4) +
     -           3*MT**2*
     -            (4*MW**8 +
     -            10*MW**6*MZ**2 -
     -            5*MW**4*MZ**4))*
     -         log2(MT))/MW**8 +
     -      (108*(MT - MW)**2*
     -         (MT + MW)**2*
     -         (MT**2 + 2*MW**2)*
     -         MZ**6*
     -         (4*MW**4 +
     -           10*MW**2*MZ**2 -
     -           5*MZ**4)*
     -         log2(MT - MW))/MW**8
     -        + (18*
     -         (288*MW**12*MZ**4 +
     -           6*MW**6*MZ**6*
     -            (4*MH**4 -
     -            30*MH**2*MZ**2 +
     -            113*MZ**4) -
     -           10*MW**2*MZ**8*
     -            (MH**6 +
     -            3*MH**4*MZ**2 -
     -            6*MZ**6) +
     -           5*MZ**10*
     -            (MH**6 + MZ**6)
     -            + MW**4*
     -            (-4*MH**6*
     -           MZ**6 +
     -            60*MH**4*MZ**8 +
     -            90*MH**2*
     -           MZ**10 -
     -            654*MZ**12) +
     -           8*MW**8*MZ**6*
     -            (-9*MH**2 +
     -            124*MZ**2 -
     -            18*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4))
     -            + MW**14*
     -            (384*MZ**2 +
     -            576*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4))
     -            + MW**10*
     -            (-304*MZ**6 -
     -            432*MZ**4*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4)))*
     -         log2(MW))/MW**8 +
     -      (108*(MT - MW)**2*
     -         (MT + MW)**2*
     -         (MT**2 + 2*MW**2)*
     -         MZ**6*
     -         (4*MW**4 +
     -           10*MW**2*MZ**2 -
     -           5*MZ**4)*
     -         log2(MT + MW))/MW**8
     -        - (6*
     -         (-2142*MW**4*
     -            MZ**12 +
     -           180*MW**2*
     -           MZ**14 +
     -           15*MZ**16 +
     -           9*MH**4*MW**4*
     -            MZ**2*
     -            (24*MW**6 -
     -            28*MW**4*MZ**2 +
     -            47*MW**2*MZ**4 -
     -            25*MZ**6) -
     -           54*MH**2*MW**4*
     -            MZ**4*
     -            (8*MW**6 -
     -            8*MW**4*MZ**2 +
     -            19*MW**2*MZ**4 -
     -            10*MZ**6) +
     -           MH**6*
     -            (-48*MW**10 +
     -            60*MW**8*MZ**2 -
     -            84*MW**6*MZ**4 +
     -            45*MW**4*MZ**6)
     -            + 10*MW**6*
     -            MZ**10*
     -            (225 - (0,16)*Pi)
     -             + 32*MW**12*
     -            MZ**4*
     -            (27 + (0,20)*Pi)
     -            + 64*MW**14*
     -            (2*MZ**2*
     -            (9 - (0,2)*Pi) +
     -            27*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4))
     -            - 48*MW**10*
     -            (MZ**6*
     -            (13 + (0,14)*Pi)
     -            + 27*MZ**4*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4))
     -            + MW**8*
     -            (32*MZ**8*
     -            (93 + (0,14)*Pi)
     -            - 432*MZ**6*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4)))*
     -         log2(MZ))/MW**8 +
     -      (108*MT**4*MZ**6*
     -          (4*MW**4 +
     -            10*MW**2*MZ**2 -
     -            5*MZ**4) +
     -         12*MT**2*MW**2*
     -          (2560*MW**10 -
     -            6784*MW**8*
     -            MZ**2 +
     -            8184*MW**6*
     -            MZ**4 -
     -            5668*MW**4*
     -            MZ**6 +
     -            1903*MW**2*
     -            MZ**8 -
     -            195*MZ**10) +
     -         2*(MW**2 - MZ**2)*
     -          (-45*MZ**8*
     -            (MH**4 + MZ**4)
     -            + 288*MW**12*
     -            (-60 + Pi**2) +
     -            MW**2*MZ**6*
     -            (180*MH**4 -
     -            270*MH**2*
     -           MZ**2 +
     -            MZ**4*
     -            (3489 -
     -            (0,510)*Pi -
     -            136*Pi**2 +
     -            816*li2(2))) +
     -            8*MW**10*
     -            ((0,324)*Pi*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4) +
     -            MZ**2*
     -            (49*Pi**2 +
     -            32*
     -            (43 + 6*li2(2))
     -            - (0,24)*Pi*
     -            (31 + log2(16) +
     -            2*log2(Pi)))) +
     -            24*MW**6*
     -            (6*MH**4*MZ**2 -
     -            18*MH**2*MZ**4 +
     -            (0,27)*MZ**4*Pi*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4) -
     -            MZ**6*
     -            (33 + 40*Pi**2 -
     -            240*li2(2) +
     -            (0,3)*Pi*
     -            (149 +
     -            log2(4096) +
     -            6*log2(Pi)))) +
     -            4*MW**8*
     -            ((0,648)*MZ**2*
     -            Pi*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4) +
     -            MZ**4*
     -            (163*Pi**2 -
     -            6*
     -            (701 + 64*li2(2))
     -             + (0,12)*Pi*
     -            (293 +
     -            24*log2(2) +
     -            12*log2(Pi)))) +
     -            MW**4*
     -            (-36*MH**4*
     -            MZ**4 +
     -            216*MH**2*
     -           MZ**6 +
     -            2*MZ**8*
     -            (421 +
     -            206*Pi**2 -
     -            1344*li2(2) +
     -            (0,6)*Pi*
     -            (463 +
     -            40*log2(2) +
     -            20*log2(Pi))))))/
     -       MW**6 +
     -      2592*(-MW + MZ)*
     -       (MW + MZ)*
     -       (2*MW**2 + MZ**2)**2*
     -       Csqrt2(-4*MW**2*
     -          MZ**2 + MZ**4)*
     -       log2(-0.5 +
     -         (0.5*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4))/
     -          MZ**2)))/
     -  ((MW - MZ)**3*(MW + MZ)**3)
      Width_Z2dd_EW=prefactor*DBLE(res)
      IF(ischeme.EQ.1)RETURN
      ! Gmu scheme, diff/|Born ME|^2 = 2d0*dZe1_Gmu_MZ(0)
      resdiff=2d0*dZe1_Gmu_MZ(0)*EL**2*MZ**2*(9d0-12d0*Decay_R_SW2
     $     +8d0*Decay_R_SW2**2)/6d0/Decay_R_CW2/Decay_R_SW2
      Width_Z2dd_EW=Width_Z2dd_EW+prefactor*DBLE(resdiff)
      RETURN
      END

      FUNCTION Width_Z2ll_EW(ischeme)
      USE ParamModule
      USE mis_warp
      USE Func_PSI
      IMPLICIT NONE
      INTEGER::ischeme
      REAL(KIND(1d0))::EL,MT,MW,MZ,MH
      COMPLEX(KIND(1d0))::res,resdiff,C0F
      COMPLEX(KIND(1d0)),DIMENSION(4)::C0RES
      REAL(KIND(1d0))::Width_Z2ll_EW
      REAL(KIND(1d0))::prefactor
      COMPLEX(KIND(1d0)),EXTERNAL::dZe1_Gmu_MZ
      IF(ischeme.NE.1.AND.ischeme.NE.2)THEN
         WRITE(*,*)"ERROR:Unkonwn scheme:",ischeme
         WRITE(*,*)"Please choose 1(alpha(MZ)) or 2(Gmu)"
         STOP
      ENDIF
      EL=Decay_e
      MT=Decay_MT
      MW=Decay_MW
      MH=Decay_MH
      MZ=Decay_MZ
      prefactor=1d0/48d0/pi/MZ
      res= (0.000014658736059365997*
     -    EL**4*
     -    ((12*
     -         (MW**2*MZ**4*
     -            (256*MW**8 -
     -            896*MW**6*
     -           MZ**2 +
     -            1160*MW**4*
     -            MZ**4 -
     -            632*MW**2*
     -           MZ**6 + 121*MZ**8)
     -             - 2*MT**4*
     -            (2560*MW**10 -
     -            9344*MW**8*
     -            MZ**2 +
     -            13304*MW**6*
     -            MZ**4 -
     -            8852*MW**4*
     -            MZ**6 +
     -            2419*MW**2*
     -            MZ**8 -
     -            105*MZ**10) +
     -           MT**2*
     -            (-512*MW**10*
     -            MZ**2 +
     -            1792*MW**8*
     -            MZ**4 -
     -            2320*MW**6*
     -            MZ**6 +
     -            1372*MW**4*
     -            MZ**8 -
     -            512*MW**2*
     -            MZ**10 +
     -            135*MZ**12))*
     -         Arg(2*MT**2 +
     -           (0,1)*MZ*
     -            ((0,1)*MZ +
     -            Csqrt2(4*MT**2 -
     -            MZ**2))))/
     -       (MW**4*MZ*
     -         (4*MT**2 - MZ**2)**
     -          0.5) +
     -      (9*MZ**5*
     -         (4*MW**2 - MZ**2)**
     -          1.5*
     -         (12*MW**4 +
     -           20*MW**2*MZ**2 +
     -           MZ**4)*
     -         (4*MW**4 -
     -           10*MW**2*MZ**2 +
     -           5*MZ**4)*
     -         Arg(-2*MW**2 +
     -           MZ*
     -            (MZ +
     -            (0,1)*
     -            Csqrt2(4*MW**2 -
     -            MZ**2))))/MW**8
     -       + (9*MZ**5*
     -         (4*MW**2 - MZ**2)**
     -          1.5*
     -         (12*MW**4 +
     -           20*MW**2*MZ**2 +
     -           MZ**4)*
     -         (4*MW**4 -
     -           10*MW**2*MZ**2 +
     -           5*MZ**4)*
     -         Arg(-MZ +
     -           (0,1)*
     -            Csqrt2(4*MW**2 -
     -            MZ**2)))/MW**8 -
     -      (9*MZ**5*
     -         (4*MW**2 - MZ**2)**
     -          1.5*
     -         (12*MW**4 +
     -           20*MW**2*MZ**2 +
     -           MZ**4)*
     -         (4*MW**4 -
     -           10*MW**2*MZ**2 +
     -           5*MZ**4)*
     -         Arg(MZ +
     -           (0,1)*
     -            Csqrt2(4*MW**2 -
     -            MZ**2)))/MW**8 +
     -      (9*(2*MW - MZ)*
     -         (2*MW + MZ)*
     -         (1920*MW**16 -
     -           3840*MW**14*
     -            MZ**2 +
     -           368*MW**12*
     -           MZ**4 +
     -           3640*MW**10*
     -            MZ**6 -
     -           2020*MW**8*
     -           MZ**8 +
     -           650*MW**6*
     -           MZ**10 -
     -           496*MW**4*
     -           MZ**12 +
     -           70*MW**2*MZ**14 +
     -           5*MZ**16)*
     -         Arg(2*MW**2 +
     -           (0,1)*MZ*
     -            ((0,1)*MZ +
     -            Csqrt2(4*MW**2 -
     -            MZ**2))))/
     -       (MW**8*MZ*
     -         (4*MW**2 - MZ**2)**
     -          0.5) +
     -      (9*MH*
     -         (4*MH**2*MZ**4*
     -            (64*MW**6 -
     -            188*MW**4*
     -           MZ**2 +
     -            206*MW**2*
     -           MZ**4 - 75*MZ**6)
     -            + MH**6*
     -            (16*MW**6 -
     -            44*MW**4*MZ**2 +
     -            44*MW**2*MZ**4 -
     -            15*MZ**6) +
     -           12*MZ**6*
     -            (-24*MW**6 +
     -            76*MW**4*MZ**2 -
     -            91*MW**2*MZ**4 +
     -            35*MZ**6) +
     -           MH**4*
     -            (-104*MW**6*
     -            MZ**2 +
     -            292*MW**4*
     -           MZ**4 -
     -            301*MW**2*
     -           MZ**6 + 105*MZ**8)
     -           )*
     -         Arg(-MH +
     -           (0,1)*
     -            Csqrt2(-MH**2 +
     -            4*MZ**2)))/
     -       (MW**4*
     -         (-MH**2 + 4*MZ**2)**
     -          0.5) +
     -      (9*MH*
     -         (12*MZ**6*
     -            (24*MW**6 -
     -            76*MW**4*MZ**2 +
     -            91*MW**2*MZ**4 -
     -            35*MZ**6) +
     -           MH**6*
     -            (-16*MW**6 +
     -            44*MW**4*MZ**2 -
     -            44*MW**2*MZ**4 +
     -            15*MZ**6) +
     -           4*MH**2*MZ**4*
     -            (-64*MW**6 +
     -            188*MW**4*
     -           MZ**2 -
     -            206*MW**2*
     -           MZ**4 + 75*MZ**6)
     -            + MH**4*
     -            (104*MW**6*
     -            MZ**2 -
     -            292*MW**4*
     -           MZ**4 +
     -            301*MW**2*
     -           MZ**6 - 105*MZ**8)
     -           )*
     -         Arg(MH +
     -           (0,1)*
     -            Csqrt2(-MH**2 +
     -            4*MZ**2)))/
     -       (MW**4*
     -         (-MH**2 + 4*MZ**2)**
     -          0.5) +
     -      (9*MH*
     -         (4*MH**2*MZ**4*
     -            (64*MW**6 -
     -            188*MW**4*
     -           MZ**2 +
     -            206*MW**2*
     -           MZ**4 - 75*MZ**6)
     -            + MH**6*
     -            (16*MW**6 -
     -            44*MW**4*MZ**2 +
     -            44*MW**2*MZ**4 -
     -            15*MZ**6) +
     -           12*MZ**6*
     -            (-24*MW**6 +
     -            76*MW**4*MZ**2 -
     -            91*MW**2*MZ**4 +
     -            35*MZ**6) +
     -           MH**4*
     -            (-104*MW**6*
     -            MZ**2 +
     -            292*MW**4*
     -           MZ**4 -
     -            301*MW**2*
     -           MZ**6 + 105*MZ**8)
     -           )*
     -         Arg(MH**2 -
     -           2*MZ**2 +
     -           (0,1)*MH*
     -            Csqrt2(-MH**2 +
     -            4*MZ**2)))/
     -       (MW**4*
     -         (-MH**2 + 4*MZ**2)**
     -          0.5) +
     -      (9*MH*
     -         (12*MZ**6*
     -            (24*MW**6 -
     -            76*MW**4*MZ**2 +
     -            91*MW**2*MZ**4 -
     -            35*MZ**6) +
     -           MH**6*
     -            (-16*MW**6 +
     -            44*MW**4*MZ**2 -
     -            44*MW**2*MZ**4 +
     -            15*MZ**6) +
     -           4*MH**2*MZ**4*
     -            (-64*MW**6 +
     -            188*MW**4*
     -           MZ**2 -
     -            206*MW**2*
     -           MZ**4 + 75*MZ**6)
     -            + MH**4*
     -            (104*MW**6*
     -            MZ**2 -
     -            292*MW**4*
     -           MZ**4 +
     -            301*MW**2*
     -           MZ**6 - 105*MZ**8)
     -           )*
     -         Arg(-MH**2 +
     -           2*MZ**2 +
     -           (0,1)*MH*
     -            Csqrt2(-MH**2 +
     -            4*MZ**2)))/
     -       (MW**4*
     -         (-MH**2 + 4*MZ**2)**
     -          0.5) -
     -      (9*MH*
     -         (MH**4 -
     -           4*MH**2*MW**2 +
     -           12*MW**4)*MZ**6*
     -         (4*MW**4 -
     -           10*MW**2*MZ**2 +
     -           5*MZ**4)*
     -         Arg(-MH +
     -           (0,1)*
     -            Csqrt2(-MH**2 +
     -            4*MW**2))*
     -         Csqrt2(-MH**2 +
     -           4*MW**2))/MW**8 +
     -      (9*MH*
     -         (MH**4 -
     -           4*MH**2*MW**2 +
     -           12*MW**4)*MZ**6*
     -         (4*MW**4 -
     -           10*MW**2*MZ**2 +
     -           5*MZ**4)*
     -         Arg(MH +
     -           (0,1)*
     -            Csqrt2(-MH**2 +
     -            4*MW**2))*
     -         Csqrt2(-MH**2 +
     -           4*MW**2))/MW**8 -
     -      (9*MH*
     -         (MH**4 -
     -           4*MH**2*MW**2 +
     -           12*MW**4)*MZ**6*
     -         (4*MW**4 -
     -           10*MW**2*MZ**2 +
     -           5*MZ**4)*
     -         Arg(MH**2 -
     -           2*MW**2 +
     -           (0,1)*MH*
     -            Csqrt2(-MH**2 +
     -            4*MW**2))*
     -         Csqrt2(-MH**2 +
     -           4*MW**2))/MW**8 +
     -      (9*MH*
     -         (MH**4 -
     -           4*MH**2*MW**2 +
     -           12*MW**4)*MZ**6*
     -         (4*MW**4 -
     -           10*MW**2*MZ**2 +
     -           5*MZ**4)*
     -         Arg(-MH**2 +
     -           2*MW**2 +
     -           (0,1)*MH*
     -            Csqrt2(-MH**2 +
     -            4*MW**2))*
     -         Csqrt2(-MH**2 +
     -           4*MW**2))/MW**8 -
     -      (432*(MW - MZ)*MZ**2*
     -         (MW + MZ)*
     -         (2*MW**2 - MZ**2)*
     -         (MW**2 + MZ**2)**2*
     -         li2(1 + MZ**2/MW**2)
     -         )/MW**2 -
     -      1728*MW**2*(MW - MZ)*
     -       (MW + MZ)*
     -       (2*MW**2 - MZ**2)*
     -       (MW**2 + 2*MZ**2)*
     -       li2(-2/
     -         (-1 +
     -           Csqrt2(1 -
     -            (4*MW**2)/MZ**2))
     -         ) -
     -      1728*MW**2*(MW - MZ)*
     -       (MW + MZ)*
     -       (2*MW**2 - MZ**2)*
     -       (MW**2 + 2*MZ**2)*
     -       li2(2/
     -         (1 +
     -           Csqrt2(1 -
     -            (4*MW**2)/MZ**2))
     -         ) +
     -      (18*(MW - MZ)*
     -         (MW + MZ)*
     -         (12*MW**4*MZ**6*
     -            (8*MW**4 -
     -            12*MW**2*MZ**2 +
     -            5*MZ**4) +
     -           MH**6*
     -            (-16*MW**8 +
     -            28*MW**6*MZ**2 -
     -            16*MW**4*MZ**4 -
     -            5*MW**2*MZ**6 +
     -            5*MZ**8) +
     -           3*MH**4*
     -            (24*MW**8*
     -           MZ**2 -
     -            44*MW**6*MZ**4 +
     -            35*MW**4*MZ**6 -
     -            10*MW**2*MZ**8)
     -            - 18*MH**2*
     -            (8*MW**8*MZ**4 -
     -            12*MW**6*MZ**6 +
     -            5*MW**4*MZ**8))*
     -         log2(MH))/MW**8 +
     -      (72*MZ**6*
     -         (3*MT**6*
     -            (4*MW**4 -
     -            10*MW**2*MZ**2 +
     -            5*MZ**4) +
     -           MW**6*
     -            (8*MW**4 -
     -            24*MW**2*MZ**2 +
     -            13*MZ**4) -
     -           9*MT**2*
     -            (4*MW**8 -
     -            10*MW**6*MZ**2 +
     -            5*MW**4*MZ**4))*
     -         log2(MT))/MW**8 -
     -      (108*(MT - MW)**2*
     -         (MT + MW)**2*
     -         (MT**2 + 2*MW**2)*
     -         MZ**6*
     -         (4*MW**4 -
     -           10*MW**2*MZ**2 +
     -           5*MZ**4)*
     -         log2(MT - MW))/MW**8
     -        + (18*
     -         (6*MW**6*MZ**6*
     -            (-4*MH**4 -
     -            30*MH**2*MZ**2 +
     -            129*MZ**4) +
     -           2*MW**4*MZ**6*
     -            (2*MH**6 +
     -            30*MH**4*MZ**2 +
     -            45*MH**2*MZ**4 -
     -            323*MZ**6) -
     -           10*MW**2*MZ**8*
     -            (MH**6 +
     -            3*MH**4*MZ**2 -
     -            6*MZ**6) +
     -           5*MZ**10*
     -            (MH**6 + MZ**6)
     -            + 96*MW**12*
     -            MZ**2*
     -            (MZ**2 -
     -            2*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4))
     -            + 192*MW**14*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4) +
     -           8*MW**8*MZ**6*
     -            (9*MH**2 +
     -            22*MZ**2 +
     -            6*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4))
     -            + MW**10*
     -            (-304*MZ**6 -
     -            48*MZ**4*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4)))*
     -         log2(MW))/MW**8 -
     -      (108*(MT - MW)**2*
     -         (MT + MW)**2*
     -         (MT**2 + 2*MW**2)*
     -         MZ**6*
     -         (4*MW**4 -
     -           10*MW**2*MZ**2 +
     -           5*MZ**4)*
     -         log2(MT + MW))/MW**8
     -        - (18*
     -         (-706*MW**4*
     -           MZ**12 +
     -           60*MW**2*MZ**14 +
     -           5*MZ**16 +
     -           3*MH**4*MW**4*
     -            MZ**2*
     -            (24*MW**6 -
     -            68*MW**4*MZ**2 +
     -            71*MW**2*MZ**4 -
     -            25*MZ**6) -
     -           18*MH**2*MW**4*
     -            MZ**4*
     -            (8*MW**6 -
     -            24*MW**4*MZ**2 +
     -            27*MW**2*MZ**4 -
     -            10*MZ**6) +
     -           MH**6*
     -            (-16*MW**10 +
     -            44*MW**8*MZ**2 -
     -            44*MW**6*MZ**4 +
     -            15*MW**4*MZ**6)
     -            + 10*MW**6*
     -            MZ**10*
     -            (91 - (0,48)*Pi)
     -            + 96*MW**12*
     -            MZ**2*
     -            (MZ**2*
     -            (1 + (0,28)*Pi)
     -            - 2*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4))
     -            + 192*MW**14*
     -            ((0,-4)*MZ**2*
     -            Pi +
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4))
     -            - 16*MW**10*
     -            (MZ**6*
     -            (17 + (0,222)*Pi)
     -             + 3*MZ**4*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4))
     -            + MW**8*
     -            (16*MZ**8*
     -            (5 + (0,132)*Pi)
     -            + 48*MZ**6*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4)))*
     -         log2(MZ))/MW**8 +
     -      (-108*MT**4*MZ**6*
     -          (4*MW**4 -
     -            10*MW**2*MZ**2 +
     -            5*MZ**4) +
     -         12*MT**2*MW**2*
     -          (2560*MW**10 -
     -            9344*MW**8*
     -            MZ**2 +
     -            13304*MW**6*
     -            MZ**4 -
     -            8924*MW**4*
     -            MZ**6 +
     -            2599*MW**2*
     -            MZ**8 -
     -            195*MZ**10) -
     -         2*(MW**2 - MZ**2)*
     -          (17280*MW**12 +
     -            45*MZ**8*
     -            (MH**4 + MZ**4)
     -            + 9*MW**2*MZ**6*
     -            (-20*MH**4 +
     -            30*MH**2*MZ**2 +
     -            MZ**4*
     -            (111 +
     -            (0,510)*Pi +
     -            136*Pi**2 -
     -            816*li2(2))) -
     -            4*MW**8*MZ**4*
     -            (4466 +
     -            1755*Pi**2 -
     -            10368*li2(2) +
     -            (0,12)*Pi*
     -            (499 +
     -            360*log2(2) +
     -            180*log2(Pi))) +
     -            8*MW**10*
     -            ((0,-108)*Pi*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4) +
     -            MZ**2*
     -            (279*Pi**2 -
     -            16*
     -            (137 +
     -            108*li2(2)) +
     -            (0,48)*Pi*
     -            (20 +
     -            18*log2(2) +
     -            9*log2(Pi)))) +
     -            2*MW**4*
     -            (126*MH**4*
     -            MZ**4 -
     -            324*MH**2*
     -           MZ**6 -
     -            MZ**8*
     -            (7489 +
     -            2574*Pi**2 -
     -            15552*li2(2) +
     -            (0,6)*Pi*
     -            (1543 +
     -            360*log2(2) +
     -            180*log2(Pi))))
     -            + 8*MW**6*MZ**2*
     -            (-18*MH**4 +
     -            54*MH**2*MZ**2 +
     -            (0,27)*MZ**2*Pi*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4) +
     -            MZ**4*
     -            (4279 +
     -            1080*Pi**2 -
     -            6480*li2(2) +
     -            (0,3)*Pi*
     -            (1247 +
     -            612*log2(2) +
     -            306*log2(Pi))))))
     -        /MW**6 -
     -      864*(-MW + MZ)*
     -       (MW + MZ)*
     -       (-2*MW**2 + MZ**2)*
     -       (2*MW**2 + MZ**2)*
     -       Csqrt2(-4*MW**2*
     -          MZ**2 + MZ**4)*
     -       log2(-0.5 +
     -         (0.5*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4))/
     -          MZ**2)))/
     -  ((MW - MZ)**3*(MW + MZ)**3)
      Width_Z2ll_EW=prefactor*DBLE(res)
      IF(ischeme.EQ.1)RETURN
      ! Gmu scheme, diff/|Born ME|^2 = 2d0*dZe1_Gmu_MZ(0)
      resdiff=2d0*dZe1_Gmu_MZ(0)*EL**2*MZ**2*(1d0-4d0*Decay_R_SW2
     $     +8d0*Decay_R_SW2**2)/2d0/Decay_R_CW2/Decay_R_SW2
      Width_Z2ll_EW=Width_Z2ll_EW+prefactor*DBLE(resdiff)
      RETURN
      END

      FUNCTION Width_Z2vv_EW(ischeme)
      USE ParamModule
      USE mis_warp
      USE Func_PSI
      IMPLICIT NONE
      INTEGER::ischeme
      REAL(KIND(1d0))::EL,MT,MW,MZ,MH
      COMPLEX(KIND(1d0))::res,resdiff,C0F
      COMPLEX(KIND(1d0)),DIMENSION(4)::C0RES
      REAL(KIND(1d0))::Width_Z2vv_EW
      REAL(KIND(1d0))::prefactor
      COMPLEX(KIND(1d0)),EXTERNAL::dZe1_Gmu_MZ
      IF(ischeme.NE.1.AND.ischeme.NE.2)THEN
         WRITE(*,*)"ERROR:Unkonwn scheme:",ischeme
         WRITE(*,*)"Please choose 1(alpha(MZ)) or 2(Gmu)"
         STOP
      ENDIF
      EL=Decay_e
      MT=Decay_MT
      MW=Decay_MW
      MH=Decay_MH
      MZ=Decay_MZ
      prefactor=1d0/48d0/pi/MZ
      res=(0.000014658736059365997*
     -    EL**4*MZ**2*
     -    ((12*MZ*
     -         (32*MW**6*MZ**4 -
     -           40*MW**4*MZ**6 +
     -           17*MW**2*MZ**8 +
     -           MT**4*
     -            (-640*MW**6 +
     -            1184*MW**4*
     -            MZ**2 -
     -            550*MW**2*
     -           MZ**4 + 42*MZ**6)
     -            + MT**2*
     -            (-64*MW**6*
     -            MZ**2 +
     -            80*MW**4*MZ**4 -
     -            88*MW**2*MZ**6 +
     -            27*MZ**8))*
     -         Arg(2*MT**2 +
     -           (0,1)*MZ*
     -            ((0,1)*MZ +
     -            Csqrt2(4*MT**2 -
     -            MZ**2))))/
     -       (MW**4*
     -         (4*MT**2 - MZ**2)**
     -          0.5) -
     -      (9*MZ**5*
     -         (2*MW**2 - MZ**2)*
     -         (4*MW**2 - MZ**2)**
     -          1.5*
     -         (12*MW**4 +
     -           20*MW**2*MZ**2 +
     -           MZ**4)*
     -         Arg(-2*MW**2 +
     -           MZ*
     -            (MZ +
     -            (0,1)*
     -            Csqrt2(4*MW**2 -
     -            MZ**2))))/MW**8
     -       - (9*MZ**5*
     -         (2*MW**2 - MZ**2)*
     -         (4*MW**2 - MZ**2)**
     -          1.5*
     -         (12*MW**4 +
     -           20*MW**2*MZ**2 +
     -           MZ**4)*
     -         Arg(-MZ +
     -           (0,1)*
     -            Csqrt2(4*MW**2 -
     -            MZ**2)))/MW**8 +
     -      (9*MZ**5*
     -         (2*MW**2 - MZ**2)*
     -         (4*MW**2 - MZ**2)**
     -          1.5*
     -         (12*MW**4 +
     -           20*MW**2*MZ**2 +
     -           MZ**4)*
     -         Arg(MZ +
     -           (0,1)*
     -            Csqrt2(4*MW**2 -
     -            MZ**2)))/MW**8 +
     -      (9*(2*MW - MZ)*MZ*
     -         (2*MW + MZ)*
     -         (240*MW**12 +
     -           136*MW**10*
     -           MZ**2 -
     -           116*MW**8*MZ**4 +
     -           122*MW**6*MZ**6 -
     -           100*MW**4*MZ**8 +
     -           14*MW**2*MZ**10 +
     -           MZ**12)*
     -         Arg(2*MW**2 +
     -           (0,1)*MZ*
     -            ((0,1)*MZ +
     -            Csqrt2(4*MW**2 -
     -            MZ**2))))/
     -       (MW**8*
     -         (4*MW**2 - MZ**2)**
     -          0.5) -
     -      (9*MH*MZ**2*
     -         (132*MW**2*MZ**6 -
     -           84*MZ**8 +
     -           MH**6*
     -            (-4*MW**2 +
     -            3*MZ**2) +
     -           MH**4*
     -            (29*MW**2*
     -           MZ**2 - 21*MZ**4)
     -            + MH**2*
     -            (-88*MW**2*
     -            MZ**4 + 60*MZ**6)
     -           )*
     -         Arg(-MH +
     -           (0,1)*
     -            Csqrt2(-MH**2 +
     -            4*MZ**2)))/
     -       (MW**4*
     -         (-MH**2 + 4*MZ**2)**
     -          0.5) +
     -      (9*MH*MZ**2*
     -         (132*MW**2*MZ**6 -
     -           84*MZ**8 +
     -           MH**6*
     -            (-4*MW**2 +
     -            3*MZ**2) +
     -           MH**4*
     -            (29*MW**2*
     -           MZ**2 - 21*MZ**4)
     -            + MH**2*
     -            (-88*MW**2*
     -            MZ**4 + 60*MZ**6)
     -           )*
     -         Arg(MH +
     -           (0,1)*
     -            Csqrt2(-MH**2 +
     -            4*MZ**2)))/
     -       (MW**4*
     -         (-MH**2 + 4*MZ**2)**
     -          0.5) -
     -      (9*MH*MZ**2*
     -         (132*MW**2*MZ**6 -
     -           84*MZ**8 +
     -           MH**6*
     -            (-4*MW**2 +
     -            3*MZ**2) +
     -           MH**4*
     -            (29*MW**2*
     -           MZ**2 - 21*MZ**4)
     -            + MH**2*
     -            (-88*MW**2*
     -            MZ**4 + 60*MZ**6)
     -           )*
     -         Arg(MH**2 -
     -           2*MZ**2 +
     -           (0,1)*MH*
     -            Csqrt2(-MH**2 +
     -            4*MZ**2)))/
     -       (MW**4*
     -         (-MH**2 + 4*MZ**2)**
     -          0.5) +
     -      (9*MH*MZ**2*
     -         (132*MW**2*MZ**6 -
     -           84*MZ**8 +
     -           MH**6*
     -            (-4*MW**2 +
     -            3*MZ**2) +
     -           MH**4*
     -            (29*MW**2*
     -           MZ**2 - 21*MZ**4)
     -            + MH**2*
     -            (-88*MW**2*
     -            MZ**4 + 60*MZ**6)
     -           )*
     -         Arg(-MH**2 +
     -           2*MZ**2 +
     -           (0,1)*MH*
     -            Csqrt2(-MH**2 +
     -            4*MZ**2)))/
     -       (MW**4*
     -         (-MH**2 + 4*MZ**2)**
     -          0.5) +
     -      (9*MH*
     -         (MH**4 -
     -           4*MH**2*MW**2 +
     -           12*MW**4)*MZ**6*
     -         (2*MW**2 - MZ**2)*
     -         Arg(-MH +
     -           (0,1)*
     -            Csqrt2(-MH**2 +
     -            4*MW**2))*
     -         Csqrt2(-MH**2 +
     -           4*MW**2))/MW**8 -
     -      (9*MH*
     -         (MH**4 -
     -           4*MH**2*MW**2 +
     -           12*MW**4)*MZ**6*
     -         (2*MW**2 - MZ**2)*
     -         Arg(MH +
     -           (0,1)*
     -            Csqrt2(-MH**2 +
     -            4*MW**2))*
     -         Csqrt2(-MH**2 +
     -           4*MW**2))/MW**8 +
     -      (9*MH*
     -         (MH**4 -
     -           4*MH**2*MW**2 +
     -           12*MW**4)*MZ**6*
     -         (2*MW**2 - MZ**2)*
     -         Arg(MH**2 -
     -           2*MW**2 +
     -           (0,1)*MH*
     -            Csqrt2(-MH**2 +
     -            4*MW**2))*
     -         Csqrt2(-MH**2 +
     -           4*MW**2))/MW**8 -
     -      (9*MH*
     -         (MH**4 -
     -           4*MH**2*MW**2 +
     -           12*MW**4)*MZ**6*
     -         (2*MW**2 - MZ**2)*
     -         Arg(-MH**2 +
     -           2*MW**2 +
     -           (0,1)*MH*
     -            Csqrt2(-MH**2 +
     -            4*MW**2))*
     -         Csqrt2(-MH**2 +
     -           4*MW**2))/MW**8 +
     -      (108*MT**4*
     -          (2*MW**2*MZ**6 -
     -            MZ**8) +
     -         12*MT**2*
     -          (320*MW**8*MZ**2 -
     -            592*MW**6*
     -           MZ**4 +
     -            311*MW**4*
     -           MZ**6 -
     -            39*MW**2*MZ**8)
     -          + 2*
     -          (MW**2 - MZ**2)*
     -          (-9*MZ**6*
     -            (MH**4 + MZ**4)
     -            + 72*MW**10*
     -            Pi**2 +
     -            2*MW**4*MZ**6*
     -            (65 +
     -            (0,318)*Pi -
     -            18*Pi**2) +
     -            108*MW**8*
     -            (MZ**2*
     -            (-20 +
     -            (0,4)*Pi + Pi**2)
     -             + (0,4)*Pi*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4))
     -            + MW**6*
     -            (MZ**4*
     -            (-652 -
     -            (0,528)*Pi) +
     -            (0,216)*MZ**2*Pi*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4))
     -            + 9*MW**2*
     -            (4*MH**4*MZ**4 -
     -            6*MH**2*MZ**6 +
     -            MZ**8*
     -            (57 -
     -            (0,30)*Pi -
     -            8*Pi**2 +
     -            48*li2(2)))))/
     -       MW**6 -
     -      (432*(MW - MZ)*
     -         (MW + MZ)*
     -         (2*MW**2 - MZ**2)*
     -         (MW**2 + MZ**2)**2*
     -         li2(1 + MZ**2/MW**2)
     -         )/MW**2 -
     -      1728*MW**2*(MW - MZ)*
     -       (MW + MZ)*
     -       (MW**2 + 2*MZ**2)*
     -       li2(-2/
     -         (-1 +
     -           Csqrt2(1 -
     -            (4*MW**2)/MZ**2))
     -         ) -
     -      1728*MW**2*(MW - MZ)*
     -       (MW + MZ)*
     -       (MW**2 + 2*MZ**2)*
     -       li2(2/
     -         (1 +
     -           Csqrt2(1 -
     -            (4*MW**2)/MZ**2))
     -         ) +
     -      (18*(MW - MZ)*MZ**2*
     -         (MW + MZ)*
     -         (-18*MH**2*MW**4*
     -            MZ**4 +
     -           12*MW**4*MZ**6 +
     -           MH**6*
     -            (-4*MW**4 -
     -            MW**2*MZ**2 +
     -            MZ**4) +
     -           3*MH**4*
     -            (7*MW**4*MZ**2 -
     -            2*MW**2*MZ**4))*
     -         log2(MH))/MW**8 +
     -      (72*MZ**6*
     -         (-8*MW**8 +
     -           5*MW**6*MZ**2 +
     -           MT**6*
     -            (-6*MW**2 +
     -            3*MZ**2) +
     -           9*MT**2*
     -            (2*MW**6 -
     -            MW**4*MZ**2))*
     -         log2(MT))/MW**8 +
     -      (108*(MT - MW)**2*
     -         (MT + MW)**2*
     -         (MT**2 + 2*MW**2)*
     -         MZ**6*
     -         (MW -
     -           MZ*
     -            Csqrt2(1 -
     -            MW**2/MZ**2))*
     -         (MW +
     -           MZ*
     -            Csqrt2(1 -
     -            MW**2/MZ**2))*
     -         log2(MT - MW))/MW**8
     -        + (18*
     -         (2*MW**4*MZ**6*
     -            (6*MH**4 +
     -            9*MH**2*MZ**2 -
     -            65*MZ**4) -
     -           2*MW**2*MZ**6*
     -            (MH**6 +
     -            3*MH**4*MZ**2 -
     -            6*MZ**6) +
     -           MZ**8*
     -            (MH**6 + MZ**6)
     -            + MW**6*
     -            (-36*MH**2*
     -            MZ**6 + 206*MZ**8
     -            ) -
     -           48*MW**10*MZ**2*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4) +
     -           96*MW**12*
     -            (MZ**2 +
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4))
     -            - 24*MW**8*
     -            (MZ**6 +
     -            2*MZ**4*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4)))*
     -         log2(MW))/MW**8 +
     -      (108*(MT - MW)**2*
     -         (MT + MW)**2*
     -         (MT**2 + 2*MW**2)*
     -         MZ**6*
     -         (MW -
     -           MZ*
     -            Csqrt2(1 -
     -            MW**2/MZ**2))*
     -         (MW +
     -           MZ*
     -            Csqrt2(1 -
     -            MW**2/MZ**2))*
     -         log2(MT + MW))/MW**8
     -        - (18*
     -         (214*MW**6*MZ**8 -
     -           142*MW**4*
     -           MZ**10 +
     -           12*MW**2*MZ**12 +
     -           MZ**14 +
     -           MH**6*
     -            (-4*MW**6*
     -           MZ**2 +
     -            3*MW**4*MZ**4) +
     -           3*MH**4*
     -            (7*MW**6*MZ**4 -
     -            5*MW**4*MZ**6) +
     -           MH**2*
     -            (-54*MW**6*
     -            MZ**6 +
     -            36*MW**4*MZ**8)
     -            - 48*MW**10*
     -            MZ**2*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4) +
     -           96*MW**12*
     -            (MZ**2 +
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4))
     -            - 8*MW**8*
     -            (MZ**6 +
     -            6*MZ**4*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4)))*
     -         log2(MZ))/MW**8 +
     -      864*(-MW + MZ)*
     -       (MW + MZ)*
     -       (2*MW**2 + MZ**2)*
     -       Csqrt2(-4*MW**2*
     -          MZ**2 + MZ**4)*
     -       log2(-0.5 +
     -         (0.5*
     -            Csqrt2(-4*MW**2*
     -            MZ**2 + MZ**4))/
     -          MZ**2)))/
     -  ((MW - MZ)**3*(MW + MZ)**3)
      Width_Z2vv_EW=prefactor*DBLE(res)
      IF(ischeme.EQ.1)RETURN
      ! Gmu scheme, diff/|Born ME|^2 = 2d0*dZe1_Gmu_MZ(0)
      resdiff=2d0*dZe1_Gmu_MZ(0)*EL**2*MZ**2/2d0/Decay_R_CW2/Decay_R_SW2
      Width_Z2vv_EW=Width_Z2vv_EW+prefactor*DBLE(resdiff)
      RETURN
      END

      FUNCTION Width_Z2udxWm(idummy)
      USE ParamModule
      USE Func_PSI
      IMPLICIT NONE
      INTEGER::idummy
      REAL(KIND(1d0))::EL,MT,MW,MZ,MH
      COMPLEX(KIND(1d0))::res
      REAL(KIND(1d0))::Width_Z2udxWm
      REAL(KIND(1d0))::prefactor,rr
      EL=Decay_e
      MT=Decay_MT
      MW=Decay_MW
      MH=Decay_MH
      MZ=Decay_MZ
      rr=MW/MZ
      prefactor=MZ/256d0/3d0/pi**3*(1d0-rr)**2*(1d0-rr**2)
      res= (0.041666666666666664*
     -    EL**4*
     -    ((-6*rr**2*
     -          (11 - 38*rr**2 -
     -            44*rr**4 +
     -            80*rr**6)*
     -          atan((-1 +
     -            4*rr**2)**(-0.5))
     -           - 6*rr**2*
     -          (11 - 38*rr**2 -
     -            44*rr**4 +
     -            80*rr**6)*
     -          atan((1 - 2*rr**2)/
     -            (-1 + 4*rr**2)**
     -            0.5) -
     -         (14 - 187*rr**2 -
     -            48*(-18 + Pi**2)*
     -            rr**4 +
     -            (37 + 168*Pi**2)*
     -            rr**6 +
     -            8*
     -            (-91 + 12*Pi**2)*
     -            rr**8)*
     -          Csqrt2(-1 +
     -            4*rr**2))/
     -       (rr**2*
     -         (-1 + 4*rr**2)**0.5)
     -        + 48*rr**2*
     -       (-1 + 2*rr)*
     -       (1 + 2*rr)*
     -       (2 + rr**2)*
     -       li2(rr**(-2)) -
     -      (8*(-1 + 2*rr)*
     -         (1 + 2*rr)*
     -         (1 + rr**2)**2*
     -         (1 + 2*rr**2)*
     -         li2(1/(1 + rr**2)))/
     -       rr**2 +
     -      (8*(-1 + 2*rr)*
     -         (1 + 2*rr)*
     -         (1 + rr**2)**2*
     -         (1 + 2*rr**2)*
     -         li2(rr**2/
     -           (1 + rr**2)))/
     -       rr**2 +
     -      48*rr**2*(2 + rr**2)*
     -       (1 + 2*rr**2)*
     -       li2((-1 +
     -           Csqrt2(1 -
     -            4*rr**2))/
     -         (1 +
     -           Csqrt2(1 -
     -            4*rr**2))) +
     -      48*rr**2*(2 + rr**2)*
     -       (1 + 2*rr**2)*
     -       li2((1 +
     -           Csqrt2(1 -
     -            4*rr**2))/
     -         (-1 +
     -           Csqrt2(1 -
     -            4*rr**2))) +
     -      48*rr**2*(-1 + 2*rr)*
     -       (1 + 2*rr)*
     -       (2 + rr**2)*
     -       li2((1 - 2*rr**2 +
     -           Csqrt2(1 -
     -            4*rr**2))/
     -         (-1 +
     -           Csqrt2(1 -
     -            4*rr**2))) -
     -      48*rr**2*(2 + rr**2)*
     -       (1 + 2*rr**2)*
     -       li2((1 - 2*rr**2 +
     -           Csqrt2(1 -
     -            4*rr**2))/
     -         (1 +
     -           Csqrt2(1 -
     -            4*rr**2))) -
     -      48*rr**2*(2 + rr**2)*
     -       (1 + 2*rr**2)*
     -       li2((-1 + 2*rr**2 +
     -           Csqrt2(1 -
     -            4*rr**2))/
     -         (-1 +
     -           Csqrt2(1 -
     -            4*rr**2))) +
     -      48*rr**2*(-1 + 2*rr)*
     -       (1 + 2*rr)*
     -       (2 + rr**2)*
     -       li2((-1 + 2*rr**2 +
     -           Csqrt2(1 -
     -            4*rr**2))/
     -         (1 +
     -           Csqrt2(1 -
     -            4*rr**2))) +
     -      (2*
     -         ((0,6)*rr**2*
     -            (-10 +
     -            21*rr**2 +
     -            40*rr**4)*
     -            Abs(1 - 4*rr**2)
     -            + Csqrt2(-1 +
     -            4*rr**2)*
     -            (-12 -
     -            19*rr**2 +
     -            (26 + (0,96)*Pi)*
     -            rr**4 +
     -            rr**6*
     -            (-100 -
     -            (0,336)*Pi -
     -            576*log2(2)) +
     -            24*rr**8*
     -            (-11 -
     -            (0,8)*Pi -
     -            12*log2(2))))*
     -         log2(rr))/
     -       (rr**2*
     -         (-1 + 4*rr**2)**0.5)
     -        - (16*(1 + 2*rr**2)*
     -         (1 - 2*rr**2 +
     -           5*rr**4 + 2*rr**6)
     -          *log2(rr)**2)/rr**2
     -        - (16*(-1 + 2*rr)*
     -         (1 + 2*rr)*
     -         (1 + rr**2)**2*
     -         (1 + 2*rr**2)*
     -         log2(rr)*
     -         log2(1 + rr**2))/
     -       rr**2 +
     -      ((0,12)*
     -         ((-10 + 21*rr**2 +
     -            40*rr**4)*
     -            Abs(1 - 4*rr**2)
     -            + (0,48)*rr**4*
     -            (2 + rr**2)*
     -            Csqrt2(-1 +
     -            4*rr**2)*log2(2))
     -          *log2(1 +
     -           Csqrt2(1 -
     -            4*rr**2)))/
     -       (-1 + 4*rr**2)**0.5 +
     -      576*rr**4*(2 + rr**2)*
     -       log2(1 +
     -          Csqrt2(1 - 4*rr**2)
     -          )**2 +
     -      (12*
     -         ((0,-1)*
     -            (-10 +
     -            21*rr**2 +
     -            40*rr**4)*
     -            Abs(1 - 4*rr**2)
     -            + 48*rr**4*
     -            (2 + rr**2)*
     -            Csqrt2(-1 +
     -            4*rr**2)*log2(2))
     -          *log2(-1 +
     -           2*rr**2 +
     -           Csqrt2(1 -
     -            4*rr**2)))/
     -       (-1 + 4*rr**2)**0.5 +
     -      576*rr**4*(2 + rr**2)*
     -       log2(rr)*
     -       log2(-1 + 2*rr**2 +
     -         Csqrt2(1 - 4*rr**2))
     -        - 576*rr**4*
     -       (2 + rr**2)*
     -       log2(1 +
     -         Csqrt2(1 - 4*rr**2))
     -        *log2(-1 + 2*rr**2 +
     -         Csqrt2(1 - 4*rr**2))
     -      ))/
     -  ((-1 + rr)**5*(1 + rr)**3)
      Width_Z2udxWm=prefactor*DBLE(res)
      RETURN
      END

      FUNCTION Width_Z2veepWm(idummy)
      USE ParamModule
      USE Func_PSI
      IMPLICIT NONE
      INTEGER::idummy
      REAL(KIND(1d0))::EL,MT,MW,MZ,MH
      COMPLEX(KIND(1d0))::res
      REAL(KIND(1d0))::Width_Z2veepWm
      REAL(KIND(1d0))::prefactor,rr
      EL=Decay_e
      MT=Decay_MT
      MW=Decay_MW
      MH=Decay_MH
      MZ=Decay_MZ
      rr=MW/MZ
      prefactor=MZ/256d0/3d0/pi**3*(1d0-rr)**2*(1d0-rr**2)
      res=(0.041666666666666664*
     -    EL**4*
     -    ((-6*rr**2*
     -          (-7 + 62*rr**2 -
     -            164*rr**4 +
     -            112*rr**6)*
     -          atan((-1 +
     -            4*rr**2)**(-0.5))
     -           - 6*rr**2*
     -          (-7 + 62*rr**2 -
     -            164*rr**4 +
     -            112*rr**6)*
     -          atan((1 - 2*rr**2)/
     -            (-1 + 4*rr**2)**
     -            0.5) +
     -         (-58 + 169*rr**2 -
     -            48*(6 + Pi**2)*
     -            rr**4 -
     -            (119 + 24*Pi**2)*
     -            rr**6 + 296*rr**8
     -            )*
     -          Csqrt2(-1 +
     -            4*rr**2))/
     -       (rr**2*
     -         (-1 + 4*rr**2)**0.5)
     -        + 48*rr**2*
     -       (2 + rr**2)*
     -       li2(rr**(-2)) -
     -      (24*(1 + rr**2)**2*
     -         (-1 + 2*rr**2)*
     -         li2(1/(1 + rr**2)))/
     -       rr**2 +
     -      (24*(1 + rr**2)**2*
     -         (-1 + 2*rr**2)*
     -         li2(rr**2/
     -           (1 + rr**2)))/
     -       rr**2 +
     -      48*rr**2*(2 + rr**2)*
     -       (-1 + 2*rr**2)*
     -       li2((-1 +
     -           Csqrt2(1 -
     -            4*rr**2))/
     -         (1 +
     -           Csqrt2(1 -
     -            4*rr**2))) +
     -      48*rr**2*(2 + rr**2)*
     -       (-1 + 2*rr**2)*
     -       li2((1 +
     -           Csqrt2(1 -
     -            4*rr**2))/
     -         (-1 +
     -           Csqrt2(1 -
     -            4*rr**2))) +
     -      48*rr**2*(2 + rr**2)*
     -       li2((1 - 2*rr**2 +
     -           Csqrt2(1 -
     -            4*rr**2))/
     -         (-1 +
     -           Csqrt2(1 -
     -            4*rr**2))) -
     -      48*rr**2*(2 + rr**2)*
     -       (-1 + 2*rr**2)*
     -       li2((1 - 2*rr**2 +
     -           Csqrt2(1 -
     -            4*rr**2))/
     -         (1 +
     -           Csqrt2(1 -
     -            4*rr**2))) -
     -      48*rr**2*(2 + rr**2)*
     -       (-1 + 2*rr**2)*
     -       li2((-1 + 2*rr**2 +
     -           Csqrt2(1 -
     -            4*rr**2))/
     -         (-1 +
     -           Csqrt2(1 -
     -            4*rr**2))) +
     -      48*rr**2*(2 + rr**2)*
     -       li2((-1 + 2*rr**2 +
     -           Csqrt2(1 -
     -            4*rr**2))/
     -         (1 +
     -           Csqrt2(1 -
     -            4*rr**2))) -
     -      (6*
     -         ((0,-2)*rr**2*
     -            (2 - 9*rr**2 +
     -            24*rr**4)*
     -            Abs(1 - 4*rr**2)
     -            + Csqrt2(-1 +
     -            4*rr**2)*
     -            (12 - 5*rr**2 +
     -            (-10 +
     -            (0,32)*Pi)*rr**4
     -            + 4*rr**6*
     -            (1 + (0,4)*Pi +
     -            16*log2(2)) +
     -            8*rr**8*
     -            (5 + log2(16))))*
     -         log2(rr))/
     -       (rr**2*
     -         (-1 + 4*rr**2)**0.5)
     -        - (48*(-1 + 2*rr**2)*
     -         (-1 - 2*rr**2 +
     -           3*rr**4 + 2*rr**6)
     -          *log2(rr)**2)/rr**2
     -        - (48*(1 + rr**2)**2*
     -         (-1 + 2*rr**2)*
     -         log2(rr)*
     -         log2(1 + rr**2))/
     -       rr**2 +
     -      ((0,12)*
     -         ((2 - 9*rr**2 +
     -            24*rr**4)*
     -            Abs(1 - 4*rr**2)
     -            + (0,16)*rr**4*
     -            (2 + rr**2)*
     -            Csqrt2(-1 +
     -            4*rr**2)*log2(2))
     -          *log2(1 +
     -           Csqrt2(1 -
     -            4*rr**2)))/
     -       (-1 + 4*rr**2)**0.5 +
     -      192*rr**4*(2 + rr**2)*
     -       log2(1 +
     -          Csqrt2(1 - 4*rr**2)
     -          )**2 +
     -      (12*
     -         ((0,-1)*
     -            (2 - 9*rr**2 +
     -            24*rr**4)*
     -            Abs(1 - 4*rr**2)
     -            + 16*rr**4*
     -            (2 + rr**2)*
     -            Csqrt2(-1 +
     -            4*rr**2)*log2(2))
     -          *log2(-1 +
     -           2*rr**2 +
     -           Csqrt2(1 -
     -            4*rr**2)))/
     -       (-1 + 4*rr**2)**0.5 +
     -      192*rr**4*(2 + rr**2)*
     -       log2(rr)*
     -       log2(-1 + 2*rr**2 +
     -         Csqrt2(1 - 4*rr**2))
     -        - 192*rr**4*
     -       (2 + rr**2)*
     -       log2(1 +
     -         Csqrt2(1 - 4*rr**2))
     -        *log2(-1 + 2*rr**2 +
     -         Csqrt2(1 - 4*rr**2))
     -      ))/
     -  ((-1 + rr)**5*(1 + rr)**3)
      Width_Z2veepWm=prefactor*DBLE(res)
      RETURN
      END

      FUNCTION Width_Z2cc_cmass(MC)
      USE ParamModule
      USE Func_PSI
      IMPLICIT NONE
      REAL(KIND(1d0))::MC
      REAL(KIND(1d0))::Width_Z2cc_cmass
      REAL(KIND(1d0))::MT,MW,MH,MZ,EL
      COMPLEX(KIND(1d0))::res
      EL=Decay_e
      MT=Decay_MT
      MW=Decay_MW
      MH=Decay_MH
      MZ=Decay_MZ
      res= (0.0011052426603603842*
     -    EL**2*
     -    (17*MZ**7 -
     -      7*MC**2*MZ**4*
     -       Csqrt2(-4*MC**2 +
     -         MZ**2) -
     -      17*MZ**6*
     -       Csqrt2(-4*MC**2 +
     -         MZ**2) -
     -      32*MW**4*
     -       (-MZ**3 +
     -         2*MC**2*
     -          Csqrt2(-4*MC**2 +
     -            MZ**2) +
     -         MZ**2*
     -          Csqrt2(-4*MC**2 +
     -            MZ**2)) +
     -      40*MW**2*
     -       (-MZ**5 +
     -         2*MC**2*MZ**2*
     -          Csqrt2(-4*MC**2 +
     -            MZ**2) +
     -         MZ**4*
     -          Csqrt2(-4*MC**2 +
     -            MZ**2))))/
     -  (MW**2*MZ**2*
     -    (MW**2 - MZ**2))
      Width_Z2cc_cmass=DBLE(res)
      END

      FUNCTION Width_Z2bb_bmass(MB)
      USE ParamModule
      USE Func_PSI
      IMPLICIT NONE
      REAL(KIND(1d0))::MB
      REAL(KIND(1d0))::Width_Z2bb_bmass
      REAL(KIND(1d0))::MT,MW,MH,MZ,EL
      COMPLEX(KIND(1d0))::res
      EL=Decay_e
      MT=Decay_MT
      MW=Decay_MW
      MH=Decay_MH
      MZ=Decay_MZ
      res= (0.0011052426603603842*
     -    EL**2*
     -    (5*MZ**7 +
     -      17*MB**2*MZ**4*
     -       Csqrt2(-4*MB**2 +
     -         MZ**2) -
     -      5*MZ**6*
     -       Csqrt2(-4*MB**2 +
     -         MZ**2) -
     -      8*MW**4*
     -       (-MZ**3 +
     -         2*MB**2*
     -          Csqrt2(-4*MB**2 +
     -            MZ**2) +
     -         MZ**2*
     -          Csqrt2(-4*MB**2 +
     -            MZ**2)) +
     -      4*MW**2*
     -       (-MZ**5 +
     -         2*MB**2*MZ**2*
     -          Csqrt2(-4*MB**2 +
     -            MZ**2) +
     -         MZ**4*
     -          Csqrt2(-4*MB**2 +
     -            MZ**2))))/
     -  (MW**2*MZ**2*
     -    (MW**2 - MZ**2))
      Width_Z2bb_bmass=DBLE(res)
      END

      FUNCTION Width_Z2tautau_taumass(ML)
      USE ParamModule
      USE Func_PSI
      IMPLICIT NONE
      REAL(KIND(1d0))::ML
      REAL(KIND(1d0))::Width_Z2tautau_taumass
      REAL(KIND(1d0))::MT,MW,MH,MZ,EL
      COMPLEX(KIND(1d0))::res
      EL=Decay_e
      MT=Decay_MT
      MW=Decay_MW
      MH=Decay_MH
      MZ=Decay_MZ
      res=(0.003315727981081153*
     -    EL**2*
     -    (5*MZ**7 -
     -      7*ML**2*MZ**4*
     -       Csqrt2(-4*ML**2 +
     -         MZ**2) -
     -      5*MZ**6*
     -       Csqrt2(-4*ML**2 +
     -         MZ**2) -
     -      8*MW**4*
     -       (-MZ**3 +
     -         2*ML**2*
     -          Csqrt2(-4*ML**2 +
     -            MZ**2) +
     -         MZ**2*
     -          Csqrt2(-4*ML**2 +
     -            MZ**2)) +
     -      12*MW**2*
     -       (-MZ**5 +
     -         2*ML**2*MZ**2*
     -          Csqrt2(-4*ML**2 +
     -            MZ**2) +
     -         MZ**4*
     -          Csqrt2(-4*ML**2 +
     -            MZ**2))))/
     -  (MW**2*MZ**2*
     -    (MW**2 - MZ**2))
      Width_Z2tautau_taumass=DBLE(res)
      RETURN
      END


      subroutine jiogox(fi,fo,gc,vmass,vwidth , jio)
c
c This subroutine computes an off-shell vector current from an external
c fermion pair.  The vector boson propagator is given in Feynman gauge
c for a massless vector and in unitary gauge for a massive vector in the
c case when they are all color octets.
c
c input:
c       complex fi(6)          : flow-in  fermion                   |fi>
c       complex fo(6)          : flow-out fermion                   <fo|
c       complex gc(2)          : coupling constants                  gvf
c       real    vmass          : mass  of OUTPUT vector v
c       real    vwidth         : width of OUTPUT vector v
c
c output:
c       complex jio(6)         : vector current          j^mu(<fo|v|fi>)
c
      implicit none
      double complex fi(6),fo(6),gc(2),jio(6),c0,c1,c2,c3,cs,d
      double precision q(0:3),vmass,vwidth,q2,vm2
      double complex cm2 ! mass**2- I Gamma mass (Fabio)

      double precision rZero, rOne
      parameter( rZero = 0.0d0, rOne = 1.0d0 )
      double complex cImag, cZero
      parameter( cImag = ( 0.0d0, 1.0d0 ), cZero = ( 0.0d0, 0.0d0 ) )

      jio(5) = fo(5)-fi(5)
      jio(6) = fo(6)-fi(6)

      q(0) = dble( jio(5))
      q(1) = dble( jio(6))
      q(2) = dimag(jio(6))
      q(3) = dimag(jio(5))
      q2 = q(0)**2-(q(1)**2+q(2)**2+q(3)**2)
      vm2 = vmass**2

      if ( vmass.ne.rZero ) then

         d = rOne/dcmplx( q2-vm2, vmass*vwidth )
c     For the running width, use below instead of the above d.
c     d = rOne/dcmplx( q2-vm2, max(vwidth*q2/vmass,rZero) )

         if ( gc(2).ne.cZero ) then
            c0 =  gc(1)*( fo(3)*fi(1)+fo(4)*fi(2))
     &           +gc(2)*( fo(1)*fi(3)+fo(2)*fi(4))
            c1 = -gc(1)*( fo(3)*fi(2)+fo(4)*fi(1))
     &           +gc(2)*( fo(1)*fi(4)+fo(2)*fi(3))
            c2 =( gc(1)*( fo(3)*fi(2)-fo(4)*fi(1))
     &           +gc(2)*(-fo(1)*fi(4)+fo(2)*fi(3)))*cImag
            c3 =  gc(1)*(-fo(3)*fi(1)+fo(4)*fi(2))
     &           +gc(2)*( fo(1)*fi(3)-fo(2)*fi(4))
         else
            d = d*gc(1)
            c0 =   fo(3)*fi(1)+fo(4)*fi(2)
            c1 =  -fo(3)*fi(2)-fo(4)*fi(1)
            c2 = ( fo(3)*fi(2)-fo(4)*fi(1))*cImag
            c3 =  -fo(3)*fi(1)+fo(4)*fi(2)
         end if

c     Fabio's implementation of the fixed width
         cm2=dcmplx( vm2, -vmass*vwidth )
c     cs = (q(0)*c0-q(1)*c1-q(2)*c2-q(3)*c3)/vm2
         cs = (q(0)*c0-q(1)*c1-q(2)*c2-q(3)*c3)/cm2
         jio(1) = (c0-cs*q(0))*d
         jio(2) = (c1-cs*q(1))*d
         jio(3) = (c2-cs*q(2))*d
         jio(4) = (c3-cs*q(3))*d

      else

         d = dcmplx( rOne/q2, rZero )
         if ( gc(2).ne.cZero ) then
            jio(1) = ( gc(1)*( fo(3)*fi(1)+fo(4)*fi(2))
     &                +gc(2)*( fo(1)*fi(3)+fo(2)*fi(4)) )*d
            jio(2) = (-gc(1)*( fo(3)*fi(2)+fo(4)*fi(1))
     &                +gc(2)*( fo(1)*fi(4)+fo(2)*fi(3)) )*d
            jio(3) = ( gc(1)*( fo(3)*fi(2)-fo(4)*fi(1))
     &                +gc(2)*(-fo(1)*fi(4)+fo(2)*fi(3)))
     &               *d*cImag
            jio(4) = ( gc(1)*(-fo(3)*fi(1)+fo(4)*fi(2))
     &                +gc(2)*( fo(1)*fi(3)-fo(2)*fi(4)) )*d
         else
            d = d*gc(1)
            jio(1) =  ( fo(3)*fi(1)+fo(4)*fi(2))*d
            jio(2) = -( fo(3)*fi(2)+fo(4)*fi(1))*d
            jio(3) =  ( fo(3)*fi(2)-fo(4)*fi(1))*d*cImag
            jio(4) =  (-fo(3)*fi(1)+fo(4)*fi(2))*d
         end if

      end if
c
      return
      end


      FUNCTION CEL(QQC,PP,AA,BB)
      PARAMETER (CA=.0003, PIO2=1.5707963268)
      IF(QQC.EQ.0.)PAUSE 'failure in CEL'
      QC=ABS(QQC)
      A=AA
      B=BB
      P=PP
      E=QC
      EM=1.
      IF(P.GT.0.)THEN
        P=SQRT(P)
        B=B/P
      ELSE
        F=QC*QC
        Q=1.-F
        G=1.-P
        F=F-P
        Q=Q*(B-A*P)
        P=SQRT(F/G)
        A=(A-B)/G
        B=-Q/(G*G*P)+A*P
      ENDIF
1     F=A
      A=A+B/P
      G=E/P
      B=B+F*G
      B=B+B
      P=G+P
      G=EM
      EM=QC+EM
      IF(ABS(G-QC).GT.G*CA)THEN
        QC=SQRT(E)
        QC=QC+QC
        E=QC*EM
        GO TO 1
      ENDIF
      CEL=PIO2*(B+A*EM)/(EM*(EM+P))
      RETURN
      END


subroutine SHrtoc(rcilm, l1, ccilm, degmax, convention, switchcs)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
!	This subroutine will convert the real "geodesy 4-pi" spherical harmonic coefficients into
!	complex form with either a 4 pi or unit normalization. The complex
!	coefficients are only calculated for positive m's (the negative m's are given by
!
!		c_l,m* = (-1)^m c_l,-m
!
!	This sign convention is designed to be used with the spherical haromic rotation routines
!	taken from Mark Simons' code. If degmax is not specified, then the maximum degree of the
!	conversion is taken from the size of the input arrays.
!
!
!	Calling Parameters
!		IN
!			rcilm		Real "geodesy" spherical harmonic coefficients with dimensions
!					(2, lmax+1, lmax+1).
!		OUT
!			ccilm		Complex unity-normalized spherical harmonic coefficients, dimensioned
!					as (2, lmax+1, lmax+1). The first index corresponds to the real and
!					complex coefficients, respectively.
!		OPTIONAL
!			degmax		Maximum degree of conversion to be performed.
!			convention	1=output 4-pi normalized coefficients
!					2=output  Varshalovich et al. normalized coefficients
!			switchcs	If 1, Change between different Condon-Shortley phase convenctions.
!					If 0, use consistent phase convention.
!
!		Dependencies:	None
!
!
!	Written by Mark Wieczorek (August 2003)
!	June 4 2006: Added optional argument to change between Condon-Shortley phase conventions.
!
!	Copyright (c) 2005-2006, Mark A. Wieczorek
!	All rights reserved.
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
	implicit none
	integer, intent(in)           ::    l1, degmax
	real*8, intent(in)            :: 	rcilm(2,l1+1,l1+1)
	real*8, intent(out)           ::	ccilm(2,degmax+1,degmax+1)
	integer, intent(in), optional ::	convention, switchcs
	integer                       :: 	lmax, l, m
	real*8                        ::	pi

	if (present(switchcs)) then
		if (switchcs /= 1 .and. switchcs /=0) then
			print*, "Error --- SHrtoc"
			print*, "switchcs must be equal to either 0 (keep same convention) of 1 (change Condon-Shortley phase)"
			print*, "Input value is ", switchcs
			stop
		endif
	endif

	if (present(convention) ) then
		if (convention /=1 .and. convention /=2) then
			print*, "Error --- SHrtoc"
			print*, "CONVENTION must be 1 or 2."
			print*, "Input valuse is ", convention
			stop
		endif
	endif

	lmax = degmax
	if (size(rcilm(:,1,1)) < 2) then
		print*, "Error --- SHrtoc"
		print*, "RCILM must be dimensioned as (2,*,*)."
		print*, "Input array is dimensioned as ",  size(rcilm(:,1,1)), size(rcilm(1,:,1)), size(rcilm(1,1,:))
		stop
	elseif (size(ccilm(:,1,1)) < 2) then
		print*, "Error --- SHrtoc"
		print*, "CCILM must be dimensioned as (2,*,*)."
		print*, "Input array is dimensioned as ",  size(ccilm(:,1,1)), size(ccilm(1,:,1)), size(ccilm(1,1,:))
		stop
	endif

	pi = acos(-1.0d0)
	ccilm = 0.0d0

	do l = 0, lmax, 1
		if (convention == 2) then
			ccilm(1,l+1, 1) = sqrt(4.0d0*pi)*rcilm(1,l+1,1)
			ccilm(2,l+1, 1) = 0.0d0

			do m=1, l, 1
				if (present(switchcs)) then
					if (switchcs == 1) then
						ccilm(1, l+1, m+1) = sqrt(2.0d0*pi) * rcilm(1,l+1,m+1) * (-1.0d0)**m
						ccilm(2, l+1, m+1) = -sqrt(2.0d0*pi) * rcilm(2,l+1,m+1) * (-1.0d0)**m
					else
						ccilm(1, l+1, m+1) = sqrt(2.0d0*pi) * rcilm(1,l+1,m+1)
						ccilm(2, l+1, m+1) = -sqrt(2.0d0*pi) * rcilm(2,l+1,m+1)
					endif
				else
					ccilm(1, l+1, m+1) = sqrt(2.0d0*pi) * rcilm(1,l+1,m+1)
					ccilm(2, l+1, m+1) = -sqrt(2.0d0*pi) * rcilm(2,l+1,m+1)
				endif
			enddo
		else
			ccilm(1,l+1, 1) = rcilm(1,l+1,1)
			ccilm(2,l+1, 1) = 0.0d0

			do m=1, l, 1
				if (present(switchcs)) then
					if (switchcs == 1) then
						ccilm(1, l+1, m+1) = rcilm(1,l+1,m+1)/sqrt(2.0d0) * (-1.0d0)**m
						ccilm(2, l+1, m+1) = -rcilm(2,l+1,m+1)/sqrt(2.0d0) * (-1.0d0)**m
					else
						ccilm(1, l+1, m+1) = rcilm(1,l+1,m+1)/sqrt(2.0d0)
						ccilm(2, l+1, m+1) = -rcilm(2,l+1,m+1)/sqrt(2.0d0)
					endif
				else
					ccilm(1, l+1, m+1) = rcilm(1,l+1,m+1)/sqrt(2.0d0)
					ccilm(2, l+1, m+1) = -rcilm(2,l+1,m+1)/sqrt(2.0d0)
				endif
			enddo
		endif
	enddo

end subroutine SHrtoc

subroutine SHctor(ccilm, l1, rcilm, degmax, convention, switchcs)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
!	This subroutine will convert either "geodesy 4-pi" or "Varshalovich et al." complex spherical
!	harmonic coefficients into real "geodesy 4-pi" spherical harmonic coefficients.
!
!	If degmax is not specified, then the maximum degree of the
!	conversion is taken from the size of the input arrays.
!
!
!	Calling Parameters
!		IN
!			ccilm		Complex unity-normalized spherical harmonic coefficients, dimensioned
!					as (2, lmax+1, lmax+1). The first index corresponds to the real and
!					complex coefficients, respectively.
!		OUT
!			rcilm		Real "geodesy" spherical harmonic coefficients with dimensions
!					(2, lmax+1, lmax+1).
!		OPTIONAL
!			degmax		Maximum degree of conversion to be performed.
!			convention	1=input coefficients are 4-pi normalized
!					2=input coefficients are Varshalovich et al. normalized.
!			switchcs	If 1, Change between different Condon-Shortley phase convenctions.
!					If 0, use consistent phase convention.
!
!		Dependencies:	None
!
!	Written by Mark Wieczorek 2004.
!	June 4 2006: Added option to change between Condon-Shortley phase conventions.
!
!	Copyright (c) 2005-2006, Mark A. Wieczorek
!	All rights reserved.
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
	implicit none
	integer, intent(in) :: l1, degmax
	real*8, intent(in) :: ccilm(2,l1+1,l1+1)
	real*8, intent(out) :: rcilm(2,degmax+1,degmax+1)
	integer, intent(in), optional :: convention, switchcs
	integer             ::	lmax, l, m
	real*8              ::	pi

	if (present(switchcs)) then
		if (switchcs /= 1 .and. switchcs /=0) then
			print*, "Error --- SHrtoc"
			print*, "switchcs must be equal to either 0 (keep same convention) of 1 (change Condon-Shortley phase)"
			print*, "Input value is ", switchcs
			stop
		endif
	endif

	if (present(convention) ) then
		if (convention /=1 .and. convention /=2) then
			print*, "Error --- SHrtoc"
			print*, "CONVENTION must be 1 or 2."
			print*, "Input valuse is ", convention
			stop
		endif
	endif

	lmax = degmax

	if (size(rcilm(:,1,1)) < 2) then
		print*, "Error --- SHrtoc"
		print*, "RCILM must be dimensioned as (2,*,*)."
		print*, "Input array is dimensioned as ",  size(rcilm(:,1,1)), size(rcilm(1,:,1)), size(rcilm(1,1,:))
		stop
	elseif (size(ccilm(:,1,1)) < 2) then
		print*, "Error --- SHrtoc"
		print*, "CCILM must be dimensioned as (2,*,*)."
		print*, "Input array is dimensioned as ",  size(ccilm(:,1,1)), size(ccilm(1,:,1)), size(ccilm(1,1,:))
		stop
	endif

	pi = acos(-1.0d0)
	rcilm = 0.0d0

	do l = 0, lmax, 1
		if (convention == 2) then
				rcilm(1,l+1,1) = ccilm(1,l+1,1)/sqrt(4.0d0*pi)
				rcilm(2, l+1, 1) = 0.0d0

				do m=1, l, 1
					if (present(switchcs)) then
						if (switchcs == 1) then
							rcilm(1,l+1, m+1) =  ccilm(1, l+1, m+1) / sqrt(2.0d0*pi) * (-1.0d0)**m
							rcilm(2,l+1, m+1) =  - ccilm(2,l+1,m+1) /sqrt(2.0d0*pi) * (-1.0d0)**m
						else
							rcilm(1,l+1, m+1) =  ccilm(1, l+1, m+1) / sqrt(2.0d0*pi)
							rcilm(2,l+1, m+1) =  - ccilm(2,l+1,m+1) /sqrt(2.0d0*pi)
						endif
					else
						rcilm(1,l+1, m+1) =  ccilm(1, l+1, m+1) / sqrt(2.0d0*pi)
						rcilm(2,l+1, m+1) =  - ccilm(2,l+1,m+1) /sqrt(2.0d0*pi)
					endif
				enddo
		else
			rcilm(1,l+1,1) = ccilm(1,l+1,1)
			rcilm(2, l+1, 1) = 0.0d0

			do m=1, l, 1
				if (present(switchcs)) then
					if(switchcs == 1) then
						rcilm(1,l+1, m+1) = sqrt(2.0d0) * ccilm(1, l+1, m+1) * (-1.0d0)**m
						rcilm(2,l+1, m+1) = -sqrt(2.0d0) * ccilm(2, l+1, m+1) * (-1.0d0)**m
					else
						rcilm(1,l+1, m+1) = sqrt(2.0d0) * ccilm(1, l+1, m+1)
						rcilm(2,l+1, m+1) = -sqrt(2.0d0) * ccilm(2, l+1, m+1)
					endif
				else
					rcilm(1,l+1, m+1) = sqrt(2.0d0) * ccilm(1, l+1, m+1)
					rcilm(2,l+1, m+1) = -sqrt(2.0d0) * ccilm(2, l+1, m+1)
				endif
			enddo

		endif
	enddo

end subroutine SHctor

subroutine SHCilmToCindex(degmax, cilm, cindex)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
!	This routine will convert a 3D matrix of spherical harmonics indexed as (i, l+1, m+1)
!	into a 2D matrix that is indexed as (i, index) where index = l(l+1)/2+m+1.
!
!	Calling Parameters:
!		IN
!			cilm	Array of spherical harmonic coefficients with dimensions
!				(2, lmax+1, lmax+1).
!		OUT
!			cindex	Array of indexed spherical harmonic coefficnets with dimensions
!				(2, (lmax+1)*(lmax+2)/2).
!
!	Dependencies:	None
!
!	Written by Mark Wieczorek 2004.
!
!	Copyright (c) 2005-2006, Mark A. Wieczorek
!	All rights reserved.
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
	implicit none
	integer, intent(in)  :: degmax
	real*8, intent(in)   :: cilm(2, degmax+1, degmax+1)
	real*8, intent(out)  :: cindex(2, (degmax+1)*(degmax+2)/2)

	integer  :: l, m, index

	cindex = 0.0d0

	do l=0, degmax
		do m=0, l
			index = (l*(l+1))/2+m+1
			cindex(1, index) = cilm(1,l+1,m+1)
			cindex(2, index) = cilm(2,l+1,m+1)
		enddo
	enddo

end subroutine SHCilmToCindex

subroutine SHCindexToCilm(degmax, cindex, cilm)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
!	This subroutine will convert a 2D matrix of spherical harmonics indexed as (i, index)
!	into a 2D matrix that is index as (i, l+1, m+1) where index = l(l+1)/2+m+1.
!
!	Calling Parameters:
!		IN
!			cindex	Array of indexed spherical harmonic coefficnets with dimensions
!				(2, (lmax+1)*(lmax+2)/2).
!		OUT
!			cilm	Array of spherical harmonic coefficients with dimensions
!				(2, lmax+1, lmax+1).
!
!	Dependencies:	None
!
!	Written by Mark Wieczorek 2004.
!
!	Copyright (c) 2005, Mark A. Wieczorek
!	All rights reserved.
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
	implicit none
	integer, intent(in) ::	degmax
	real*8, intent(out) ::  cilm(2, degmax+1, degmax+1)
	real*8, intent(in)  ::	cindex(2, (degmax+1)*(degmax+2)/2)

	integer :: l, m, index

	cilm = 0.0d0

	do l=0, degmax
		do m=0, l
			index = (l*(l+1))/2+m+1
			cilm(1,l+1,m+1) = cindex(1, index)
			cilm(2,l+1,m+1) = cindex(2, index)
		enddo
	enddo

end subroutine SHCindexToCilm