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

Functions

 LLJ1KernelCfg (flags, name='LLJ1Kernel', **kwargs)
 LLJ1SkimmingToolCfg (flags)
 LLJ1Cfg (flags)

Function Documentation

◆ LLJ1Cfg()

LLJ1Cfg ( flags)

Definition at line 111 of file LLJ1.py.

111def LLJ1Cfg(flags):
112 stream_name = 'StreamDAOD_LLJ1'
113 acc = ComponentAccumulator()
114
115 # Get the lists of triggers needed for trigger matching.
116 # This is needed at this scope (for the slimming) and further down in the config chain
117 # for actually configuring the matching, so we create it here and pass it down
118 # TODO: this should ideally be called higher up to avoid it being run multiple times in a train
119 from DerivationFrameworkPhys.TriggerListsHelper import TriggerListsHelper
120 LLJ1TriggerListsHelper = TriggerListsHelper(flags)
121
122 # Common augmentations
123 acc.merge(LLJ1KernelCfg(flags, name="LLJ1Kernel", StreamName = stream_name, TriggerListsHelper = LLJ1TriggerListsHelper))
124
125 # ============================
126 # Define contents of the format
127 # =============================
128 from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
129 from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
130 from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
131
132 LLJ1SlimmingHelper = SlimmingHelper("LLJ1SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
133 LLJ1SlimmingHelper.SmartCollections = ["EventInfo",
134 "Electrons",
135 "Photons",
136 "Muons",
137 "PrimaryVertices",
138 "InDetTrackParticles",
139 "AntiKt4EMTopoJets",
140 "AntiKt4EMPFlowJets",
141
142 "MET_Baseline_AntiKt4EMTopo",
143 "MET_Baseline_AntiKt4EMPFlow",
144 "TauJets",
145 "TauJets_MuonRM",
146 "DiTauJets",
147 "DiTauJetsLowPt",
148 "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets",
149 ]
150
151 excludedVertexAuxData = "-vxTrackAtVertex.-MvfFitInfo.-isInitialized.-VTAV"
152 StaticContent = []
153 StaticContent += ["xAOD::VertexContainer#SoftBVrtClusterTool_Tight_Vertices"]
154 StaticContent += ["xAOD::VertexAuxContainer#SoftBVrtClusterTool_Tight_VerticesAux." + excludedVertexAuxData]
155 StaticContent += ["xAOD::VertexContainer#SoftBVrtClusterTool_Medium_Vertices"]
156 StaticContent += ["xAOD::VertexAuxContainer#SoftBVrtClusterTool_Medium_VerticesAux." + excludedVertexAuxData]
157 StaticContent += ["xAOD::VertexContainer#SoftBVrtClusterTool_Loose_Vertices"]
158 StaticContent += ["xAOD::VertexAuxContainer#SoftBVrtClusterTool_Loose_VerticesAux." + excludedVertexAuxData]
159
160 LLJ1SlimmingHelper.StaticContent = StaticContent
161
162 # Extra content
163 LLJ1SlimmingHelper.ExtraVariables += ["AntiKt4EMTopoJets.ConeExclBHadronsFinal.ConeExclCHadronsFinal.GhostBHadronsFinal.GhostCHadronsFinal.GhostBHadronsFinalCount.GhostBHadronsFinalPt.GhostCHadronsFinalCount.GhostCHadronsFinalPt.constituentLinks",
164 "AntiKt4EMPFlowJets.ConeExclBHadronsFinal.ConeExclCHadronsFinal.GhostBHadronsFinal.GhostCHadronsFinal.GhostBHadronsFinalCount.GhostBHadronsFinalPt.GhostCHadronsFinalCount.GhostCHadronsFinalPt",
165 "TruthPrimaryVertices.t.x.y.z",
166 "InDetTrackParticles.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.numberOfTRTHits.numberOfTRTOutliers",
167 "EventInfo.GenFiltHT.GenFiltMET.GenFiltHTinclNu.GenFiltPTZ.GenFiltFatJ",
168 "TauJets.dRmax.etOverPtLeadTrk",
169 "TauJets_MuonRM.dRmax.etOverPtLeadTrk",
170 "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET.ex.ey",
171 "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_mht.ex.ey"]
172
173
174 LLJ1SlimmingHelper.AllVariables += ["CaloCalTopoClusters", "CaloCalFwdTopoTowers",
175 "GlobalChargedParticleFlowObjects", "GlobalNeutralParticleFlowObjects",
176 "CHSGChargedParticleFlowObjects","CHSGNeutralParticleFlowObjects",
177 "CSSKGChargedParticleFlowObjects","CSSKGNeutralParticleFlowObjects",
178 "Kt4EMTopoOriginEventShape","Kt4EMPFlowEventShape",
179 "Kt4EMPFlowNeutEventShape","Kt4UFOCSSKEventShape","Kt4UFOCSSKNeutEventShape"
180 ]
181
182 LLJ1SlimmingHelper.ExtraVariables += ["AntiKt4EMPFlowJets.GhostTower.constituentLinks",
183 "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets.SizeParameter.constituentLinks",
184 "UFOCSSK.pt.eta.phi.m.signalType.otherObjectLinks.chargedObjectLinks",
185 "UFO.pt.eta.phi.m.signalType.otherObjectLinks.chargedObjectLinks",
186 "InDetTrackParticles.particleHypothesis.vx.vy.vz.btagIp_d0Uncertainty.btagIp_z0SinThetaUncertainty.btagIp_z0SinTheta.btagIp_trackMomentum.btagIp_trackDisplacement.btagIp_invalidIp",
187 "GSFTrackParticles.particleHypothesis.vx.vy.vz",
188 "PrimaryVertices.x.y.z.covariance.trackWeights",
189 "TauJets.clusterLinks",
190 "Electrons.neutralGlobalFELinks.chargedGlobalFELinks",
191 "Photons.neutralGlobalFELinks",
192 "Muons.energyLossType.EnergyLoss.ParamEnergyLoss.MeasEnergyLoss.EnergyLossSigma.MeasEnergyLossSigma.ParamEnergyLossSigmaPlus.ParamEnergyLossSigmaMinus.clusterLinks.FSR_CandidateEnergy.neutralGlobalFELinks.chargedGlobalFELinks",
193 "MuonSegments.x.y.z.px.py.pz"
194 ]
195
196 LLJ1SlimmingHelper.AppendToDictionary.update({'CSSKGNeutralParticleFlowObjects': 'xAOD::FlowElementContainer',
197 'CSSKGNeutralParticleFlowObjectsAux': 'xAOD::ShallowAuxContainer',
198 'CSSKGChargedParticleFlowObjects': 'xAOD::FlowElementContainer',
199 'CSSKGChargedParticleFlowObjectsAux': 'xAOD::ShallowAuxContainer',
200 'UFO': 'xAOD::FlowElementContainer',
201 'UFOAux': 'xAOD::FlowElementAuxContainer',
202 'Kt4UFOCSSKEventShape': 'xAOD::EventShape',
203 'Kt4UFOCSSKEventShapeAux': 'xAOD::EventShapeAuxInfo',
204 'Kt4UFOCSSKNeutEventShape': 'xAOD::EventShape',
205 'Kt4UFOCSSKNeutEventShapeAux': 'xAOD::EventShapeAuxInfo'})
206
207
208 from DerivationFrameworkJetEtMiss.JetCommonConfig import addOriginCorrectedClustersToSlimmingTool
209 addOriginCorrectedClustersToSlimmingTool(LLJ1SlimmingHelper,writeLC=True,writeEM=True)
210
211 # Truth extra content
212 if flags.Input.isMC:
213
214 from DerivationFrameworkMCTruth.MCTruthCommonConfig import addTruth3ContentToSlimmerTool
215 addTruth3ContentToSlimmerTool(LLJ1SlimmingHelper)
216 LLJ1SlimmingHelper.AllVariables += ['TruthHFWithDecayParticles','TruthHFWithDecayVertices','TruthCharm','TruthPileupParticles','InTimeAntiKt4TruthJets','OutOfTimeAntiKt4TruthJets']
217 LLJ1SlimmingHelper.ExtraVariables += ["Electrons.TruthLink",
218 "Muons.TruthLink",
219 "Photons.TruthLink"]
220
221 # Trigger content
222 LLJ1SlimmingHelper.IncludeTriggerNavigation = False
223 LLJ1SlimmingHelper.IncludeJetTriggerContent = True
224 LLJ1SlimmingHelper.IncludeMuonTriggerContent = False
225 LLJ1SlimmingHelper.IncludeEGammaTriggerContent = False
226 LLJ1SlimmingHelper.IncludeTauTriggerContent = False
227 LLJ1SlimmingHelper.IncludeEtMissTriggerContent = False
228 LLJ1SlimmingHelper.IncludeBJetTriggerContent = False
229 LLJ1SlimmingHelper.IncludeBPhysTriggerContent = False
230 LLJ1SlimmingHelper.IncludeMinBiasTriggerContent = False
231
232 # Trigger matching
233 # Run 2
234 if flags.Trigger.EDMVersion == 2:
235 from DerivationFrameworkPhys.TriggerMatchingCommonConfig import AddRun2TriggerMatchingToSlimmingHelper
236 AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = LLJ1SlimmingHelper,
237 OutputContainerPrefix = "TrigMatch_",
238 TriggerList = LLJ1TriggerListsHelper.Run2TriggerNamesTau)
239 AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = LLJ1SlimmingHelper,
240 OutputContainerPrefix = "TrigMatch_",
241 TriggerList = LLJ1TriggerListsHelper.Run2TriggerNamesNoTau)
242 # Run 3, or Run 2 with navigation conversion
243 if flags.Trigger.EDMVersion == 3 or (flags.Trigger.EDMVersion == 2 and flags.Trigger.doEDMVersionConversion):
244 from TrigNavSlimmingMT.TrigNavSlimmingMTConfig import AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
245 AddRun3TrigNavSlimmingCollectionsToSlimmingHelper(LLJ1SlimmingHelper)
246
247 # Output stream
248 LLJ1ItemList = LLJ1SlimmingHelper.GetItemList()
249 acc.merge(OutputStreamCfg(flags, "DAOD_LLJ1", ItemList=LLJ1ItemList, AcceptAlgs=["LLJ1Kernel"]))
250 acc.merge(SetupMetaDataForStreamCfg(flags, "DAOD_LLJ1", AcceptAlgs=["LLJ1Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData, MetadataCategory.TruthMetaData]))
251
252 return acc
253

◆ LLJ1KernelCfg()

LLJ1KernelCfg ( flags,
name = 'LLJ1Kernel',
** kwargs )
Configure the derivation framework driving algorithm (kernel) for LLJ1

Definition at line 13 of file LLJ1.py.

13def LLJ1KernelCfg(flags, name='LLJ1Kernel', **kwargs):
14 """Configure the derivation framework driving algorithm (kernel) for LLJ1"""
15 acc = ComponentAccumulator()
16
17 # Common augmentations
18 from DerivationFrameworkPhys.PhysCommonConfig import PhysCommonAugmentationsCfg
19 acc.merge(PhysCommonAugmentationsCfg(flags, TriggerListsHelper = kwargs['TriggerListsHelper']))
20
21 # Thinning tools
22 # These are set up in PhysCommonThinningConfig. Only thing needed here the list of tools to schedule
23 thinningToolsArgs = {
24 'TrackParticleThinningToolName' : "LLJ1TrackParticleThinningTool",
25 'MuonTPThinningToolName' : "LLJ1MuonTPThinningTool",
26 'TauJetThinningToolName' : "LLJ1TauJetThinningTool",
27 'TauJets_MuonRMThinningToolName' : "LLJ1TauJets_MuonRMThinningTool",
28 'DiTauThinningToolName' : "LLJ1DiTauThinningTool",
29 'DiTauTPThinningToolName' : "LLJ1DiTauTPThinningTool",
30 'DiTauLowPtThinningToolName' : "LLJ1DiTauLowPtThinningTool",
31 'DiTauLowPtTPThinningToolName' : "LLJ1DiTauLowPtTPThinningTool",
32 }
33 # Configure the thinning tools
34 from DerivationFrameworkPhys.PhysCommonThinningConfig import PhysCommonThinningCfg
35 acc.merge(PhysCommonThinningCfg(flags, StreamName = kwargs['StreamName'], **thinningToolsArgs))
36 # Get them from the CA so they can be added to the kernel
37 thinningTools = []
38 for key in thinningToolsArgs:
39 thinningTools.append(acc.getPublicTool(thinningToolsArgs[key]))
40
41
42 skimmingTool = acc.getPrimaryAndMerge(LLJ1SkimmingToolCfg(flags))
43
44 # The kernel algorithm itself
45 DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
46 acc.addEventAlgo(DerivationKernel(name, ThinningTools = thinningTools))
47 acc.addEventAlgo(DerivationKernel(name, SkimmingTools = [skimmingTool]))
48
49 return acc
50

◆ LLJ1SkimmingToolCfg()

LLJ1SkimmingToolCfg ( flags)
Configure the LLJ1 skimming tool

Definition at line 51 of file LLJ1.py.

51def LLJ1SkimmingToolCfg(flags):
52 """Configure the LLJ1 skimming tool"""
53
54
55 largeRJetsForSkimming = ["AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets."]
56
57
58 sel_1jet_template = "((count (abs({0}eta) < 2.8 && {0}pt > 150*GeV && {0}m > 30*GeV) >= 1))"
59 topology_selection_1jet = "({})".format(
60 " || ".join([sel_1jet_template.format(j) for j in largeRJetsForSkimming])
61 )
62
63
64 acc = ComponentAccumulator()
65 from DerivationFrameworkTools.DerivationFrameworkToolsConfig import (
66 xAODStringSkimmingToolCfg)
67 LLJ1ObjectsSkimming = acc.getPrimaryAndMerge(xAODStringSkimmingToolCfg(
68 flags, name = "LLJ1ObjectsSkimming",
69 expression = topology_selection_1jet))
70 skimmingTools = [LLJ1ObjectsSkimming]
71
72
73 if flags.Trigger.EDMVersion >=0 :
74 TriggersList = [
75
76 'HLT_j360_a10_lcw_sub_L1J100',
77 'HLT_j420_a10_lcw_L1J100',
78 'HLT_j460_a10t_lcw_jes_L1J100',
79
81 'HLT_j420_a10sd_cssk_pf_jes_ftf_preselj225_L1J100',
82 'HLT_j460_a10sd_cssk_pf_jes_ftf_preselj225_L1J100',
83
84 'HLT_j420_a10sd_cssk_pf_jes_ftf_preselj225_L1jJ160',
85 'HLT_j460_a10sd_cssk_pf_jes_ftf_preselj225_L1jJ160',
86
87 'HLT_j460C_a10sd_cssk_pf_jes_ftf_preselj225_L1jJ160',
88
90 'HLT_j420_35smcINF_a10sd_cssk_pf_jes_ftf_preselj225_L1J100',
91
92 'HLT_j420_35smcINF_a10sd_cssk_pf_jes_ftf_preselj225_L1jJ160',
93
94 'HLT_j420C_35smcINF_a10sd_cssk_pf_jes_ftf_preselj225_L1jJ160',
95 ]
96 print(TriggersList)
97
98
99 LLJ1TriggerSkimming = CompFactory.DerivationFramework.TriggerSkimmingTool(
100 name = "LLJ1TriggerSkimming", TriggerListOR = TriggersList)
101 acc.addPublicTool(LLJ1TriggerSkimming)
102 skimmingTools += [LLJ1TriggerSkimming]
103
104 # do the AND of trigger-based and offline-based selection
105 LLJ1_SkimmingTool = CompFactory.DerivationFramework.FilterCombinationAND(
106 name="LLJ1_SkimmingTool", FilterList=skimmingTools)
107 acc.addPublicTool(LLJ1_SkimmingTool, primary=True)
108 return(acc)
109
110
void print(char *figname, TCanvas *c1)