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 270 of file Averages_3Invpb.py.

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

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

Definition at line 266 of file Averages_3Invpb.py.

References edm.print().

Referenced by vbtfRatioAverage().

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

Definition at line 241 of file Averages_3Invpb.py.

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

Referenced by vbtfRatioAverage().

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

INPUTS FOLLOW (they are not the final version)

Utility functions

Definition at line 236 of file Averages_3Invpb.py.

References edm.print().

Referenced by vbtfRatioAverage().

236 def vbtfXSectionCheck(title, xsection, exsection, sysUnc, sysCor, relSysLumi):
237  absSysLumi = xsection*relSysLumi
238  print("VBTF inputs: %s = %.4f +- %.4f (stat.) +- %.4f (exp.) +- %.4f (the.) +- %.4f (lumi) [nb]" % (title, xsection, exsection, sysUnc, sysCor, absSysLumi))
239 
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)