7 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
8 from AthenaConfiguration.ComponentFactory
import CompFactory
9 from AthenaConfiguration.Enums
import MetadataCategory, LHCPeriod
13 """Configure the derivation framework driving algorithm (kernel) for JETM2"""
17 from DerivationFrameworkPhys.PhysCommonConfig
import PhysCommonAugmentationsCfg
22 truthThinningTool = CompFactory.DerivationFramework.MenuTruthThinning(name =
"JETM2TruthThinning",
23 StreamName = kwargs[
'StreamName'],
24 WriteAllStable =
True,
28 WriteCHadrons =
False,
32 acc.addPublicTool(truthThinningTool)
34 DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
35 acc.addEventAlgo(
DerivationKernel(name, ThinningTools = [truthThinningTool]
if flags.Input.isMC
else []))
47 from JetRecConfig.JetRecConfig
import JetRecCfg, getInputAlgs, getConstitPJGAlg
48 from JetRecConfig.JetInputConfig
import buildEventShapeAlg
49 from JetRecConfig.StandardJetConstits
import stdConstitDic
as cst
50 from JetRecConfig.StandardSmallRJets
import AntiKt4UFOCSSKNoPtCut, AntiKt4EMPFlowNoPtCut, AntiKt4EMTopoNoPtCut
51 from JetRecConfig.StandardLargeRJets
import AntiKt10TruthDressedWZSoftDrop
59 if isinstance(alg, ComponentAccumulator):
67 jetList = [AntiKt4UFOCSSKNoPtCut,AntiKt4EMPFlowNoPtCut,AntiKt4EMTopoNoPtCut]
73 jetList += [AntiKt10TruthDressedWZSoftDrop]
92 from DerivationFrameworkMCTruth.MCTruthCommonConfig
import AddTopQuarkAndDownstreamParticlesCfg, AddTruthCollectionNavigationDecorationsCfg
108 from DerivationFrameworkPhys.TriggerListsHelper
import TriggerListsHelper
109 JETM2TriggerListsHelper = TriggerListsHelper(flags)
112 acc.merge(
JETM2KernelCfg(flags, name=
"JETM2Kernel", StreamName =
'StreamDAOD_JETM2', TriggerListsHelper = JETM2TriggerListsHelper))
117 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
118 from xAODMetaDataCnv.InfileMetaDataConfig
import SetupMetaDataForStreamCfg
119 from DerivationFrameworkCore.SlimmingHelper
import SlimmingHelper
121 JETM2SlimmingHelper =
SlimmingHelper(
"JETM2SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
123 JETM2SlimmingHelper.SmartCollections = [
"EventInfo",
"InDetTrackParticles",
"PrimaryVertices",
124 "Electrons",
"Photons",
"Muons",
"TauJets",
125 "MET_Baseline_AntiKt4EMPFlow",
126 "AntiKt4EMTopoNoPtCutJets",
"AntiKt4EMPFlowJets",
127 "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets",
128 "BTagging_AntiKt4EMPFlow",
129 "BTagging_AntiKtVR30Rmax4Rmin02Track"]
131 JETM2SlimmingHelper.AllVariables = [
"CaloCalFwdTopoTowers",
132 "CHSGChargedParticleFlowObjects",
"CHSGNeutralParticleFlowObjects",
133 "CSSKGChargedParticleFlowObjects",
"CSSKGNeutralParticleFlowObjects",
134 "Kt4EMTopoOriginEventShape",
"Kt4EMPFlowEventShape",
"Kt4EMPFlowPUSBEventShape",
135 "Kt4EMPFlowNeutEventShape",
"Kt4UFOCSSKEventShape",
"Kt4UFOCSSKNeutEventShape"]
138 from DerivationFrameworkJetEtMiss.CommonJETMXContent
import ClusterVariables, FlowElementVariables, UFOVariables, TrackingVariables, TrackingVariablesHGTD, FELinks
139 JETM2SlimmingHelper.ExtraVariables += [
".".
join([
"CaloCalTopoClusters"] + ClusterVariables)]
140 JETM2SlimmingHelper.ExtraVariables += [
".".
join([
"GlobalChargedParticleFlowObjects"] + FlowElementVariables)]
141 JETM2SlimmingHelper.ExtraVariables += [
".".
join([
"GlobalNeutralParticleFlowObjects"] + FlowElementVariables)]
142 JETM2SlimmingHelper.ExtraVariables += [
".".
join([
"UFO"] + UFOVariables)]
143 JETM2SlimmingHelper.ExtraVariables += [
".".
join([
"UFOCSSK"] + UFOVariables)]
144 JETM2SlimmingHelper.ExtraVariables += [
".".
join([
"InDetTrackParticles"] + TrackingVariables)]
145 if flags.GeoModel.Run >= LHCPeriod.Run4:
146 JETM2SlimmingHelper.ExtraVariables += [
".".
join([
"InDetTrackParticles"] + TrackingVariablesHGTD)]
149 JETM2SlimmingHelper.ExtraVariables += FELinks
152 from DerivationFrameworkJetEtMiss.CommonJETMXContent
import ExtraJSSVariables
153 JETM2SlimmingHelper.ExtraVariables += [
".".
join([
"AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets"] + ExtraJSSVariables)]
155 JETM2SlimmingHelper.ExtraVariables += [
"AntiKt4EMPFlowJets.GhostTower.IsoFixedCone5Pt.IsoFixedCone5PtPUsub",
156 "AntiKt4EMTopoNoPtCutJets.IsoFixedCone5Pt.IsoFixedCone5PtPUsub",
157 "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets.SizeParameter",
158 "GSFTrackParticles.particleHypothesis.vx.vy.vz",
159 "PrimaryVertices.x.y.z.covariance.trackWeights",
160 "TauJets.clusterLinks",
161 "Muons.energyLossType.EnergyLoss.ParamEnergyLoss.MeasEnergyLoss.EnergyLossSigma.MeasEnergyLossSigma.ParamEnergyLossSigmaPlus.ParamEnergyLossSigmaMinus.clusterLinks.FSR_CandidateEnergy",
162 "MuonSegments.x.y.z.px.py.pz",
163 "BTagging_AntiKt4EMPFlow.jetLink",
164 "BTagging_AntiKtVR30Rmax4Rmin02Track.jetLink"]
166 JETM2SlimmingHelper.AppendToDictionary.update({
'CSSKGNeutralParticleFlowObjects':
'xAOD::FlowElementContainer',
167 'CSSKGNeutralParticleFlowObjectsAux':
'xAOD::ShallowAuxContainer',
168 'CSSKGChargedParticleFlowObjects':
'xAOD::FlowElementContainer',
169 'CSSKGChargedParticleFlowObjectsAux':
'xAOD::ShallowAuxContainer',
170 'UFO':
'xAOD::FlowElementContainer',
171 'UFOAux':
'xAOD::FlowElementAuxContainer',
172 'Kt4UFOCSSKEventShape':
'xAOD::EventShape',
173 'Kt4UFOCSSKEventShapeAux':
'xAOD::EventShapeAuxInfo',
174 'Kt4UFOCSSKNeutEventShape':
'xAOD::EventShape',
175 'Kt4UFOCSSKNeutEventShapeAux':
'xAOD::EventShapeAuxInfo',
176 'AntiKt4EMTopoNoPtCutJets':
'xAOD::JetContainer',
177 'AntiKt4EMTopoNoPtCutJetsAux':
'xAOD::JetAuxContainer'})
179 from DerivationFrameworkJetEtMiss.JetCommonConfig
import addOriginCorrectedClustersToSlimmingTool
185 from DerivationFrameworkMCTruth.MCTruthCommonConfig
import addTruth3ContentToSlimmerTool
188 JETM2SlimmingHelper.AppendToDictionary.update({
'TruthParticles':
'xAOD::TruthParticleContainer',
189 'TruthParticlesAux':
'xAOD::TruthParticleAuxContainer'})
191 JETM2SlimmingHelper.AllVariables += [
"TruthTopQuarkWithDecayParticles",
"TruthTopQuarkWithDecayVertices",
"TruthHFWithDecayParticles",
192 "AntiKt4TruthJets",
"InTimeAntiKt4TruthJets",
"OutOfTimeAntiKt4TruthJets",
193 "TruthParticles",
"TruthVertices",
"TruthEvents"]
194 JETM2SlimmingHelper.ExtraVariables += [
"AntiKt10TruthSoftDropBeta100Zcut10Jets.SizeParameter"]
195 JETM2SlimmingHelper.SmartCollections += [
"AntiKt4TruthJets",
"AntiKt10TruthJets",
"AntiKt4TruthWZJets",
"AntiKt10TruthDressedWZSoftDropBeta100Zcut10Jets"]
197 JETM2SlimmingHelper.ExtraVariables += [
"AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets.GhostTQuarksFinalCount.GhostHBosonsCount.GhostZBosonsCount.GhostWBosonsCount",
198 "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets.GhostTQuarksFinalPt.GhostHBosonsPt.GhostZBosonsPt.GhostWBosonsPt",
199 "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets.GhostBHadronsFinalPt.GhostCHadronsFinalPt",
200 "AntiKt4TruthWZJets.IsoFixedCone5Pt",
201 "AntiKt4TruthDressedWZJets.IsoFixedCone5Pt"]
204 JETM2SlimmingHelper.IncludeTriggerNavigation =
False
205 JETM2SlimmingHelper.IncludeJetTriggerContent =
False
206 JETM2SlimmingHelper.IncludeMuonTriggerContent =
False
207 JETM2SlimmingHelper.IncludeEGammaTriggerContent =
False
208 JETM2SlimmingHelper.IncludeTauTriggerContent =
False
209 JETM2SlimmingHelper.IncludeEtMissTriggerContent =
False
210 JETM2SlimmingHelper.IncludeBJetTriggerContent =
False
211 JETM2SlimmingHelper.IncludeBPhysTriggerContent =
False
212 JETM2SlimmingHelper.IncludeMinBiasTriggerContent =
False
214 jetOutputList = [
"AntiKt4UFOCSSKNoPtCutJets",
"AntiKt4EMPFlowNoPtCutJets"]
215 from DerivationFrameworkJetEtMiss.JetCommonConfig
import addJetsToSlimmingTool
219 JETM2ItemList = JETM2SlimmingHelper.GetItemList()
220 acc.merge(
OutputStreamCfg(flags,
"DAOD_JETM2", ItemList=JETM2ItemList, AcceptAlgs=[
"JETM2Kernel"]))
221 acc.merge(
SetupMetaDataForStreamCfg(flags,
"DAOD_JETM2", AcceptAlgs=[
"JETM2Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData]))