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 95 of file LLJ1.py.

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

◆ LLJ1KernelCfg()

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

Definition at line 15 of file LLJ1.py.

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

◆ LLJ1SkimmingToolCfg()

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

Definition at line 52 of file LLJ1.py.

52 def LLJ1SkimmingToolCfg(flags):
53  """Configure the LLJ1 skimming tool"""
54 
55 
56  largeRJetsForSkimming = ["AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets."]
57 
58 
59  sel_1jet_template = "((count (abs({0}eta) < 2.8 && {0}pt > 150*GeV && {0}m > 30*GeV) >= 1))"
60  topology_selection_1jet = "({})".format(
61  " || ".join([sel_1jet_template.format(j) for j in largeRJetsForSkimming])
62  )
63 
64 
65  acc = ComponentAccumulator()
66  acc.addPublicTool(CompFactory.DerivationFramework.xAODStringSkimmingTool(name = "LLJ1ObjectsSkimming",
67  expression = topology_selection_1jet,
68  ),
69  primary = True)
70 
71 
72  TriggersList = [
73 
74  'HLT_j360_a10_lcw_sub_L1J100',
75  'HLT_j420_a10_lcw_L1J100',
76  'HLT_j460_a10t_lcw_jes_L1J100',
77 
78  'HLT_j460_a10sd_cssk_pf_jes_ftf_preselj225_L1J100',
79  'HLT_j460_a10_lcw_subjes_L1J100',
80  'HLT_j460_a10r_L1J100',
81 
82  'HLT_j420_35smcINF_a10sd_cssk_pf_jes_ftf_preselj225_L1J100',
83  'HLT_j420_35smcINF_a10t_lcw_jes_L1J100',
84  ]
85  print(TriggersList)
86 
87 
88  acc.addPublicTool(CompFactory.DerivationFramework.TriggerSkimmingTool(name = "LLJ1TriggerSkimming",
89  TriggerListOR = TriggersList),
90  primary = True)
91 
92  return(acc)
93 
94 
TrigNavSlimmingMTConfig.AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
def AddRun3TrigNavSlimmingCollectionsToSlimmingHelper(slimmingHelper)
Definition: TrigNavSlimmingMTConfig.py:98
python.LLJ1.LLJ1Cfg
def LLJ1Cfg(flags)
Definition: LLJ1.py:95
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:276
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:15
python.TriggerMatchingCommonConfig.AddRun2TriggerMatchingToSlimmingHelper
def AddRun2TriggerMatchingToSlimmingHelper(**kwargs)
Definition: TriggerMatchingCommonConfig.py:49
python.LLJ1.LLJ1SkimmingToolCfg
def LLJ1SkimmingToolCfg(flags)
Definition: LLJ1.py:52
print
void print(char *figname, TCanvas *c1)
Definition: TRTCalib_StrawStatusPlots.cxx:25
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
InfileMetaDataConfig.SetupMetaDataForStreamCfg
def SetupMetaDataForStreamCfg(flags, streamName="", AcceptAlgs=None, createMetadata=None, propagateMetadataFromInput=True, *args, **kwargs)
Definition: InfileMetaDataConfig.py:222
SlimmingHelper
Definition: SlimmingHelper.py:1
python.HION12.DerivationKernel
DerivationKernel
Definition: HION12.py:66