ATLAS Offline Software
DRAW_JET.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 #!/usr/bin/env python
3 # ====================================================================
4 # DRAW_JET.py
5 # This defines DRAW_JET, a skimmed DRAW format
6 # ====================================================================
7 
8 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
9 from AthenaConfiguration.ComponentFactory import CompFactory
10 from AthenaCommon.CFElements import seqAND
11 from AthenaCommon.Logging import logging
12 from PrimaryDPDMaker.DRAWCommonByteStream import DRAWCommonByteStreamCfg
13 
14 
15 def DRAW_JETKernelCfg(configFlags, name='DRAW_JETKernel', **kwargs):
16  """Configure DRAW_JET kernel"""
17 
18  mlog = logging.getLogger(name)
19  mlog.info('Start configuration')
20 
21  acc = ComponentAccumulator()
22  acc.addSequence(seqAND('DRAW_JETSequence'))
23 
24  # The selections
25  augmentationTools = []
26 
27  # trigger-based skimming
28  # unprescaled - single electron and muon triggers
29  triggerSkimmingTool = CompFactory.DerivationFramework.TriggerSkimmingTool(
30  name = "JET_TriggerSkimmingTool",
31  TriggerListOR = ["HLT_j85_L1J20",
32  "HLT_j85_a10t_lcw_nojcalib_L120",
33  "HLT_j60f_L1J20p31ETA49"] )
34 
35  acc.addPublicTool(triggerSkimmingTool)
36  skimTool1 = triggerSkimmingTool
37 
38  # selecting events with forward jets to enhance statistics
39  forward_jet_selection = "(AntiKt4EMPFlowJets.pt > 75.0*GeV) && (abs(AntiKt4EMPFlowJets.eta) >= 3.2)"
40  expression = "count(" + forward_jet_selection + ") >= 1"
41 
42 
43  stringSkimmingTool = CompFactory.DerivationFramework.xAODStringSkimmingTool(
44  name='JET_stringSkimmingTool',
45  expression = expression)
46  acc.addPublicTool(stringSkimmingTool)
47  skimTool2 = stringSkimmingTool
48 
49  # require trigger and rec. selection requirements
50  combTool = CompFactory.DerivationFramework.FilterCombinationOR(name="jetSkim", FilterList=[skimTool1,skimTool2])
51  acc.addPublicTool(combTool,primary = True)
52 
53  # The main kernel algo
54  DRAW_JETKernel = CompFactory.DerivationFramework.DerivationKernel(
55  name='DRAW_JETKernel',
56  doChronoStat=(configFlags.Concurrency.NumThreads <= 1),
57  AugmentationTools=augmentationTools,
58  SkimmingTools=[combTool])
59 
60  acc.addEventAlgo(DRAW_JETKernel, sequenceName='DRAW_JETSequence')
61  return acc
62 
63 
64 def DRAW_JETCfg(flags):
65  """Main config fragment for DRAW_JET"""
66  acc = ComponentAccumulator()
67 
68  # Main algorithm (kernel)
69  acc.merge(DRAW_JETKernelCfg(flags, name='DRAW_JETKernel'))
70  acc.merge(DRAWCommonByteStreamCfg(flags,
71  formatName='DRAW_JET',
72  filename=flags.Output.DRAW_JETFileName))
73 
74  return acc
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.CFElements.seqAND
def seqAND(name, subs=[])
Definition: CFElements.py:25
python.DRAW_JET.DRAW_JETKernelCfg
def DRAW_JETKernelCfg(configFlags, name='DRAW_JETKernel', **kwargs)
Definition: DRAW_JET.py:15
python.DRAW_JET.DRAW_JETCfg
def DRAW_JETCfg(flags)
Definition: DRAW_JET.py:64
python.DRAWCommonByteStream.DRAWCommonByteStreamCfg
def DRAWCommonByteStreamCfg(flags, formatName, filename)
Definition: DRAWCommonByteStream.py:9