CMS 3D CMS Logo

Functions
fitWZ Namespace Reference

Functions

def MyChi2 (npar, g, chi2, x, iflag)
 

Function Documentation

def fitWZ.MyChi2 (   npar,
  g,
  chi2,
  x,
  iflag 
)

Definition at line 19 of file fitWZ.py.

References mps_check.array.

19 def MyChi2 (npar, g, chi2, x, iflag):
20  # Inverse of (Zyield,sysEff) covariance matrix
21  s11 = 1./ezxsection**2/(1.-corrZEff**2)
22  s22 = 1./sysEff**2/(1.-corrZEff**2)
23  s12 = -corrZEff/(1.-corrZEff**2)/ezxsection/sysEff
24 
25  # Build chi2
26  wxsFit = x[0]*x[1]
27  zxsFit = x[1]
28  effFit = x[2]
29  chi2[0] = (wxsFit*(1.+effFit)-wxsection)*(wxsFit*(1.+effFit)-wxsection)/ewxsection/ewxsection
30  chi2[0] += (zxsFit-zxsection)*(zxsFit-zxsection) *s11
31  chi2[0] += effFit*effFit * s22
32  chi2[0] += 2*(zxsFit-zxsection)*effFit * s12
33 
34 # Minimation, main program
def MyChi2(npar, g, chi2, x, iflag)
Definition: fitWZ.py:19