ATLAS Offline Software
Functions
python.JETM1 Namespace Reference

Functions

def JETM1SkimmingToolCfg (flags)
 
def JETM1KernelCfg (flags, name='JETM1Kernel', **kwargs)
 
def JETM1ExtraContentCfg (flags)
 
def JETM1Cfg (flags)
 

Function Documentation

◆ JETM1Cfg()

def python.JETM1.JETM1Cfg (   flags)

Definition at line 204 of file JETM1.py.

204 def JETM1Cfg(flags):
205 
206  acc = ComponentAccumulator()
207 
208  # Get the lists of triggers needed for trigger matching.
209  # This is needed at this scope (for the slimming) and further down in the config chain
210  # for actually configuring the matching, so we create it here and pass it down
211  # TODO: this should ideally be called higher up to avoid it being run multiple times in a train
212  from DerivationFrameworkPhys.TriggerListsHelper import TriggerListsHelper
213  JETM1TriggerListsHelper = TriggerListsHelper(flags)
214 
215  # Skimming, thinning, augmentation, extra content
216  acc.merge(JETM1KernelCfg(flags, name="JETM1Kernel", StreamName = 'StreamDAOD_JETM1', TriggerListsHelper = JETM1TriggerListsHelper))
217 
218  # ============================
219  # Define contents of the format
220  # =============================
221  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
222  from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
223  from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
224 
225  JETM1SlimmingHelper = SlimmingHelper("JETM1SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
226 
227  JETM1SlimmingHelper.SmartCollections = ["Electrons", "Photons", "Muons", "PrimaryVertices",
228  "InDetTrackParticles",
229  "AntiKt4EMTopoJets",
230  "AntiKt10UFOCSSKJets",
231  "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets",
232  "BTagging_AntiKt4EMPFlow"]
233 
234  JETM1SlimmingHelper.ExtraVariables = ["AntiKt4EMTopoJets.DFCommonJets_QGTagger_NTracks.DFCommonJets_QGTagger_TracksWidth.DFCommonJets_QGTagger_TracksC1",
235  "AntiKt4EMPFlowJets.DFCommonJets_QGTagger_NTracks.DFCommonJets_QGTagger_TracksWidth.DFCommonJets_QGTagger_TracksC1",
236  "AntiKt4EMPFlowJets.passOnlyBJVT.DFCommonJets_bJvt.isJvtHS.isJvtPU",
237  "InDetTrackParticles.truthMatchProbability",
238  "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets.zg.rg.NumTrkPt1000.TrackWidthPt1000.GhostMuonSegmentCount.EnergyPerSampling.GhostTrack",
239  "AntiKt10UFOCSSKJets.NumTrkPt1000.TrackWidthPt1000.GhostMuonSegmentCount.EnergyPerSampling.GhostTrack"]
240 
241  JETM1SlimmingHelper.AllVariables = [ "MuonSegments", "EventInfo",
242  "Kt4EMTopoOriginEventShape","Kt4EMPFlowEventShape","Kt4EMPFlowPUSBEventShape","Kt4EMPFlowNeutEventShape","Kt4UFOCSSKEventShape","Kt4UFOCSSKNeutEventShape",
243  "AntiKt4EMPFlowJets"]
244 
245  # Truth containers
246  if flags.Input.isMC:
247 
248  from DerivationFrameworkMCTruth.MCTruthCommonConfig import addTruth3ContentToSlimmerTool
249  addTruth3ContentToSlimmerTool(JETM1SlimmingHelper)
250 
251  JETM1SlimmingHelper.AppendToDictionary.update({'TruthParticles': 'xAOD::TruthParticleContainer',
252  'TruthParticlesAux': 'xAOD::TruthParticleAuxContainer'})
253 
254  JETM1SlimmingHelper.SmartCollections += ["AntiKt4TruthWZJets"]
255  JETM1SlimmingHelper.AllVariables += ["TruthTopQuarkWithDecayParticles","TruthTopQuarkWithDecayVertices",
256  "AntiKt4TruthJets", "InTimeAntiKt4TruthJets", "OutOfTimeAntiKt4TruthJets", "TruthParticles"]
257  JETM1SlimmingHelper.ExtraVariables += ["TruthVertices.barcode.z"]
258 
259  JETM1SlimmingHelper.AppendToDictionary.update({'Kt4UFOCSSKEventShape':'xAOD::EventShape',
260  'Kt4UFOCSSKEventShapeAux':'xAOD::EventShapeAuxInfo',
261  'Kt4UFOCSSKNeutEventShape':'xAOD::EventShape',
262  'Kt4UFOCSSKNeutEventShapeAux':'xAOD::EventShapeAuxInfo'})
263 
264  # Trigger content
265  JETM1SlimmingHelper.IncludeTriggerNavigation = False
266  JETM1SlimmingHelper.IncludeJetTriggerContent = True
267  JETM1SlimmingHelper.IncludeMuonTriggerContent = False
268  JETM1SlimmingHelper.IncludeEGammaTriggerContent = False
269  JETM1SlimmingHelper.IncludeTauTriggerContent = False
270  JETM1SlimmingHelper.IncludeEtMissTriggerContent = False
271  JETM1SlimmingHelper.IncludeBJetTriggerContent = False
272  JETM1SlimmingHelper.IncludeBPhysTriggerContent = False
273  JETM1SlimmingHelper.IncludeMinBiasTriggerContent = False
274 
275  if flags.Trigger.EDMVersion == 2:
276  triggerNames = ["a4tcemsubjesFS", "a4tcemsubjesISFS", "a10tclcwsubjesFS", "a10tclcwsubFS", "a10ttclcwjesFS", "GSCJet"]
277  for trigger in triggerNames:
278  JETM1SlimmingHelper.FinalItemList.append('xAOD::AuxContainerBase!#HLT_xAOD__JetContainer_'+trigger+'Aux.pt.eta.phi.m')
279 
280  jetOutputList = ["AntiKt4PV0TrackJets", "AntiKt4UFOCSSKJets"]
281  if flags.Input.isMC:
282  jetOutputList = ["AntiKt4PV0TrackJets","AntiKt4UFOCSSKNoPtCutJets","AntiKt4EMPFlowNoPtCutJets","AntiKt4EMTopoNoPtCutJets"]
283  from DerivationFrameworkJetEtMiss.JetCommonConfig import addJetsToSlimmingTool
284  addJetsToSlimmingTool(JETM1SlimmingHelper, jetOutputList, JETM1SlimmingHelper.SmartCollections)
285 
286  # Output stream
287  JETM1ItemList = JETM1SlimmingHelper.GetItemList()
288  acc.merge(OutputStreamCfg(flags, "DAOD_JETM1", ItemList=JETM1ItemList, AcceptAlgs=["JETM1Kernel"]))
289  acc.merge(SetupMetaDataForStreamCfg(flags, "DAOD_JETM1", AcceptAlgs=["JETM1Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData]))
290 
291  return acc
292 

◆ JETM1ExtraContentCfg()

def python.JETM1.JETM1ExtraContentCfg (   flags)

Definition at line 119 of file JETM1.py.

119 def JETM1ExtraContentCfg(flags):
120 
121  acc = ComponentAccumulator()
122 
123  from JetRecConfig.JetRecConfig import JetRecCfg, getModifier
124  from JetRecConfig.StandardJetMods import stdJetModifiers
125  from JetRecConfig.StandardSmallRJets import AntiKt4PV0Track, AntiKt4EMPFlow, AntiKt4EMPFlowNoPtCut, AntiKt4EMTopoNoPtCut
126 
127  #=======================================
128  # Schedule additional jet decorations
129  #=======================================
130  bJVTTool = getModifier(AntiKt4EMPFlow, stdJetModifiers['bJVT'], stdJetModifiers['bJVT'].modspec, flags=flags)
131  acc.addEventAlgo(CompFactory.JetDecorationAlg(name='bJVTAlg',
132  JetContainer='AntiKt4EMPFlowJets',
133  Decorators=[bJVTTool]))
134 
135  #=======================================
136  # R = 0.4 track-jets (needed for Rtrk)
137  #=======================================
138  jetList = [AntiKt4PV0Track]
139 
140  #=======================================
141  # SCHEDULE SMALL-R JETS WITH NO PT CUT
142  #=======================================
143  if flags.Input.isMC:
144  jetList += [AntiKt4EMPFlowNoPtCut, AntiKt4EMTopoNoPtCut]
145 
146  #=======================================
147  # CSSK R = 0.4 UFO jets
148  #=======================================
149  if flags.Input.isMC:
150  from JetRecConfig.StandardSmallRJets import AntiKt4UFOCSSKNoPtCut
151  AntiKt4UFOCSSKNoPtCut_JETM1 = AntiKt4UFOCSSKNoPtCut.clone(
152  modifiers = AntiKt4UFOCSSKNoPtCut.modifiers+("NNJVT",)
153  )
154  jetList += [AntiKt4UFOCSSKNoPtCut_JETM1]
155  else:
156  from JetRecConfig.StandardSmallRJets import AntiKt4UFOCSSK
157  AntiKt4UFOCSSK_JETM1 = AntiKt4UFOCSSK.clone(
158  modifiers = AntiKt4UFOCSSK.modifiers+("NNJVT",)
159  )
160  jetList += [AntiKt4UFOCSSK_JETM1]
161 
162 
163  for jd in jetList:
164  acc.merge(JetRecCfg(flags,jd))
165 
166  #=======================================
167  # UFO CSSK event shape
168  #=======================================
169 
170  from JetRecConfig.JetRecConfig import getConstitPJGAlg
171  from JetRecConfig.StandardJetConstits import stdConstitDic as cst
172  from JetRecConfig.JetInputConfig import buildEventShapeAlg
173 
174  acc.addEventAlgo(buildEventShapeAlg(cst.UFOCSSK,'', suffix=None))
175  acc.addEventAlgo(getConstitPJGAlg(cst.UFOCSSK, suffix='Neut'))
176  acc.addEventAlgo(buildEventShapeAlg(cst.UFOCSSK,'', suffix='Neut'))
177 
178  #=======================================
179  # More detailed truth information
180  #=======================================
181 
182  if flags.Input.isMC:
183  from DerivationFrameworkMCTruth.MCTruthCommonConfig import AddTopQuarkAndDownstreamParticlesCfg
184  acc.merge(AddTopQuarkAndDownstreamParticlesCfg(flags, generations=4,rejectHadronChildren=True))
185 
186  #=======================================
187  # Add Run-2 jet trigger collections
188  # Only needed for Run-2 due to different aux container type (JetTrigAuxContainer) which required special wrapper for conversion to AuxContainerBase
189  # In Run-3, the aux. container type is directly JetAuxContainer (no conversion needed)
190  #=======================================
191 
192  if flags.Trigger.EDMVersion == 2:
193  triggerNames = ["JetContainer_a4tcemsubjesFS", "JetContainer_a4tcemsubjesISFS", "JetContainer_GSCJet",
194  "JetContainer_a10tclcwsubjesFS", "JetContainer_a10tclcwsubFS", "JetContainer_a10ttclcwjesFS"]
195 
196  for trigger in triggerNames:
197  wrapperName = trigger+'AuxWrapper'
198  auxContainerName = 'HLT_xAOD__'+trigger+'Aux'
199 
200  acc.addEventAlgo(CompFactory.xAODMaker.AuxStoreWrapper( wrapperName, SGKeys = [ auxContainerName+"." ] ))
201 
202  return acc
203 

◆ JETM1KernelCfg()

def python.JETM1.JETM1KernelCfg (   flags,
  name = 'JETM1Kernel',
**  kwargs 
)
Configure the derivation framework driving algorithm (kernel) for JETM1

Definition at line 42 of file JETM1.py.

42 def JETM1KernelCfg(flags, name='JETM1Kernel', **kwargs):
43  """Configure the derivation framework driving algorithm (kernel) for JETM1"""
44  acc = ComponentAccumulator()
45 
46  # Skimming
47  if not flags.Input.isMC:
48  skimmingTool = acc.getPrimaryAndMerge(JETM1SkimmingToolCfg(flags))
49 
50  # Common augmentations
51  from DerivationFrameworkPhys.PhysCommonConfig import PhysCommonAugmentationsCfg
52  acc.merge(PhysCommonAugmentationsCfg(flags, TriggerListsHelper = kwargs['TriggerListsHelper']))
53 
54  from DerivationFrameworkInDet.InDetToolsConfig import InDetTrackSelectionToolWrapperCfg
55  DFCommonTrackSelection = acc.getPrimaryAndMerge(InDetTrackSelectionToolWrapperCfg(
56  flags,
57  name = "DFJETM1CommonTrackSelectionLoose",
58  CutLevel = "Loose",
59  DecorationName = "DFJETM1Loose"))
60 
61  acc.addEventAlgo(CompFactory.DerivationFramework.CommonAugmentation("JETM1CommonKernel", AugmentationTools = [DFCommonTrackSelection]))
62 
63  # Thinning tools...
64  from DerivationFrameworkInDet.InDetToolsConfig import MuonTrackParticleThinningCfg, EgammaTrackParticleThinningCfg, JetTrackParticleThinningCfg
65 
66  # Include inner detector tracks associated with muons
67  JETM1MuonTPThinningTool = acc.getPrimaryAndMerge(MuonTrackParticleThinningCfg(
68  flags,
69  name = "JETM1MuonTPThinningTool",
70  StreamName = kwargs['StreamName'],
71  MuonKey = "Muons",
72  InDetTrackParticlesKey = "InDetTrackParticles"))
73 
74  # Include inner detector tracks associated with electonrs
75  JETM1ElectronTPThinningTool = acc.getPrimaryAndMerge(EgammaTrackParticleThinningCfg(
76  flags,
77  name = "JETM1ElectronTPThinningTool",
78  StreamName = kwargs['StreamName'],
79  SGKey = "Electrons",
80  InDetTrackParticlesKey = "InDetTrackParticles"))
81 
82  JETM1_thinning_expression = "InDetTrackParticles.DFJETM1Loose && ( abs(InDetTrackParticles.d0) < 5.0*mm ) && ( abs(DFCommonInDetTrackZ0AtPV*sin(InDetTrackParticles.theta)) < 5.0*mm )"
83 
84  JETM1Akt4JetTPThinningTool = acc.getPrimaryAndMerge(JetTrackParticleThinningCfg(
85  flags,
86  name = "JETM1Akt4JetTPThinningTool",
87  StreamName = kwargs['StreamName'],
88  JetKey = "AntiKt4EMTopoJets",
89  SelectionString = "AntiKt4EMTopoJets.pt > 18*GeV",
90  TrackSelectionString = JETM1_thinning_expression,
91  InDetTrackParticlesKey = "InDetTrackParticles"))
92 
93  JETM1Akt4PFlowJetTPThinningTool = acc.getPrimaryAndMerge(JetTrackParticleThinningCfg(
94  flags,
95  name = "JETM1Akt4PFlowJetTPThinningTool",
96  StreamName = kwargs['StreamName'],
97  JetKey = "AntiKt4EMPFlowJets",
98  SelectionString = "AntiKt4EMPFlowJets.pt > 18*GeV",
99  TrackSelectionString = JETM1_thinning_expression,
100  InDetTrackParticlesKey = "InDetTrackParticles"))
101 
102  # Finally the kernel itself
103  thinningTools = [JETM1MuonTPThinningTool,
104  JETM1ElectronTPThinningTool,
105  JETM1Akt4JetTPThinningTool,
106  JETM1Akt4PFlowJetTPThinningTool]
107  DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
108  acc.addEventAlgo(DerivationKernel(name,
109  ThinningTools = thinningTools,
110  SkimmingTools = [skimmingTool] if not flags.Input.isMC else []))
111 
112 
113  # Extra jet content:
114  acc.merge(JETM1ExtraContentCfg(flags))
115 
116  return acc
117 
118 

◆ JETM1SkimmingToolCfg()

def python.JETM1.JETM1SkimmingToolCfg (   flags)
Configure the skimming tool

Definition at line 12 of file JETM1.py.

12 def JETM1SkimmingToolCfg(flags):
13  """Configure the skimming tool"""
14  acc = ComponentAccumulator()
15 
16  from DerivationFrameworkJetEtMiss import TriggerLists
17  # Use this function until trigAPI works for Run 3 jet triggers.
18  triggers = TriggerLists.get_jetTrig(flags)
19 
20  if not flags.Input.isMC:
21 
22  JETM1TrigSkimmingTool = CompFactory.DerivationFramework.TriggerSkimmingTool( name = "JETM1TrigSkimmingTool1",
23  TriggerListOR = triggers )
24 
25  acc.addPublicTool(JETM1TrigSkimmingTool)
26 
27  expression = 'HLT_xe120_pufit_L1XE50'
28  JETM1OfflineSkimmingTool = CompFactory.DerivationFramework.xAODStringSkimmingTool(name = "JETM1OfflineSkimmingTool1",
29  expression = expression)
30 
31  acc.addPublicTool(JETM1OfflineSkimmingTool)
32 
33  # OR of the above two selections
34  acc.addPublicTool(CompFactory.DerivationFramework.FilterCombinationOR(name="JETM1ORTool",
35  FilterList=[JETM1TrigSkimmingTool,JETM1OfflineSkimmingTool] ),
36  primary = True)
37 
38  return(acc)
39 
40 
41 # Main algorithm config
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.InDetToolsConfig.InDetTrackSelectionToolWrapperCfg
def InDetTrackSelectionToolWrapperCfg(flags, name, CutLevel="TightPrimary", **kwargs)
Definition: InDetToolsConfig.py:426
python.OutputStreamConfig.OutputStreamCfg
def OutputStreamCfg(flags, streamName, ItemList=[], MetadataItemList=[], disableEventTag=False, trigNavThinningSvc=None, takeItemsFromInput=False, extendProvenanceRecord=True, AcceptAlgs=[], HelperTools=[])
Definition: OutputStreamConfig.py:12
python.JetInputConfig.buildEventShapeAlg
def buildEventShapeAlg(jetOrConstitdef, inputspec, voronoiRf=0.9, radius=0.4, suffix=None)
Definition: JetInputConfig.py:132
python.JetRecConfig.getModifier
def getModifier(jetdef, moddef, modspec, flags=None)
Definition: JetRecConfig.py:658
python.JETM1.JETM1ExtraContentCfg
def JETM1ExtraContentCfg(flags)
Definition: JETM1.py:119
python.MCTruthCommonConfig.AddTopQuarkAndDownstreamParticlesCfg
def AddTopQuarkAndDownstreamParticlesCfg(flags, generations=1, rejectHadronChildren=False)
Definition: MCTruthCommonConfig.py:253
python.JetRecConfig.JetRecCfg
def JetRecCfg(flags, jetdef, returnConfiguredDef=False)
Top level functions returning ComponentAccumulator out of JetDefinition.
Definition: JetRecConfig.py:36
python.JetCommonConfig.addJetsToSlimmingTool
def addJetsToSlimmingTool(slimhelper, contentlist, smartlist=[])
Definition: JetCommonConfig.py:249
python.InDetToolsConfig.JetTrackParticleThinningCfg
def JetTrackParticleThinningCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:560
python.InDetToolsConfig.MuonTrackParticleThinningCfg
def MuonTrackParticleThinningCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:528
python.JETM1.JETM1KernelCfg
def JETM1KernelCfg(flags, name='JETM1Kernel', **kwargs)
Definition: JETM1.py:42
python.JetRecConfig.getConstitPJGAlg
def getConstitPJGAlg(constitdef, suffix=None, flags=None, parent_jetdef=None)
Definition: JetRecConfig.py:350
python.MCTruthCommonConfig.addTruth3ContentToSlimmerTool
def addTruth3ContentToSlimmerTool(slimmer)
Definition: MCTruthCommonConfig.py:462
python.InDetToolsConfig.EgammaTrackParticleThinningCfg
def EgammaTrackParticleThinningCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:579
python.JETM1.JETM1Cfg
def JETM1Cfg(flags)
Definition: JETM1.py:204
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:219
SlimmingHelper
Definition: SlimmingHelper.py:1
python.HION12.DerivationKernel
DerivationKernel
Definition: HION12.py:67
python.JETM1.JETM1SkimmingToolCfg
def JETM1SkimmingToolCfg(flags)
Definition: JETM1.py:12