CMS 3D CMS Logo

Functions
Averages_36Invpb 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_36Invpb.vbtfRatioAverage (   title,
  ratio1,
  ratio2,
  eratio1,
  eratio2,
  sysUnc1,
  sysUnc2,
  sysCor1,
  sysCor2 
)

Definition at line 271 of file Averages_36Invpb.py.

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

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

Definition at line 267 of file Averages_36Invpb.py.

References edm.print().

Referenced by vbtfRatioAverage().

267 def vbtfRatioCheck(title, ratio, absStat, sysUnc, sysCor):
268  print("VBTF inputs: %s = %.4f +- %.4f (stat.) +- %.4f (exp.) +- %.4f (the.)" % (title, ratio, absStat, sysUnc, sysCor))
269 
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:65
def vbtfRatioCheck(title, ratio, absStat, sysUnc, sysCor)
def Averages_36Invpb.vbtfXSectionAverage (   title,
  xsection1,
  xsection2,
  exsection1,
  exsection2,
  sysUnc1,
  sysUnc2,
  sysCor1,
  sysCor2,
  relSysLumi 
)

Definition at line 242 of file Averages_36Invpb.py.

References edm.print(), and mathSSE.sqrt().

Referenced by vbtfRatioAverage().

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

INPUTS FOLLOW (they are not the final version)

Utility functions

Definition at line 237 of file Averages_36Invpb.py.

References edm.print().

Referenced by vbtfRatioAverage().

237 def vbtfXSectionCheck(title, xsection, exsection, sysUnc, sysCor, relSysLumi):
238  absSysLumi = xsection*relSysLumi
239  print("VBTF inputs: %s = %.4f +- %.4f (stat.) +- %.4f (exp.) +- %.4f (the.) +- %.4f (lumi) [nb]" % (title, xsection, exsection, sysUnc, sysCor, absSysLumi))
240 
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:65
def vbtfXSectionCheck(title, xsection, exsection, sysUnc, sysCor, relSysLumi)
INPUTS FOLLOW (they are not the final version)