19 """Configure DRAW_EGZ kerne"""
21 mlog = logging.getLogger(name)
22 mlog.info(
'Start configuration')
25 acc.addSequence(
seqAND(
'DRAW_EGZSequence'))
30 'Electrons.pt > 20*GeV && Electrons.LHMedium',
32 '(count(eeMass1 > 55*GeV) >= 1)']
33 DRAWEGZSel[
'Zeey'] = [
34 'Electrons.pt > 15*GeV && Electrons.LHMedium',
36 '(count(eeMass2 > 20*GeV && eeMass2 < 90*GeV) >= 1 && count(Photons.pt > 7*GeV && Photons.Tight) >= 1)']
37 DRAWEGZSel[
'Zmmy'] = [
40 '(count(mmMass > 20*GeV && mmMass < 90*GeV) >= 1 && count(Photons.pt > 7*GeV && Photons.Tight) >= 1)']
41 DRAWEGZSel[
'Zefe'] = [
42 'Electrons.pt > 20*GeV && Electrons.LHMedium',
44 '(count(eeMass3 > 55*GeV) >=1'
45 ' && count(Electrons.pt > 20*GeV && Electrons.LHMedium)'
46 ' && count(ForwardElectrons.pt > 20*GeV && ForwardElectrons.Loose))',
47 'ForwardElectrons.pt > 20*GeV && ForwardElectrons.Loose']
50 augmentationTools = []
51 for key, sel
in DRAWEGZSel.items():
53 tool = CompFactory.DerivationFramework.EGInvariantMassTool(
54 name=f
'llmassToolFor{key}',
55 Container1Name=
'Electrons',
56 Container2Name=
'ForwardElectrons',
57 Object1Requirements=sel[0],
58 Object2Requirements=sel[3],
59 Mass1Hypothesis=0.511,
60 Mass2Hypothesis=0.511,
62 StoreGateEntryName=sel[1])
64 tool = CompFactory.DerivationFramework.InvariantMassTool(
65 name=f
'llmassToolFor{key}',
66 ContainerName=
'Electrons' if key.find(
'Zee') >= 0
else 'Muons',
67 ObjectRequirements=sel[0],
68 MassHypothesis=0.511
if key.find(
'Zee') >= 0
else 105.66,
69 StoreGateEntryName=sel[1])
71 augmentationTools.append(tool)
72 acc.addPublicTool(tool)
73 EventSels.append(sel[2])
74 draw_egz =
" || ".
join(EventSels)
75 mlog.info(
'DRAW_EGZ selection '+draw_egz)
78 skimmingTool = CompFactory.DerivationFramework.xAODStringSkimmingTool(
79 name=
'DRAW_EGZSkimmingTool',
81 acc.addPublicTool(skimmingTool)
84 DRAW_EGZKernel = CompFactory.DerivationFramework.DerivationKernel(
85 name=
'DRAW_EGZKernel',
86 doChronoStat=(configFlags.Concurrency.NumThreads <= 1),
87 AugmentationTools=augmentationTools,
88 SkimmingTools=[skimmingTool])
90 acc.addEventAlgo(DRAW_EGZKernel, sequenceName=
'DRAW_EGZSequence')