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 203 of file JETM1.py.

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

◆ JETM1ExtraContentCfg()

def python.JETM1.JETM1ExtraContentCfg (   flags)

Definition at line 118 of file JETM1.py.

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

◆ JETM1KernelCfg()

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

Definition at line 41 of file JETM1.py.

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

◆ JETM1SkimmingToolCfg()

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

Definition at line 11 of file JETM1.py.

11 def JETM1SkimmingToolCfg(flags):
12  """Configure the skimming tool"""
13  acc = ComponentAccumulator()
14 
15  from DerivationFrameworkJetEtMiss import TriggerLists
16  # Use this function until trigAPI works for Run 3 jet triggers.
17  triggers = TriggerLists.get_jetTrig(flags)
18 
19  if not flags.Input.isMC:
20 
21  JETM1TrigSkimmingTool = CompFactory.DerivationFramework.TriggerSkimmingTool( name = "JETM1TrigSkimmingTool1",
22  TriggerListOR = triggers )
23 
24  acc.addPublicTool(JETM1TrigSkimmingTool)
25 
26  expression = 'HLT_xe120_pufit_L1XE50'
27  JETM1OfflineSkimmingTool = CompFactory.DerivationFramework.xAODStringSkimmingTool(name = "JETM1OfflineSkimmingTool1",
28  expression = expression)
29 
30  acc.addPublicTool(JETM1OfflineSkimmingTool)
31 
32  # OR of the above two selections
33  acc.addPublicTool(CompFactory.DerivationFramework.FilterCombinationOR(name="JETM1ORTool",
34  FilterList=[JETM1TrigSkimmingTool,JETM1OfflineSkimmingTool] ),
35  primary = True)
36 
37  return(acc)
38 
39 
40 # 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:118
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:262
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:41
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:203
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
python.JETM1.JETM1SkimmingToolCfg
def JETM1SkimmingToolCfg(flags)
Definition: JETM1.py:11