ATLAS Offline Software
Loading...
Searching...
No Matches
python.DRAW_TAULH Namespace Reference

Functions

 DRAW_TAULHKernelCfg (flags, name='DRAW_TAULHKernel', **kwargs)
 DRAW_TAULHCfg (flags)

Function Documentation

◆ DRAW_TAULHCfg()

python.DRAW_TAULH.DRAW_TAULHCfg ( flags)
Main config fragment for DRAW_TAULH

Definition at line 123 of file DRAW_TAULH.py.

123def DRAW_TAULHCfg(flags):
124 """Main config fragment for DRAW_TAULH"""
125 acc = ComponentAccumulator()
126
127 # Main algorithm (kernel)
128 acc.merge(DRAW_TAULHKernelCfg(flags, name='DRAW_TAULHKernel'))
129 acc.merge(DRAWCommonByteStreamCfg(flags,
130 formatName='DRAW_TAULH',
131 filename=flags.Output.DRAW_TAULHFileName))
132
133 return acc
134
135

◆ DRAW_TAULHKernelCfg()

python.DRAW_TAULH.DRAW_TAULHKernelCfg ( flags,
name = 'DRAW_TAULHKernel',
** kwargs )
Configure DRAW_TAULH kernel

Definition at line 16 of file DRAW_TAULH.py.

16def DRAW_TAULHKernelCfg(flags, name='DRAW_TAULHKernel', **kwargs):
17 """Configure DRAW_TAULH kernel"""
18
19 mlog = logging.getLogger(name)
20 mlog.info('Start configuration')
21
22 acc = ComponentAccumulator()
23 acc.addSequence(seqAND('DRAW_TAULHSequence'))
24
25 # trigger-based skimming
26 # unprescaled - single electron and muon triggers
27 filterList = []
28 if flags.Trigger.EDMVersion >=0:
29 triggerSkimmingTool = CompFactory.DerivationFramework.TriggerSkimmingTool(
30 name = "TAULH_TriggerSkimmingTool",
31 TriggerListOR = ["HLT_e26_lhtight_ivarloose_L1eEM26M",
32 "HLT_e60_lhmedium_L1eEM26M",
33 "HLT_e140_lhloose_L1eEM26M",
34 "HLT_mu24_ivarmedium_L1MU14FCH",
35 "HLT_mu50_L1MU14FCH"] )
36 acc.addPublicTool(triggerSkimmingTool)
37 filterList += [triggerSkimmingTool]
38
39 # tau selection tool
40 from TauAnalysisTools.TauAnalysisToolsConfig import TauSelectionToolCfg
41 TauSelectorMedium = acc.popToolsAndMerge(TauSelectionToolCfg(flags,
42 name = 'TauSelectorMedium_TAULH',
43 ConfigPath = 'TauAnalysisAlgorithms/tau_selection_medium_noeleid.conf'))
44 acc.addPublicTool(TauSelectorMedium)
45
46 from DerivationFrameworkTools.DerivationFrameworkToolsConfig import AsgSelectionToolWrapperCfg
47 TauMediumWrapper = acc.getPrimaryAndMerge(AsgSelectionToolWrapperCfg(flags,
48 name = "TauMediumWrapper_TAULH",
49 ContainerName = "TauJets",
50 StoreGateEntryName = "TauMedium_TAULH",
51 AsgSelectionTool = TauSelectorMedium))
52 acc.addPublicTool(TauMediumWrapper)
53
54 # muon selection tool
55 from MuonSelectorTools.MuonSelectorToolsConfig import MuonSelectionToolCfg
56 MuonSelectorMedium = acc.popToolsAndMerge(MuonSelectionToolCfg(flags, name="MuonSelectorMedium_TAULH",
57 MaxEta=3, MuQuality=2))
58
59 acc.addPublicTool(MuonSelectorMedium)
60
61 MuonMediumWrapper = acc.getPrimaryAndMerge(AsgSelectionToolWrapperCfg(flags,
62 name = "MuonMediumWrapper_TAULH",
63 ContainerName = "Muons",
64 StoreGateEntryName = "MuonMedium_TAULH",
65 AsgSelectionTool = MuonSelectorMedium))
66 acc.addPublicTool(MuonMediumWrapper)
67
68 # The Ztautau Lep-Had skimming using AOD string skimming and delta-R tool
69 # split into selections and requirements
70 el_sel = "(Electrons.pt > 27.0*GeV) && (abs(Electrons.eta) < 2.5) && (Electrons.LHMedium)"
71 mu_sel = "(Muons.pt > 25.0*GeV) && (abs(Muons.eta) < 3.0) && (Muons.MuonMedium_TAULH==1)"
72 tau_sel = "(TauJets.pt > 20*GeV) && (abs(TauJets.charge)==1)" \
73 " && ((TauJets.nChargedTracks == 1) || (TauJets.nChargedTracks == 3)) && (TauJets.TauMedium_TAULH==1)"
74
75 # Add the deltaR tool for electrons
76 tauLH_DeltaRTool = CompFactory.DerivationFramework.DeltaRTool(name = "TAUEH_DeltaRTool",
77 ContainerName = "Electrons",
78 ObjectRequirements = el_sel,
79 SecondContainerName = "TauJets",
80 SecondObjectRequirements= tau_sel,
81 StoreGateEntryName = "TAUEH_DeltaR")
82 acc.addPublicTool(tauLH_DeltaRTool)
83
84 #
85 elRequirement = '( count( ' + el_sel + ' ) == 1 )'
86 muRequirement = '( count( ' + mu_sel + ' ) == 1 )'
87 tauRequirement = '( count( ' + tau_sel + ' ) >= 1 )'
88
89 # additional delta-R requirement for electrons to avoid double counting object
90 expression = "( ("+ elRequirement + " && (count (TAUEH_DeltaR > 0.1) >=1) ) || " + muRequirement + ") && " + tauRequirement
91 from DerivationFrameworkTools.DerivationFrameworkToolsConfig import (
92 xAODStringSkimmingToolCfg)
93 stringSkimmingTool = acc.getPrimaryAndMerge(xAODStringSkimmingToolCfg(
94 flags, name='TAULH_stringSkimmingTool', expression = expression))
95 filterList += [stringSkimmingTool]
96
97 # require trigger AND rec. selection requirements
98 combTool = CompFactory.DerivationFramework.FilterCombinationAND(
99 name="tauSkim", FilterList=filterList)
100 acc.addPublicTool(combTool,primary = True)
101
102 # The kernel for delta-R tool
103 DRAW_TAULHPreKernel = CompFactory.DerivationFramework.DerivationKernel(
104 name='DRAW_TAULHPreKernel',
105 AugmentationTools=[TauMediumWrapper, MuonMediumWrapper],
106 SkimmingTools=[])
107 acc.addEventAlgo(DRAW_TAULHPreKernel, sequenceName='DRAW_TAULHSequence')
108
109 # The main kernel algo
110 DRAW_TAULHKernel = CompFactory.DerivationFramework.DerivationKernel(
111 name='DRAW_TAULHKernel',
112 doChronoStat=(flags.Concurrency.NumThreads <= 1),
113 AugmentationTools=[tauLH_DeltaRTool],
114 SkimmingTools=[combTool])
115
116 acc.addEventAlgo(DRAW_TAULHKernel, sequenceName='DRAW_TAULHSequence')
117
118
119
120 return acc
121
122