164 def STDM6CoreCfg(flags, name_tag='STDM6', StreamName='StreamDAOD_STDM6', TriggerListsHelper=None, TauJets_EleRM_in_input=None):
166 if TriggerListsHelper
is None:
167 from DerivationFrameworkPhys.TriggerListsHelper
import TriggerListsHelper
168 TriggerListsHelper = TriggerListsHelper(flags)
170 if TauJets_EleRM_in_input
is None:
172 TauJets_EleRM_in_input = (flags.Input.TypedCollections.count(
'xAOD::TauJetContainer#TauJets_EleRM') > 0)
177 from DerivationFrameworkHiggs.HiggsPhysContent
import HiggsAugmentationAlgsCfg
182 from IsolationSelection.IsolationSelectionConfig
import IsoCloseByAlgsCfg
183 acc.merge(
IsoCloseByAlgsCfg(flags, suff =
"_"+name_tag, isPhysLite =
False, stream_name = StreamName))
188 from DerivationFrameworkMCTruth.HFClassificationCommonConfig
import HFClassificationCommonCfg
194 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
195 from xAODMetaDataCnv.InfileMetaDataConfig
import SetupMetaDataForStreamCfg
196 from DerivationFrameworkCore.SlimmingHelper
import SlimmingHelper
198 STDM6SlimmingHelper =
SlimmingHelper(name_tag+
"SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
199 STDM6SlimmingHelper.SmartCollections = [
"EventInfo",
204 "InDetTrackParticles",
206 "AntiKt4EMPFlowJets",
207 "AntiKt10UFOCSSKJets",
208 "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets",
209 "BTagging_AntiKt4EMPFlow",
210 "BTagging_AntiKtVR30Rmax4Rmin02Track",
211 "MET_Baseline_AntiKt4EMTopo",
212 "MET_Baseline_AntiKt4EMPFlow",
217 "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets",
218 "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets",
219 "AntiKtVR30Rmax4Rmin02PV0TrackJets",
221 if TauJets_EleRM_in_input:
222 STDM6SlimmingHelper.SmartCollections.append(
"TauJets_EleRM")
227 STDM6SlimmingHelper.AllVariables += [
"AFPSiHitContainer",
228 "AFPToFHitContainer",
229 "AFPSiHitsClusterContainer",
231 "AFPToFTrackContainer",
232 "AFPProtonContainer",
233 "AFPVertexContainer",
234 "CaloCalTopoClusters",
239 STDM6SlimmingHelper.AllVariables += [
"MuonSegments",
"EventInfo",
240 "Kt4EMTopoOriginEventShape",
"Kt4EMPFlowEventShape",
"Kt4EMPFlowPUSBEventShape",
"Kt4EMPFlowNeutEventShape",
"Kt4UFOCSSKEventShape",
"Kt4UFOCSSKNeutEventShape",
241 "AntiKt4EMPFlowJets"]
243 excludedVertexAuxData =
"-vxTrackAtVertex.-MvfFitInfo.-isInitialized.-VTAV"
245 StaticContent += [
"xAOD::VertexContainer#SoftBVrtClusterTool_Tight_Vertices"]
246 StaticContent += [
"xAOD::VertexAuxContainer#SoftBVrtClusterTool_Tight_VerticesAux." + excludedVertexAuxData]
247 StaticContent += [
"xAOD::VertexContainer#SoftBVrtClusterTool_Medium_Vertices"]
248 StaticContent += [
"xAOD::VertexAuxContainer#SoftBVrtClusterTool_Medium_VerticesAux." + excludedVertexAuxData]
249 StaticContent += [
"xAOD::VertexContainer#SoftBVrtClusterTool_Loose_Vertices"]
250 StaticContent += [
"xAOD::VertexAuxContainer#SoftBVrtClusterTool_Loose_VerticesAux." + excludedVertexAuxData]
252 STDM6SlimmingHelper.StaticContent = StaticContent
255 STDM6SlimmingHelper.ExtraVariables += [
"AntiKt4EMTopoJets.DFCommonJets_QGTagger_truthjet_nCharged.DFCommonJets_QGTagger_truthjet_pt.DFCommonJets_QGTagger_truthjet_eta.DFCommonJets_QGTagger_NTracks.DFCommonJets_QGTagger_TracksWidth.DFCommonJets_QGTagger_TracksC1.ConeExclBHadronsFinal.ConeExclCHadronsFinal.GhostBHadronsFinal.GhostCHadronsFinal.GhostBHadronsFinalCount.GhostBHadronsFinalPt.GhostCHadronsFinalCount.GhostCHadronsFinalPt",
256 "AntiKt4EMPFlowJets.DFCommonJets_QGTagger_truthjet_nCharged.DFCommonJets_QGTagger_truthjet_pt.DFCommonJets_QGTagger_truthjet_eta.DFCommonJets_QGTagger_NTracks.DFCommonJets_QGTagger_TracksWidth.DFCommonJets_QGTagger_TracksC1.ConeExclBHadronsFinal.ConeExclCHadronsFinal.GhostBHadronsFinal.GhostCHadronsFinal.GhostBHadronsFinalCount.GhostBHadronsFinalPt.GhostCHadronsFinalCount.GhostCHadronsFinalPt.isJvtHS.isJvtPU",
257 "TruthPrimaryVertices.t.x.y.z",
258 "InDetTrackParticles.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.numberOfTRTHits.numberOfTRTOutliers",
259 "EventInfo.GenFiltHT.GenFiltMET.GenFiltHTinclNu.GenFiltPTZ.GenFiltFatJ.HF_Classification.HF_SimpleClassification",
260 "TauJets.dRmax.etOverPtLeadTrk",
261 "TauJets_MuonRM.dRmax.etOverPtLeadTrk",
262 "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET.ex.ey",
263 "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_mht.ex.ey"]
264 if TauJets_EleRM_in_input:
265 STDM6SlimmingHelper.ExtraVariables += [
"TauJets_EleRM.dRmax.etOverPtLeadTrk"]
269 STDM6SlimmingHelper.ExtraVariables += [
"AntiKt4EMTopoJets.DFCommonJets_QGTagger_NTracks.DFCommonJets_QGTagger_TracksWidth.DFCommonJets_QGTagger_TracksC1",
270 "AntiKt4EMPFlowJets.DFCommonJets_QGTagger_NTracks.DFCommonJets_QGTagger_TracksWidth.DFCommonJets_QGTagger_TracksC1",
271 "AntiKt4EMPFlowJets.passOnlyBJVT.DFCommonJets_bJvt.isJvtHS.isJvtPU",
272 "InDetTrackParticles.truthMatchProbability",
273 "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets.zg.rg.NumTrkPt1000.TrackWidthPt1000.GhostMuonSegmentCount.EnergyPerSampling.GhostTrack",
274 "AntiKt10UFOCSSKJets.NumTrkPt1000.TrackWidthPt1000.GhostMuonSegmentCount.EnergyPerSampling.GhostTrack"]
279 for tagger
in [
"GN2Xv00",
"GN2XWithMassv00",
"GN2Xv01"]:
280 for score
in [
"phbb",
"phcc",
"ptop",
"pqcd"]:
281 extraList.append(f
"{tagger}_{score}")
282 STDM6SlimmingHelper.ExtraVariables += [
"AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets." +
".".
join(extraList)]
292 from DerivationFrameworkMCTruth.MCTruthCommonConfig
import addTruth3ContentToSlimmerTool
296 STDM6SlimmingHelper.AppendToDictionary.update({
'TruthParticles':
'xAOD::TruthParticleContainer',
297 'TruthParticlesAux':
'xAOD::TruthParticleAuxContainer'})
299 STDM6SlimmingHelper.AllVariables += [
'TruthHFWithDecayParticles',
'TruthHFWithDecayVertices',
'TruthCharm',
'TruthPileupParticles',
'InTimeAntiKt4TruthJets',
'OutOfTimeAntiKt4TruthJets']
300 STDM6SlimmingHelper.AllVariables += [
"TruthEvents",
"TruthParticles",
"TruthVertices",
"AntiKt4TruthJets",
"AntiKt4TruthWZJets"]
301 STDM6SlimmingHelper.ExtraVariables += [
"Electrons.TruthLink",
304 "AntiKt4EMTopoJets.DFCommonJets_QGTagger_truthjet_nCharged.DFCommonJets_QGTagger_truthjet_pt.DFCommonJets_QGTagger_truthjet_eta.DFCommonJets_QGTagger_NTracks.DFCommonJets_QGTagger_TracksWidth.DFCommonJets_QGTagger_TracksC1.ConeExclBHadronsFinal.ConeExclCHadronsFinal.GhostBHadronsFinal.GhostCHadronsFinal.GhostBHadronsFinalCount.GhostBHadronsFinalPt.GhostCHadronsFinalCount.GhostCHadronsFinalPt",
305 "AntiKt4EMPFlowJets.DFCommonJets_QGTagger_truthjet_nCharged.DFCommonJets_QGTagger_truthjet_pt.DFCommonJets_QGTagger_truthjet_eta.DFCommonJets_QGTagger_NTracks.DFCommonJets_QGTagger_TracksWidth.DFCommonJets_QGTagger_TracksC1.ConeExclBHadronsFinal.ConeExclCHadronsFinal.GhostBHadronsFinal.GhostCHadronsFinal.GhostBHadronsFinalCount.GhostBHadronsFinalPt.GhostCHadronsFinalCount.GhostCHadronsFinalPt",
306 "TruthPrimaryVertices.t.x.y.z",
307 "InDetTrackParticles.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.numberOfTRTHits.numberOfTRTOutliers",
308 "PrimaryVertices.x.y.z.covariance.trackWeights.vertexType.sumPt2",
312 STDM6SlimmingHelper.SmartCollections += [
"AntiKt4TruthWZJets"]
313 STDM6SlimmingHelper.AllVariables += [
"TruthTopQuarkWithDecayParticles",
"TruthTopQuarkWithDecayVertices",
314 "AntiKt4TruthJets",
"InTimeAntiKt4TruthJets",
"OutOfTimeAntiKt4TruthJets",
"TruthParticles"]
315 STDM6SlimmingHelper.ExtraVariables += [
"TruthVertices.barcode.z"]
317 from DerivationFrameworkMCTruth.MCTruthCommonConfig
import AddTauAndDownstreamParticlesCfg
319 STDM6SlimmingHelper.AllVariables += [
'TruthTausWithDecayParticles',
'TruthTausWithDecayVertices']
321 STDM6SlimmingHelper.AppendToDictionary.update({
'Kt4UFOCSSKEventShape':
'xAOD::EventShape',
322 'Kt4UFOCSSKEventShapeAux':
'xAOD::EventShapeAuxInfo',
323 'Kt4UFOCSSKNeutEventShape':
'xAOD::EventShape',
324 'Kt4UFOCSSKNeutEventShapeAux':
'xAOD::EventShapeAuxInfo'})
327 from DerivationFrameworkHiggs.HiggsPhysContent
import setupHiggsSlimmingVariables
331 STDM6SlimmingHelper.IncludeTriggerNavigation =
False
333 STDM6SlimmingHelper.IncludeJetTriggerContent =
True
334 STDM6SlimmingHelper.IncludeMuonTriggerContent =
False
335 STDM6SlimmingHelper.IncludeEGammaTriggerContent =
False
336 STDM6SlimmingHelper.IncludeJetTauEtMissTriggerContent =
False
337 STDM6SlimmingHelper.IncludeTauTriggerContent =
False
338 STDM6SlimmingHelper.IncludeEtMissTriggerContent =
False
339 STDM6SlimmingHelper.IncludeBJetTriggerContent =
False
340 STDM6SlimmingHelper.IncludeBPhysTriggerContent =
False
341 STDM6SlimmingHelper.IncludeMinBiasTriggerContent =
False
345 if flags.Trigger.EDMVersion == 2:
346 from DerivationFrameworkPhys.TriggerMatchingCommonConfig
import AddRun2TriggerMatchingToSlimmingHelper
348 OutputContainerPrefix =
"TrigMatch_",
349 TriggerList = TriggerListsHelper.Run2TriggerNamesTau)
351 OutputContainerPrefix =
"TrigMatch_",
352 TriggerList = TriggerListsHelper.Run2TriggerNamesNoTau)
353 triggerNames = [
"a4tcemsubjesFS",
"a4tcemsubjesISFS",
"a10tclcwsubjesFS",
"a10tclcwsubFS",
"a10ttclcwjesFS",
"GSCJet"]
354 for trigger
in triggerNames:
355 STDM6SlimmingHelper.FinalItemList.append(
'xAOD::AuxContainerBase!#HLT_xAOD__JetContainer_'+trigger+
'Aux.pt.eta.phi.m')
358 if flags.Trigger.EDMVersion == 3
or (flags.Trigger.EDMVersion == 2
and flags.Trigger.doEDMVersionConversion):
359 from TrigNavSlimmingMT.TrigNavSlimmingMTConfig
import AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
362 jetOutputList = [
"AntiKt4PV0TrackJets",
"AntiKt4UFOCSSKJets"]
364 jetOutputList = [
"AntiKt4PV0TrackJets",
"AntiKt4UFOCSSKNoPtCutJets",
"AntiKt4EMPFlowNoPtCutJets",
"AntiKt4EMTopoNoPtCutJets"]
365 from DerivationFrameworkJetEtMiss.JetCommonConfig
import addJetsToSlimmingTool
370 STDM6ItemList = STDM6SlimmingHelper.GetItemList()
371 acc.merge(
OutputStreamCfg(flags,
"DAOD_"+name_tag, ItemList=STDM6ItemList, AcceptAlgs=[name_tag+
"Kernel"]))
372 acc.merge(
SetupMetaDataForStreamCfg(flags,
"DAOD_"+name_tag, AcceptAlgs=[name_tag+
"Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData, MetadataCategory.TruthMetaData]))