CMS 3D CMS Logo

Functions
Averages_3Invpb Namespace Reference

Functions

def vbtfRatioAverage (title, ratio1, ratio2, eratio1, eratio2, sysUnc1, sysUnc2, sysCor1, sysCor2)
 
def vbtfRatioCheck (title, ratio, absStat, sysUnc, sysCor)
 
def vbtfXSectionAverage (title, xsection1, xsection2, exsection1, exsection2, sysUnc1, sysUnc2, sysCor1, sysCor2, relSysLumi)
 
def vbtfXSectionCheck (title, xsection, exsection, sysUnc, sysCor, relSysLumi)
 INPUTS FOLLOW (they are not the final version) More...
 

Function Documentation

def Averages_3Invpb.vbtfRatioAverage (   title,
  ratio1,
  ratio2,
  eratio1,
  eratio2,
  sysUnc1,
  sysUnc2,
  sysCor1,
  sysCor2 
)

Definition at line 269 of file Averages_3Invpb.py.

References mathSSE.sqrt(), vbtfRatioCheck(), vbtfXSectionAverage(), and vbtfXSectionCheck().

269 def vbtfRatioAverage(title, ratio1, ratio2, eratio1, eratio2, sysUnc1, sysUnc2, sysCor1, sysCor2):
270  if OPTION== "StatisticalAverage":
271  V11 = eratio1**2
272  V22 = eratio2**2
273  V12 = 0
274  else:
275  V11 = eratio1**2+(sysUnc1**2+sysCor1**2)
276  V22 = eratio2**2+(sysUnc2**2+sysCor2**2)
277  V12 = sysCor1*sysCor2
278 
279  a1 = (V22-V12)/(V11+V22-2*V12)
280  a2 = (V11-V12)/(V11+V22-2*V12)
281  average = a1*ratio1 + a2*ratio2
282  errstat = sqrt(a1**2*eratio1**2+a2**2*eratio2**2)
283  errunco = sqrt(a1**2*sysUnc1**2 + a2**2*sysUnc2**2)
284  errtheo = sqrt(a1**2*sysCor1**2 + a2**2*sysCor2**2 + 2*a1*a2*sysCor1*sysCor2)
285  errsyst = sqrt(errunco**2+errtheo**2)
286 
287  print "VBTF average: %s = %.4f +- %.4f (stat.)" % (title, average, errstat)
288 
289  print "\tVBTF systematics (1): +- %.4f (exp) +- %.4f (the)" % (errunco, errtheo)
290  print "\tVBTF systematics (2): +- %.4f (exp+the)" % (errsyst)
291 
def vbtfRatioAverage(title, ratio1, ratio2, eratio1, eratio2, sysUnc1, sysUnc2, sysCor1, sysCor2)
T sqrt(T t)
Definition: SSEVec.h:18
def Averages_3Invpb.vbtfRatioCheck (   title,
  ratio,
  absStat,
  sysUnc,
  sysCor 
)

Definition at line 265 of file Averages_3Invpb.py.

Referenced by vbtfRatioAverage().

265 def vbtfRatioCheck(title, ratio, absStat, sysUnc, sysCor):
266  print "VBTF inputs: %s = %.4f +- %.4f (stat.) +- %.4f (exp.) +- %.4f (the.)" % (title, ratio, absStat, sysUnc, sysCor)
267 
def vbtfRatioCheck(title, ratio, absStat, sysUnc, sysCor)
def Averages_3Invpb.vbtfXSectionAverage (   title,
  xsection1,
  xsection2,
  exsection1,
  exsection2,
  sysUnc1,
  sysUnc2,
  sysCor1,
  sysCor2,
  relSysLumi 
)

Definition at line 240 of file Averages_3Invpb.py.

References mathSSE.sqrt().

Referenced by vbtfRatioAverage().

240 def vbtfXSectionAverage(title, xsection1, xsection2, exsection1, exsection2, sysUnc1, sysUnc2, sysCor1, sysCor2, relSysLumi):
241  if OPTION== "StatisticalAverage":
242  V11 = exsection1**2
243  V22 = exsection2**2
244  V12 = 0
245  else:
246  V11 = exsection1**2+sysUnc1**2+sysCor1**2
247  V22 = exsection2**2+sysUnc2**2+sysCor2**2
248  V12 = sysCor1*sysCor2
249 
250  a1 = (V22-V12)/(V11+V22-2*V12)
251  a2 = (V11-V12)/(V11+V22-2*V12)
252  average = a1*xsection1 + a2*xsection2
253  errstat = sqrt(a1**2*exsection1**2+a2**2*exsection2**2)
254  errunco = sqrt(a1**2*sysUnc1**2 + a2**2*sysUnc2**2)
255  errtheo = sqrt(a1**2*sysCor1**2 + a2**2*sysCor2**2 + 2*a1*a2*sysCor1*sysCor2)
256  errsyst = sqrt(errunco**2+errtheo**2)
257 
258  print "VBTF average: %s = %.4f +- %.4f (stat.) [nb]" % (title, average, errstat)
259 
260  absSysLumi = average*relSysLumi
261  print "\tVBTF systematics (1): +- %.4f (exp) +- %.4f (the) +- %.4f (lumi) [nb]" % (errunco, errtheo, absSysLumi)
262  print "\tVBTF systematics (2): +- %.4f (exp+the) +- %.4f (lumi) [nb]" % (errsyst, absSysLumi)
263 
def vbtfXSectionAverage(title, xsection1, xsection2, exsection1, exsection2, sysUnc1, sysUnc2, sysCor1, sysCor2, relSysLumi)
T sqrt(T t)
Definition: SSEVec.h:18
def Averages_3Invpb.vbtfXSectionCheck (   title,
  xsection,
  exsection,
  sysUnc,
  sysCor,
  relSysLumi 
)

INPUTS FOLLOW (they are not the final version)

Utility functions

Definition at line 235 of file Averages_3Invpb.py.

Referenced by vbtfRatioAverage().

235 def vbtfXSectionCheck(title, xsection, exsection, sysUnc, sysCor, relSysLumi):
236  absSysLumi = xsection*relSysLumi
237  print "VBTF inputs: %s = %.4f +- %.4f (stat.) +- %.4f (exp.) +- %.4f (the.) +- %.4f (lumi) [nb]" % (title, xsection, exsection, sysUnc, sysCor, absSysLumi)
238 
def vbtfXSectionCheck(title, xsection, exsection, sysUnc, sysCor, relSysLumi)
INPUTS FOLLOW (they are not the final version)