ATLAS Offline Software
Functions
python.LLJ1 Namespace Reference

Functions

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

Function Documentation

◆ LLJ1Cfg()

def python.LLJ1.LLJ1Cfg (   flags)

Definition at line 96 of file LLJ1.py.

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

◆ LLJ1KernelCfg()

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

Definition at line 16 of file LLJ1.py.

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

◆ LLJ1SkimmingToolCfg()

def python.LLJ1.LLJ1SkimmingToolCfg (   flags)
Configure the LLJ1 skimming tool

Definition at line 53 of file LLJ1.py.

53 def LLJ1SkimmingToolCfg(flags):
54  """Configure the LLJ1 skimming tool"""
55 
56 
57  largeRJetsForSkimming = ["AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets."]
58 
59 
60  sel_1jet_template = "((count (abs({0}eta) < 2.8 && {0}pt > 150*GeV && {0}m > 30*GeV) >= 1))"
61  topology_selection_1jet = "({})".format(
62  " || ".join([sel_1jet_template.format(j) for j in largeRJetsForSkimming])
63  )
64 
65 
66  acc = ComponentAccumulator()
67  acc.addPublicTool(CompFactory.DerivationFramework.xAODStringSkimmingTool(name = "LLJ1ObjectsSkimming",
68  expression = topology_selection_1jet,
69  ),
70  primary = True)
71 
72 
73  TriggersList = [
74 
75  'HLT_j360_a10_lcw_sub_L1J100',
76  'HLT_j420_a10_lcw_L1J100',
77  'HLT_j460_a10t_lcw_jes_L1J100',
78 
79  'HLT_j460_a10sd_cssk_pf_jes_ftf_preselj225_L1J100',
80  'HLT_j460_a10_lcw_subjes_L1J100',
81  'HLT_j460_a10r_L1J100',
82 
83  'HLT_j420_35smcINF_a10sd_cssk_pf_jes_ftf_preselj225_L1J100',
84  'HLT_j420_35smcINF_a10t_lcw_jes_L1J100',
85  ]
86  print(TriggersList)
87 
88 
89  acc.addPublicTool(CompFactory.DerivationFramework.TriggerSkimmingTool(name = "LLJ1TriggerSkimming",
90  TriggerListOR = TriggersList),
91  primary = True)
92 
93  return(acc)
94 
95 
TrigNavSlimmingMTConfig.AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
def AddRun3TrigNavSlimmingCollectionsToSlimmingHelper(slimmingHelper)
Definition: TrigNavSlimmingMTConfig.py:98
python.LLJ1.LLJ1Cfg
def LLJ1Cfg(flags)
Definition: LLJ1.py:96
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
vtune_athena.format
format
Definition: vtune_athena.py:14
python.OutputStreamConfig.OutputStreamCfg
def OutputStreamCfg(flags, streamName, ItemList=[], MetadataItemList=[], disableEventTag=False, trigNavThinningSvc=None, takeItemsFromInput=False, extendProvenanceRecord=True, AcceptAlgs=[], HelperTools=[])
Definition: OutputStreamConfig.py:12
python.JetCommonConfig.addOriginCorrectedClustersToSlimmingTool
def addOriginCorrectedClustersToSlimmingTool(slimhelper, writeLC=False, writeEM=False)
Helper to add origin corrected clusters to output.
Definition: JetCommonConfig.py:263
python.PhysCommonThinningConfig.PhysCommonThinningCfg
def PhysCommonThinningCfg(flags, StreamName="StreamDAOD_PHYS", **kwargs)
Definition: PhysCommonThinningConfig.py:9
python.LLJ1.LLJ1KernelCfg
def LLJ1KernelCfg(flags, name='LLJ1Kernel', **kwargs)
Definition: LLJ1.py:16
python.TriggerMatchingCommonConfig.AddRun2TriggerMatchingToSlimmingHelper
def AddRun2TriggerMatchingToSlimmingHelper(**kwargs)
Definition: TriggerMatchingCommonConfig.py:49
python.LLJ1.LLJ1SkimmingToolCfg
def LLJ1SkimmingToolCfg(flags)
Definition: LLJ1.py:53
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
python.MCTruthCommonConfig.addTruth3ContentToSlimmerTool
def addTruth3ContentToSlimmerTool(slimmer)
Definition: MCTruthCommonConfig.py:462
python.PhysCommonConfig.PhysCommonAugmentationsCfg
def PhysCommonAugmentationsCfg(flags, **kwargs)
Definition: PhysCommonConfig.py:14
dbg::print
void print(std::FILE *stream, std::format_string< Args... > fmt, Args &&... args)
Definition: SGImplSvc.cxx:70
InfileMetaDataConfig.SetupMetaDataForStreamCfg
def SetupMetaDataForStreamCfg(flags, streamName="", AcceptAlgs=None, createMetadata=None, propagateMetadataFromInput=True, *args, **kwargs)
Definition: InfileMetaDataConfig.py:219
SlimmingHelper
Definition: SlimmingHelper.py:1
python.HION12.DerivationKernel
DerivationKernel
Definition: HION12.py:67