16 """Configure DRAW_TAULH kernel"""
18 mlog = logging.getLogger(name)
19 mlog.info(
'Start configuration')
22 acc.addSequence(
seqAND(
'DRAW_TAULHSequence'))
26 triggerSkimmingTool = CompFactory.DerivationFramework.TriggerSkimmingTool(
27 name =
"TAULH_TriggerSkimmingTool",
28 TriggerListOR = [
"HLT_e26_lhtight_ivarloose_L1eEM26M",
29 "HLT_e60_lhmedium_L1eEM26M",
30 "HLT_e140_lhloose_L1eEM26M",
31 "HLT_mu24_ivarmedium_L1MU14FCH",
32 "HLT_mu50_L1MU14FCH"] )
34 acc.addPublicTool(triggerSkimmingTool)
35 skimTool1 = triggerSkimmingTool
38 from TauAnalysisTools.TauAnalysisToolsConfig
import TauSelectionToolCfg
40 name =
'TauSelectorMedium_TAULH',
41 ConfigPath =
'TauAnalysisAlgorithms/tau_selection_medium_noeleid.conf'))
42 acc.addPublicTool(TauSelectorMedium)
44 from DerivationFrameworkTools.DerivationFrameworkToolsConfig
import AsgSelectionToolWrapperCfg
46 name =
"TauMediumWrapper_TAULH",
47 ContainerName =
"TauJets",
48 StoreGateEntryName =
"TauMedium_TAULH",
49 AsgSelectionTool = TauSelectorMedium))
50 acc.addPublicTool(TauMediumWrapper)
53 from MuonSelectorTools.MuonSelectorToolsConfig
import MuonSelectionToolCfg
54 MuonSelectorMedium = acc.popToolsAndMerge(
MuonSelectionToolCfg(flags, name=
"MuonSelectorMedium_TAULH",
55 MaxEta=3, MuQuality=2))
57 acc.addPublicTool(MuonSelectorMedium)
60 name =
"MuonMediumWrapper_TAULH",
61 ContainerName =
"Muons",
62 StoreGateEntryName =
"MuonMedium_TAULH",
63 AsgSelectionTool = MuonSelectorMedium))
64 acc.addPublicTool(MuonMediumWrapper)
68 el_sel =
"(Electrons.pt > 27.0*GeV) && (abs(Electrons.eta) < 2.5) && (Electrons.LHMedium)"
69 mu_sel =
"(Muons.pt > 25.0*GeV) && (abs(Muons.eta) < 3.0) && (Muons.MuonMedium_TAULH==1)"
70 tau_sel =
"(TauJets.pt > 20*GeV) && (abs(TauJets.charge)==1)" \
71 " && ((TauJets.nChargedTracks == 1) || (TauJets.nChargedTracks == 3)) && (TauJets.TauMedium_TAULH==1)"
74 tauLH_DeltaRTool = CompFactory.DerivationFramework.DeltaRTool(name =
"TAUEH_DeltaRTool",
75 ContainerName =
"Electrons",
76 ObjectRequirements = el_sel,
77 SecondContainerName =
"TauJets",
78 SecondObjectRequirements= tau_sel,
79 StoreGateEntryName =
"TAUEH_DeltaR")
80 acc.addPublicTool(tauLH_DeltaRTool)
83 elRequirement =
'( count( ' + el_sel +
' ) == 1 )'
84 muRequirement =
'( count( ' + mu_sel +
' ) == 1 )'
85 tauRequirement =
'( count( ' + tau_sel +
' ) >= 1 )'
88 expression =
"( ("+ elRequirement +
" && (count (TAUEH_DeltaR > 0.1) >=1) ) || " + muRequirement +
") && " + tauRequirement
90 stringSkimmingTool = CompFactory.DerivationFramework.xAODStringSkimmingTool(
91 name=
'TAULH_stringSkimmingTool',
92 expression = expression)
93 acc.addPublicTool(stringSkimmingTool)
94 skimTool2 = stringSkimmingTool
97 combTool = CompFactory.DerivationFramework.FilterCombinationAND(name=
"tauSkim", FilterList=[skimTool1,skimTool2])
98 acc.addPublicTool(combTool,primary =
True)
101 DRAW_TAULHPreKernel = CompFactory.DerivationFramework.DerivationKernel(
102 name=
'DRAW_TAULHPreKernel',
103 AugmentationTools=[TauMediumWrapper, MuonMediumWrapper],
105 acc.addEventAlgo(DRAW_TAULHPreKernel, sequenceName=
'DRAW_TAULHSequence')
108 DRAW_TAULHKernel = CompFactory.DerivationFramework.DerivationKernel(
109 name=
'DRAW_TAULHKernel',
110 doChronoStat=(flags.Concurrency.NumThreads <= 1),
111 AugmentationTools=[tauLH_DeltaRTool],
112 SkimmingTools=[combTool])
114 acc.addEventAlgo(DRAW_TAULHKernel, sequenceName=
'DRAW_TAULHSequence')