示例#1
0
for k in uncList:
    print "Getting histograms for syst. ", k
    struth, srecoWithFakes, sbkg, smig, seff, snrt = getHistograms(
        "out_ttallhad_psrw_Syst.root", k, "mttAsymm")
    m.addUncertainty(k, sbkg, smig.project('y'))

# add migration uncertainty
uncUnfList = []  #["me", "ps"]
for k in uncUnfList:
    m.addUnfoldingUncertainty(k, mig[k], eff[k])

# try a curvature-based prior
# first choose alpha using only a MAP estimate
#m.setEntropyPrior()
#m.setCurvaturePrior(1.0)
m.setFirstDerivativePrior(1.0)
#m.setGaussianPrior()

#m.setConstrainArea(True)
m.run(data)
# does the same for the pseudo-data

alpha = {}
alphaChi2 = {}
bestAlphaBias = {}
bestAlphaBiasStd = {}
bestAlphaNormBias = {}
bestAlphaNormBiasStd = {}

for i in ["", "me", "ps"]:
    print "Checking bias due to configuration '%s'" % i
示例#2
0
m = Unfolder(bkg["A"], mig["A"], eff["A"], truth["A"])
m.setUniformPrior()
#m.setGaussianPrior()
#m.setCurvaturePrior()
#m.setEntropyPrior()
#m.setFirstDerivativePrior()

# add migration uncertainty
for k in uncUnfList:
    m.addUnfoldingUncertainty(k, bkg[k], mig[k], eff[k])

# try a curvature-based prior
# first choose alpha using only a MAP estimate
#m.setEntropyPrior()
#m.setCurvaturePrior()
m.setFirstDerivativePrior(fb)
#m.setGaussianPrior()

#m.setConstrainArea(True)
m.run(data)
# does the same for the pseudo-data

alpha = {}
alphaChi2 = {}
bestAlphaBias = {}
bestAlphaBiasStd = {}
bestAlphaNormBias = {}
bestAlphaNormBiasStd = {}

for i in ["A", "B", "C"]:
    print "Checking bias due to configuration '%s'" % i