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

Functions

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

Function Documentation

◆ LLJ1Cfg()

python.LLJ1.LLJ1Cfg ( flags)

Definition at line 102 of file LLJ1.py.

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

◆ LLJ1KernelCfg()

python.LLJ1.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()

python.LLJ1.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
80 'HLT_j460_a10sd_cssk_pf_jes_ftf_preselj225_L1J100',
81 'HLT_j460_a10_lcw_subjes_L1J100',
82 'HLT_j460_a10r_L1J100',
83
84 'HLT_j420_35smcINF_a10sd_cssk_pf_jes_ftf_preselj225_L1J100',
85 'HLT_j420_35smcINF_a10t_lcw_jes_L1J100',
86 ]
87 print(TriggersList)
88
89
90 LLJ1TriggerSkimming = CompFactory.DerivationFramework.TriggerSkimmingTool(
91 name = "LLJ1TriggerSkimming", TriggerListOR = TriggersList)
92 acc.addPublicTool(LLJ1TriggerSkimming)
93 skimmingTools += [LLJ1TriggerSkimming]
94
95 # do the AND of trigger-based and offline-based selection
96 LLJ1_SkimmingTool = CompFactory.DerivationFramework.FilterCombinationAND(
97 name="LLJ1_SkimmingTool", FilterList=skimmingTools)
98 acc.addPublicTool(LLJ1_SkimmingTool, primary=True)
99 return(acc)
100
101
void print(char *figname, TCanvas *c1)