7 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
8 from AthenaConfiguration.ComponentFactory
import CompFactory
9 from AthenaConfiguration.Enums
import LHCPeriod
13 """Configure the track particle merger tool"""
15 VSITrackParticleThinning = CompFactory.DerivationFramework.VSITrackParticleThinning
16 acc.addPublicTool(VSITrackParticleThinning(name, **kwargs),
22 """Configure the track particle merger tool"""
24 JetTrackParticleThinning = CompFactory.DerivationFramework.JetTrackParticleThinning
25 acc.addPublicTool(JetTrackParticleThinning(name, **kwargs),
31 """Configure the track particle merger tool"""
33 JetLargeD0TrackParticleThinning = CompFactory.DerivationFramework.JetLargeD0TrackParticleThinning
34 acc.addPublicTool(JetLargeD0TrackParticleThinning(name, **kwargs),
40 """Configure the RC jet substructure computation tool"""
42 RCJetSubstructureAug = CompFactory.DerivationFramework.RCJetSubstructureAug
43 acc.addPublicTool(RCJetSubstructureAug(name, **kwargs),
49 """Configure the RC jet substructure computation tool"""
51 acc.addPublicTool(CompFactory.DerivationFramework.AugmentationToolLeadingJets(name =
"LLP1AugmentationToolLeadingJets"),
57 """Confiure the vertex constraint tool"""
60 if 'IPEstimator' not in kwargs:
61 from TrkConfig.TrkVertexFitterUtilsConfig
import AtlasTrackToVertexIPEstimatorCfg
64 if 'VertexTrackUpdator' not in kwargs:
65 from TrkConfig.TrkVertexFitterUtilsConfig
import KalmanVertexTrackUpdatorCfg
67 SkipInvertibleCheck =
True))
68 TrackParametersKVU = CompFactory.DerivationFramework.TrackParametersKVU
69 acc.addPublicTool(TrackParametersKVU(name, **kwargs),
75 """Confiure the isolation decorator tool"""
77 TrackParticleCaloCellDecorator = CompFactory.DerivationFramework.TrackParticleCaloCellDecorator
78 acc.addPublicTool(TrackParticleCaloCellDecorator(name, **kwargs),
84 """Confiure the lowpT + high dE/dx track thinniing tool"""
86 PixeldEdxTrackParticleThinning = CompFactory.DerivationFramework.PixeldEdxTrackParticleThinning
87 acc.addPublicTool(PixeldEdxTrackParticleThinning(name, **kwargs),
93 from TriggerMenuMT.TriggerAPI.TriggerAPI
import TriggerAPI
94 from TriggerMenuMT.TriggerAPI.TriggerEnums
import TriggerPeriod, TriggerType
98 allperiods = TriggerPeriod.y2015 | TriggerPeriod.y2016 | TriggerPeriod.y2017 | TriggerPeriod.y2018 | TriggerPeriod.future2e34
99 TriggerAPI.setConfigFlags(flags)
100 trig_el = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.el, livefraction=0.8)
101 trig_mu = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.mu, livefraction=0.8)
102 trig_g = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.g, livefraction=0.8)
103 trig_xe = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.xe, livefraction=0.8)
104 trig_elmu = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.el, additionalTriggerType=TriggerType.mu, livefraction=0.8)
105 trig_mug = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.mu, additionalTriggerType=TriggerType.g, livefraction=0.8)
108 all_run3 = TriggerListsHelper.Run3TriggerNames
109 r_run3_nojets = re.compile(
"(HLT_[1-9]*(j).*)")
110 r_tau = re.compile(
"HLT_.*tau.*")
112 for chain_name
in all_run3:
113 result_jets = r_run3_nojets.match(chain_name)
114 result_taus = r_tau.match(chain_name)
116 if 'perf' in chain_name.lower():
continue
117 if result_jets
is None and result_taus
is None: trig_run3_elmug.append(chain_name)
119 trig_EJ_Run3 = [
"HLT_j200_0eta180_emergingPTF0p08dR1p2_a10sd_cssk_pf_jes_ftf_preselj200_L1J100",
"HLT_j460_a10r_L1J100",
"HLT_j200_0eta180_emergingPTF0p08dR1p2_a10sd_cssk_pf_jes_ftf_preselj200_L1gLJ140p0ETA25",
"HLT_j200_0eta180_emergingPTF0p08dR1p2_a10sd_cssk_pf_jes_ftf_preselj200_L1SC111-CjJ40",
"HLT_j200_0eta180_emergingPTF0p08dR1p2_a10sd_cssk_pf_jes_ftf_preselj200_L1jJ160",
"HLT_j200_0eta180_emergingPTF0p08dR1p2_a10sd_cssk_pf_jes_ftf_preselj200_L1SC175-SCjJ10"]
120 trig_VBF_2018 =[
"HLT_j55_gsc80_bmv2c1070_split_j45_gsc60_bmv2c1085_split_j45_320eta490",
"HLT_j45_gsc55_bmv2c1070_split_2j45_320eta490_L1J25.0ETA23_2J15.31ETA49",
"HLT_j80_0eta240_j60_j45_320eta490_AND_2j35_gsc45_bmv2c1070_split",
"HLT_ht300_2j40_0eta490_invm700_L1HT150-J20s5.ETA31_MJJ-400-CF_AND_2j35_gsc45_bmv2c1070_split",
"HLT_j70_j50_0eta490_invm1100j70_dphi20_deta40_L1MJJ-500-NFF"]
121 trig_VBF_Run3 = [
"HLT_j70_j50a_j0_DJMASS1000j50dphi200x400deta_L1MJJ500NFF",
"HLT_j70_j50a_j0_DJMASS1000j50dphi200x400deta_L1jMJJ-500-NFF"]
122 trig_dispjet_Run3 = [
"HLT_j180_hitdvjet260_tight_L1J100",
"HLT_j180_dispjet50_3d2p_dispjet50_1p_L1J100",
"HLT_j180_2dispjet50_3d2p_L1J100",
"HLT_j180_2dispjet50_3d2p_L1jJ160",
"HLT_j180_dispjet50_3d2p_dispjet50_1p_L1jJ160",
"HLT_j180_dispjet90_x3d1p_L1jJ160",
"HLT_j180_dispjet100_x3d1p_L1jJ160",
"HLT_j180_2dispjet50_3d2p_L1J100",
"HLT_j180_dispjet50_3d2p_dispjet50_1p_L1J100",
"HLT_j180_dispjet90_x3d1p_L1J100",
"HLT_j180_dispjet90_x3d1p_L1J100",
"HLT_j180_dispjet100_x3d1p_L1J100",
"HLT_j180_2dispjet50_2p_L1jJ160",
"HLT_j180_2dispjet50_2p_L1J100"]
123 trig_dedx_Run3 = [
"HLT_xe80_tcpufit_dedxtrk25_medium_L1XE50",
"HLT_xe80_tcpufit_dedxtrk50_medium_L1XE50",
"HLT_xe80_tcpufit_dedxtrk25_medium_L1XE55",
"HLT_xe80_tcpufit_dedxtrk50_medium_L1XE55"]
124 trig_dt_Run3 = [
"HLT_xe80_tcpufit_distrk20_tight_L1XE50",
"HLT_xe80_tcpufit_distrk20_medium_L1XE50",
"HLT_xe80_tcpufit_distrk20_tight_L1XE55",
"HLT_xe80_tcpufit_distrk20_medium_L1XE55"]
125 trig_isohighpt_Run3 = [
"HLT_xe80_tcpufit_isotrk100_medium_iaggrmedium_L1XE50",
"HLT_xe80_tcpufit_isotrk120_medium_iaggrmedium_L1XE50",
"HLT_xe80_tcpufit_isotrk120_medium_iaggrloose_L1XE50",
"HLT_xe80_tcpufit_isotrk140_medium_iaggrmedium_L1XE50"]
126 trig_latemu = [
"HLT_mu10_mgonly_L1LATEMU10_J50",
"HLT_mu10_mgonly_L1LATEMU10_XE50",
"HLT_mu10_mgonly_L1LATE-MU10_XE40",
"HLT_mu10_lateMu_L1LATE-MU8F_jJ90",
"HLT_mu10_lateMu_L1LATE-MU8F_jXE70"]
128 trig_multijet_ht_data22_23 = [
"HLT_2j250c_j120c_pf_ftf_presel2j180XXj80_L1J100",
"HLT_3j200_pf_ftf_L1J100",
"HLT_4j115_pf_ftf_presel4j85_L13J50",
"HLT_4j110_pf_ftf_presel4j85_L13J50",
"HLT_4j120_L13J50",
"HLT_5j70c_pf_ftf_presel5c50_L14J15",
"HLT_5j65c_pf_ftf_presel5c55_L14J15",
"HLT_5j85_pf_ftf_presel5j50_L14J15",
"HLT_5j80_pf_ftf_presel5j50_L14J15",
"HLT_5j80_pf_ftf_presel5j55_L14J15",
"HLT_6j35c_020jvt_pf_ftf_presel6c25_L14J15",
"HLT_6j55c_pf_ftf_presel6j40_L14J15",
"HLT_6j70_pf_ftf_presel6j40_L14J15",
"HLT_7j45_pf_ftf_presel7j30_L14J15",
"HLT_10j40_pf_ftf_presel7j30_L14J15",
"HLT_j0_HT1000_L1HT190-J15s5pETA21",
"HLT_j0_HT1000_L1J100",
"HLT_j0_HT1000_pf_ftf_preselcHT450_L1HT190-J15s5pETA21",
"HLT_j0_HT940_pf_ftf_preselcHT450_L1HT190-J15s5pETA21",
"HLT_j0_HT1000_pf_ftf_preselj180_L1HT190-J15s5pETA21",
"HLT_j0_HT940_pf_ftf_preselj180_L1HT190-J15s5pETA21",
"HLT_j0_HT1000_pf_ftf_preselj180_L1J100"]
130 triggers = trig_el + trig_mu + trig_g + trig_elmu + trig_mug + trig_VBF_2018 + trig_EJ_Run3 + trig_run3_elmug + trig_dispjet_Run3 + trig_xe + trig_multijet_ht_data22_23 + trig_dedx_Run3 + trig_dt_Run3 + trig_isohighpt_Run3 + trig_latemu + trig_VBF_Run3
136 TriggerSkimmingTool = CompFactory.DerivationFramework.TriggerSkimmingTool
137 acc.addPublicTool(TriggerSkimmingTool(name,
139 TriggerListOR = triggers,
146 """Configure the common trigger matching for run 2 DAODs"""
148 triggerList = kwargs[
'TriggerList']
149 outputContainerPrefix = kwargs[
'OutputContainerPrefix']
151 kwargs.setdefault(
'InputElectrons',
'LRTElectrons')
152 kwargs.setdefault(
'InputMuons',
'MuonsLRT')
153 kwargs.setdefault(
'DRThreshold',
None)
158 from DerivationFrameworkTrigger.TriggerMatchingToolConfig
import TriggerMatchingToolCfg
159 if kwargs[
'DRThreshold']
is None:
163 ChainNames = triggerList,
164 OutputContainerPrefix = outputContainerPrefix,
165 InputElectrons = kwargs[
'InputElectrons'],
166 InputMuons = kwargs[
'InputMuons']))
171 ChainNames = triggerList,
172 OutputContainerPrefix = outputContainerPrefix,
173 DRThreshold = kwargs[
'DRThreshold'],
174 InputElectrons = kwargs[
'InputElectrons'],
175 InputMuons = kwargs[
'InputMuons']))
176 CommonAugmentation = CompFactory.DerivationFramework.CommonAugmentation
177 acc.addEventAlgo(CommonAugmentation(f
"{outputContainerPrefix}TriggerMatchingKernel",
178 AugmentationTools=[PhysCommonTriggerMatchingTool]))
183 alg = CompFactory.CP.MuonLRTMergingAlg(name, **kwargs)
184 acc.addEventAlgo(alg, primary=
True)
188 """Configure for merging ZeroPixelHitMuons with the LRTMerged muons for vertexing"""
190 kwargs.setdefault(
'InputMuonContainers', [
'Muons',
'MuonsLRT',
'ZeroPixelHitMuons'])
191 kwargs.setdefault(
'OutputMuonLocation',
'StdWithLRTMuons_wZPH')
192 kwargs.setdefault(
"CreateViewCollection",
True)
195 alg = CompFactory.CP.MuonContainerMergingAlg(name, **kwargs)
196 acc.addEventAlgo(alg, primary=
True)
202 alg = CompFactory.CP.ElectronLRTMergingAlg(name, **kwargs)
203 acc.addEventAlgo(alg, primary=
True)
209 from ROOT
import egammaPID
210 from ElectronPhotonSelectorTools.AsgPhotonIsEMSelectorsConfig
import (
211 AsgPhotonIsEMSelectorCfg,
214 isFullSim = flags.Sim.ISF.Simulator.isFullSim()
if flags.Input.isMC
else False
217 from EGammaVariableCorrection.EGammaVariableCorrectionConfig
import (
218 PhotonVariableCorrectionToolCfg,
221 PhotonVariableCorrectionTool = acc.popToolsAndMerge(
223 acc.addPublicTool(PhotonVariableCorrectionTool)
225 PhotonIsEMSelectorMedium = acc.popToolsAndMerge(
227 flags, name=
"PhotonIsEMSelectorMedium", quality=egammaPID.PhotonIDMedium
230 acc.addPublicTool(PhotonIsEMSelectorMedium)
239 from ElectronPhotonSelectorTools.AsgElectronLikelihoodToolsConfig
import AsgElectronLikelihoodToolCfg
240 from ElectronPhotonSelectorTools.ElectronLikelihoodToolMapping
import electronLHmenu
241 from ROOT
import LikeEnum
243 lhMenu = electronLHmenu.offlineMC21
244 if flags.GeoModel.Run
is LHCPeriod.Run2:
245 lhMenu = electronLHmenu.offlineMC20
249 name=
"ElectronLHSelectorVeryLooseNoPix",
250 quality=LikeEnum.VeryLooseLLP,
253 ElectronLHSelectorVeryLooseNoPix.primaryVertexContainer =
"PrimaryVertices"
257 name=
"ElectronLHSelectorLooseNoPix",
258 quality=LikeEnum.LooseLLP,
261 ElectronLHSelectorLooseNoPix.primaryVertexContainer =
"PrimaryVertices"
265 name=
"ElectronLHSelectorMediumNoPix",
266 quality=LikeEnum.MediumLLP,
269 ElectronLHSelectorMediumNoPix.primaryVertexContainer =
"PrimaryVertices"
273 name=
"ElectronLHSelectorTightNoPix",
274 quality=LikeEnum.TightLLP,
277 ElectronLHSelectorTightNoPix.primaryVertexContainer =
"PrimaryVertices"
279 from DerivationFrameworkEGamma.EGammaToolsConfig
import EGElectronLikelihoodToolWrapperCfg
284 name=
"ElectronPassLHVeryLooseNoPix",
285 EGammaElectronLikelihoodTool=ElectronLHSelectorVeryLooseNoPix,
286 EGammaFudgeMCTool=
"",
288 StoreGateEntryName=
"DFCommonElectronsLHVeryLooseNoPix",
289 ContainerName=
"Electrons",
294 name=
"ElectronPassLHVeryLooseNoPixLRT",
295 EGammaElectronLikelihoodTool=ElectronLHSelectorVeryLooseNoPix,
296 EGammaFudgeMCTool=
"",
298 StoreGateEntryName=
"DFCommonElectronsLHVeryLooseNoPix",
299 ContainerName=
"LRTElectrons",
305 name=
"ElectronPassLHLooseNoPix",
306 EGammaElectronLikelihoodTool=ElectronLHSelectorLooseNoPix,
307 EGammaFudgeMCTool=
"",
309 StoreGateEntryName=
"DFCommonElectronsLHLooseNoPix",
310 ContainerName=
"Electrons",
315 name=
"ElectronPassLHLooseNoPixLRT",
316 EGammaElectronLikelihoodTool=ElectronLHSelectorLooseNoPix,
317 EGammaFudgeMCTool=
"",
319 StoreGateEntryName=
"DFCommonElectronsLHLooseNoPix",
320 ContainerName=
"LRTElectrons",
326 name=
"ElectronPassLHMediumNoPix",
327 EGammaElectronLikelihoodTool=ElectronLHSelectorMediumNoPix,
328 EGammaFudgeMCTool=
"",
330 StoreGateEntryName=
"DFCommonElectronsLHMediumNoPix",
331 ContainerName=
"Electrons",
336 name=
"ElectronPassLHMediumNoPixLRT",
337 EGammaElectronLikelihoodTool=ElectronLHSelectorMediumNoPix,
338 EGammaFudgeMCTool=
"",
340 StoreGateEntryName=
"DFCommonElectronsLHMediumNoPix",
341 ContainerName=
"LRTElectrons",
347 name=
"ElectronPassLHTightNoPix",
348 EGammaElectronLikelihoodTool=ElectronLHSelectorTightNoPix,
349 EGammaFudgeMCTool=
"",
351 StoreGateEntryName=
"DFCommonElectronsLHTightNoPix",
352 ContainerName=
"Electrons",
357 name=
"ElectronPassLHTightNoPixLRT",
358 EGammaElectronLikelihoodTool=ElectronLHSelectorTightNoPix,
359 EGammaFudgeMCTool=
"",
361 StoreGateEntryName=
"DFCommonElectronsLHTightNoPix",
362 ContainerName=
"LRTElectrons",
365 LRTEGAugmentationTools = [ElectronPassLHVeryLooseNoPix,
366 ElectronPassLHVeryLooseNoPixLRT,
367 ElectronPassLHLooseNoPix,
368 ElectronPassLHLooseNoPixLRT,
369 ElectronPassLHMediumNoPix,
370 ElectronPassLHMediumNoPixLRT,
371 ElectronPassLHTightNoPix,
372 ElectronPassLHTightNoPixLRT]
374 acc.addEventAlgo(CompFactory.DerivationFramework.CommonAugmentation(
375 "LLP1EGammaLRTKernel",
376 AugmentationTools=LRTEGAugmentationTools
384 acc.addEventAlgo(CompFactory.RecoverZeroPixelHitMuons(name=
"RecoverZeroPixelHitMuons"))