Skip to content
Snippets Groups Projects

Draft: [QEE] Wcharm line

Closed Nate Grieser requested to merge QEE_WcharmLine into qee_upgrade_24
Files
69
@@ -12,7 +12,7 @@ import Functors as F
from GaudiKernel.SystemOfUnits import GeV
from PyConf import configurable
from math import sqrt
from Moore.config import register_line_builder
from Moore.lines import Hlt2Line
@@ -56,25 +56,39 @@ def make_jets(name='SimpleJets_{hash}',
@configurable
def make_dijets(tagpair=(None, None), prod_pt_min=10 * GeV, min_dphi=0.0):
def make_dijets(tagpair=(None, None), min_dijet_mass=0 * GeV, prod_pt_min=10 * GeV, min_dphi=0.0, max_dR = 100.0):
"""Make two-jet combinations
"""
jets = make_jets(pt_min=prod_pt_min, tags=tagpair[0])
jet1 = make_jets(pt_min=prod_pt_min, tags=tagpair[0])
jet2 = make_jets(pt_min=prod_pt_min, tags=tagpair[1])
tagfilt0 = F.ALL
tagfilt1 = F.ALL
if (min_dphi > 0.0):
if (min_dphi > 0.0) and (max_dR < 100.0):
delta = F.ADJUST_ANGLE @ (F.CHILD(1, F.PHI) - F.CHILD(2, F.PHI))
combination_code = F.require_all(tagfilt0, tagfilt1,
dR = ( F.SQRT @ ( (F.CHILD(1, F.ETA) - F.CHILD(2, F.ETA)) ** 2 + (F.CHILD(1, F.PHI) - F.CHILD(2, F.PHI)) ** 2) )
combination_code = F.require_all(tagfilt0, tagfilt1, F.MASS > min_dijet_mass,
F.ABS @ delta > min_dphi,
F.ABS @ dR < max_dR)
elif (min_dphi > 0.0):
delta = F.ADJUST_ANGLE @ (F.CHILD(1, F.PHI) - F.CHILD(2, F.PHI))
combination_code = F.require_all(tagfilt0, tagfilt1, F.MASS > min_dijet_mass,
F.ABS @ delta > min_dphi)
elif (max_dR < 100.0):
dR = ( F.SQRT @ ( (F.CHILD(1, F.ETA) - F.CHILD(2, F.ETA)) ** 2 + (F.CHILD(1, F.PHI) - F.CHILD(2, F.PHI)) ** 2) )
combination_code = F.require_all(tagfilt0, tagfilt1, F.MASS > min_dijet_mass, F.CHILD(1, F.OWNPV) == F.CHILD(2, F.OWNPV),
F.ABS @ dR < max_dR)
else:
combination_code = F.require_all(tagfilt0, tagfilt1)
combination_code = F.require_all(tagfilt0, tagfilt1, F.MASS > min_dijet_mass, F.CHILD(1, F.OWNPV) == F.CHILD(2, F.OWNPV))
return ParticleCombiner(
Inputs=[jets, jets],
Inputs=[jet1, jet2],
DecayDescriptor="CLUSjet -> CELLjet CELLjet",
CombinationCut=combination_code,
CompositeCut=F.ALL,
AllowDiffInputsForSameIDChildren = True,
ParticleCombiner="ParticleAdder")
@@ -207,6 +221,22 @@ def diSVTagJet35GeV_line(name='Hlt2QEE_DiSVTagJet35GeVFull',
calo_clusters=True,
persistreco=persistreco)
############ Asymmetric dijet lines ################
@register_line_builder(all_lines)
@configurable
def DiJetIncSVTag_line(name='Hlt2QEE_DiJetIncSVTag_pT10M40dR20Full',
prescale=1,
persistreco=True):
jets = make_dijets(
tagpair=(None,'SV'), min_dijet_mass=40 * GeV, prod_pt_min=20 * GeV, min_dphi=0.0)
return Hlt2Line(
name=name,
algs=upfront_reconstruction() + [require_pvs(make_pvs()), jets],
prescale=prescale,
calo_clusters=True,
persistreco=persistreco)
############ Topo Tag ####################
Loading