示例#1
0
    #HiggsVH150,
    ]


mc_higgs = copy.copy( mc_higgs_vbf )
mc_higgs.extend( mc_higgs_ggh )
mc_higgs.extend( mc_higgs_vh )


pattern = re.compile('Higgs(\D+)(\d+)')
for h in mc_higgs:
    # import pdb; pdb.set_trace()
    m = pattern.match( h.name )
    process = m.group(1)
    mass = float(m.group(2))
    xSection = 0.
    if process=='VH':
        xSection += yrparser8TeV.get(mass)['WH']['sigma']
        xSection += yrparser8TeV.get(mass)['ZH']['sigma']
    else:
        xSection += yrparser8TeV.get(mass)[process]['sigma']
    br = yrparser8TeV.get(mass)['H2F']['tautau']
    h.xSection = xSection*br
    h.branchingRatio = br
    print h.name, 'sigma*br =', h.xSection, 'sigma =', xSection, 'br =', h.branchingRatio


# print 'generating shifted samples'
# mc_higgs_up = sampleShift( locals(), mc_higgs, 'Up')
# mc_higgs_down = sampleShift( locals(), mc_higgs, 'Down')
示例#2
0
文件: higgs.py 项目: geonmo/cmg-cmssw
pattern = re.compile('Higgs(\D+)(\d+)')
for h in mc_higgs:
    # import pdb ; pdb.set_trace()
    # import pdb; pdb.set_trace()
    m = pattern.match( h.name )
    process = m.group(1)
    if 'toWW' in process :
      process = process.replace('toWW','')
      isToWW = True
    else :
      isToWW = False     
    mass = float(m.group(2))
    xSection = 0.
    try:
        if process=='VH':
            xSection += yrparser8TeV.get(mass)['WH']['sigma']
            xSection += yrparser8TeV.get(mass)['ZH']['sigma']
        else:
            xSection += yrparser8TeV.get(mass)[process]['sigma']
    except KeyError:
        print 'Higgs mass', mass, 'not found in cross section tables. Interpolating linearly at +- 1 GeV...'
        if process=='VH':
            xSection += 0.5 * (yrparser8TeV.get(mass-1.)['WH']['sigma'] + xSection + yrparser8TeV.get(mass+1.)['WH']['sigma'])
            xSection += 0.5 * (yrparser8TeV.get(mass-1.)['ZH']['sigma'] + yrparser8TeV.get(mass+1.)['ZH']['sigma'])
        else:
            xSection += 0.5 * (yrparser8TeV.get(mass-1.)[process]['sigma'] + yrparser8TeV.get(mass+1.)[process]['sigma'])

    if not isToWW :
      br = yrparser8TeV.get(mass)['H2F']['tautau']
    else :
      br = yrparser8TeV.get(mass)['H2B']['WW']
示例#3
0
    m = pattern.match(h.name)
    process = m.group(1)
    if "toWW" in process:
        process = process.replace("toWW", "")
        isToWW = True
    else:
        isToWW = False
    mass = float(m.group(2))
    xSection = 0.0
    xSectionWH = 0.0
    xSectionZH = 0.0
    xSectionttH = 0.0

    try:
        if process == "VH":
            xSectionWH = yrparser8TeV.get(mass)["WH"]["sigma"]
            xSectionZH = yrparser8TeV.get(mass)["ZH"]["sigma"]
            xSectionttH = yrparser8TeV.get(mass)["TTH"]["sigma"]
            xSection = xSectionWH + xSectionZH + xSectionttH

        else:
            xSection += yrparser8TeV.get(mass)[process]["sigma"]
    except KeyError:
        print "Higgs mass", mass, "not found in cross section tables. Interpolating linearly at +- 1 GeV..."
        if process == "VH":
            xSectionWH = 0.5 * (
                yrparser8TeV.get(mass - 1.0)["WH"]["sigma"] + yrparser8TeV.get(mass + 1.0)["WH"]["sigma"]
            )
            xSectionZH = 0.5 * (
                yrparser8TeV.get(mass - 1.0)["ZH"]["sigma"] + yrparser8TeV.get(mass + 1.0)["ZH"]["sigma"]
            )
示例#4
0
]

mc_higgs = copy.copy(mc_higgs_vbf)
mc_higgs.extend(mc_higgs_ggh)
mc_higgs.extend(mc_higgs_vh)

pattern = re.compile('Higgs(\D+)(\d+)')
for h in mc_higgs:
    # import pdb; pdb.set_trace()
    m = pattern.match(h.name)
    process = m.group(1)
    mass = float(m.group(2))
    xSection = 0.
    try:
        if process == 'VH':
            xSection += yrparser8TeV.get(mass)['WH']['sigma']
            xSection += yrparser8TeV.get(mass)['ZH']['sigma']
        else:
            xSection += yrparser8TeV.get(mass)[process]['sigma']
    except KeyError:
        print 'Higgs mass', mass, 'not found in cross section tables. Interpolating linearly at +- 1 GeV...'
        if process == 'VH':
            xSection += 0.5 * (yrparser8TeV.get(mass - 1.)['WH']['sigma'] +
                               xSection +
                               yrparser8TeV.get(mass + 1.)['WH']['sigma'])
            xSection += 0.5 * (yrparser8TeV.get(mass - 1.)['ZH']['sigma'] +
                               yrparser8TeV.get(mass + 1.)['ZH']['sigma'])
        else:
            xSection += 0.5 * (yrparser8TeV.get(mass - 1.)[process]['sigma'] +
                               yrparser8TeV.get(mass + 1.)[process]['sigma'])