ATLAS Offline Software
Functions | Variables
python.JETM42 Namespace Reference

Functions

def JETM42KernelCfg (flags, name='JETM42Kernel', **kwargs)
 
def JETM42CoreCfg (flags, name, StreamName, TriggerListsHelper, TauJets_EleRM_in_input)
 
def JETM42Cfg (flags)
 

Variables

 logJETM42 = logging.getLogger('JETM42')
 

Function Documentation

◆ JETM42Cfg()

def python.JETM42.JETM42Cfg (   flags)

Definition at line 154 of file JETM42.py.

154 def JETM42Cfg(flags):
155  acc = ComponentAccumulator()
156 
157  # the name_tag has to consistent between KernelCfg and CoreCfg
158  JETM42_name_tag = 'JETM42'
159 
160 
161  # Get the lists of triggers needed for trigger matching.
162  # This is needed at this scope (for the slimming) and further down in the config chain
163  # for actually configuring the matching, so we create it here and pass it down
164  # TODO: this should ideally be called higher up to avoid it being run multiple times in a train
165  from DerivationFrameworkPhys.TriggerListsHelper import TriggerListsHelper
166  JETM42TriggerListsHelper = TriggerListsHelper(flags)
167 
168  # for AOD produced before 24.0.17, the electron removal tau is not available
169  TauJets_EleRM_in_input = (flags.Input.TypedCollections.count('xAOD::TauJetContainer#TauJets_EleRM') > 0)
170 
171  # Common augmentations
172  acc.merge(JETM42KernelCfg(flags,
173  name= JETM42_name_tag + "Kernel",
174  StreamName = 'StreamDAOD_'+JETM42_name_tag,
175  TriggerListsHelper = JETM42TriggerListsHelper,
176  TauJets_EleRM_in_input=TauJets_EleRM_in_input
177  ))
178 
179  # PHYS content
180  acc.merge(JETM42CoreCfg(flags,
181  name=JETM42_name_tag,
182  StreamName = 'StreamDAOD_'+JETM42_name_tag,
183  TriggerListsHelper = JETM42TriggerListsHelper,
184  TauJets_EleRM_in_input=TauJets_EleRM_in_input
185  ))
186 
187  return acc
188 
189 

◆ JETM42CoreCfg()

def python.JETM42.JETM42CoreCfg (   flags,
  name,
  StreamName,
  TriggerListsHelper,
  TauJets_EleRM_in_input 
)

Definition at line 112 of file JETM42.py.

112 def JETM42CoreCfg(flags, name, StreamName, TriggerListsHelper, TauJets_EleRM_in_input):
113 
114  acc = ComponentAccumulator()
115 
116  from DerivationFrameworkPhys.PHYS import PHYSCoreCfg
117  acc.merge(PHYSCoreCfg(flags, name, StreamName = StreamName, TriggerListsHelper = TriggerListsHelper, TauJets_EleRM_in_input=TauJets_EleRM_in_input))
118 
119  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
120  from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
121 
122  JETM42SlimmingHelper = SlimmingHelper(name+"SlimmingHelper", flags=flags, NamesAndTypes = flags.Input.TypedCollections)
123 
124  JETM42SlimmingHelper.AllVariables = ["CaloCalTopoClusters", "CaloTopoClusters422", "CaloCalAllTopoTowers",
125  "EMTopoClusters422","EMTopoClusters422SK","TopoTowers","TopoTowersSK",
126  ]
127 
128  JETM42SlimmingHelper.AppendToDictionary.update({'EMTopoClusters422': 'xAOD::CaloClusterContainer',
129  'EMTopoClusters422Aux': 'xAOD::ShallowAuxContainer',
130  'EMTopoClusters422SK': 'xAOD::CaloClusterContainer',
131  'EMTopoClusters422SKAux': 'xAOD::ShallowAuxContainer',
132  'TopoTowers': 'xAOD::CaloClusterContainer',
133  'TopoTowersAux': 'xAOD::ShallowAuxContainer',
134  'TopoTowersSK': 'xAOD::CaloClusterContainer',
135  'TopoTowersSKAux': 'xAOD::ShallowAuxContainer',
136  })
137 
138 
139  jetOutputList = ["AntiKt4EMTopo422Jets","AntiKt4EMTopo422SKJets","AntiKt4TopoTowerJets","AntiKt4TopoTowerSKJets"]
140  from DerivationFrameworkJetEtMiss.JetCommonConfig import addJetsToSlimmingTool
141  addJetsToSlimmingTool(JETM42SlimmingHelper, jetOutputList, JETM42SlimmingHelper.SmartCollections)
142 
143  # Pass through all trigger content
144  from DerivationFrameworkTrigger.TrigSlimmingHelper import addTrigEDMSetToOutput
145  addTrigEDMSetToOutput(flags, helper=JETM42SlimmingHelper, edmSet="ESD")
146 
147  # Output stream
148  JETM42ItemList = JETM42SlimmingHelper.GetItemList()
149  acc.merge(OutputStreamCfg(flags, "DAOD_"+name, ItemList=JETM42ItemList, AcceptAlgs=[name+"Kernel"]))
150 
151  return acc
152 
153 

◆ JETM42KernelCfg()

def python.JETM42.JETM42KernelCfg (   flags,
  name = 'JETM42Kernel',
**  kwargs 
)
Configure the derivation framework driving algorithm (kernel) for JETM42

Definition at line 13 of file JETM42.py.

13 def JETM42KernelCfg(flags, name='JETM42Kernel', **kwargs):
14  """Configure the derivation framework driving algorithm (kernel) for JETM42"""
15  acc = ComponentAccumulator()
16 
17  from DerivationFrameworkPhys.PhysCommonConfig import PhysCommonAugmentationsCfg
19  flags,
20  TriggerListsHelper = kwargs['TriggerListsHelper'],
21  TauJets_EleRM_in_input = kwargs['TauJets_EleRM_in_input']
22  ))
23 
24  thinningToolsArgs = {
25  'DiTauLowPtThinningToolName' : "PHYSDiTauLowPtThinningTool",
26  }
27 
28  from DerivationFrameworkPhys.PhysCommonThinningConfig import PhysCommonThinningCfg
29 
30  acc.merge(PhysCommonThinningCfg(flags, StreamName = kwargs['StreamName'], **thinningToolsArgs))
31  # Get them from the CA so they can be added to the kernel
32  thinningTools = []
33  for key in thinningToolsArgs:
34  thinningTools.append(acc.getPublicTool(thinningToolsArgs[key]))
35 
36  # The kernel algorithm itself
37  DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
38  acc.addEventAlgo(DerivationKernel(name, ThinningTools = thinningTools))
39 
40 
41  from JetRecConfig.JetRecConfig import JetRecCfg, getInputAlgs
42  from JetRecConfig.StandardJetConstits import stdConstitDic as cst, standardReco, stdInputExtDic as inpext
43  from ROOT import xAODType
44 
45  #=======================================
46  # CHS R = 0.4 422 jets
47  #=======================================
48 
49  from JetRecConfig.JetDefinition import JetDefinition, JetInputConstitSeq, JetInputExternal
50  from JetRecConfig.StandardSmallRJets import standardghosts, flavourghosts, truthmods, clustermods
51 
52  inpext["TC422"] = JetInputExternal("CaloTopoClusters422", xAODType.CaloCluster, algoBuilder= standardReco("CaloClusters"))
53  inpext["TopoTowers"] = JetInputExternal("CaloCalAllTopoTowers", xAODType.CaloCluster, algoBuilder= standardReco("CaloClusters"))
54  cst["EMTopo422"] = JetInputConstitSeq("EMTopo422", xAODType.CaloCluster, ["EM"],
55  "CaloTopoClusters422", "EMTopoClusters422", jetinputtype="EMTopo",
56  )
57  cst["EMTopo422SK"] = JetInputConstitSeq("EMTopo422SK", xAODType.CaloCluster, ["EM","SK"],
58  "CaloTopoClusters422", "EMTopoClusters422SK", jetinputtype="EMTopo",
59  )
60  cst["TopoTower"] = JetInputConstitSeq("TopoTower", xAODType.CaloCluster, ["EM"],
61  "CaloCalAllTopoTowers", "TopoTowers", jetinputtype="TopoTower",
62  )
63  cst["TopoTowerSK"] = JetInputConstitSeq("TopoTowerSK", xAODType.CaloCluster, ["EM","SK"],
64  "CaloCalAllTopoTowers", "TopoTowersSK", jetinputtype="TopoTower",
65  )
66  algs = getInputAlgs(cst["EMTopo422"], flags=flags)
67  algs += getInputAlgs(cst["EMTopo422SK"], flags=flags)
68  algs += getInputAlgs(cst["TopoTower"], flags=flags)
69  algs += getInputAlgs(cst["TopoTowerSK"], flags=flags)
70 
71  AntiKt4EMTopo422 = JetDefinition("AntiKt",0.4,cst["EMTopo422"],
72  ghostdefs = standardghosts+["TrackLRT"]+flavourghosts,
73  modifiers = truthmods+clustermods+("Filter:15000","LArHVCorr",),
74  lock = True,
75  )
76  AntiKt4EMTopo422SK = JetDefinition("AntiKt",0.4,cst["EMTopo422SK"],
77  ghostdefs = standardghosts+["TrackLRT"]+flavourghosts,
78  modifiers = truthmods+clustermods+("Filter:15000","LArHVCorr",),
79  lock = True,
80  )
81  AntiKt4TopoTowers = JetDefinition("AntiKt",0.4,cst["TopoTower"],
82  ghostdefs = standardghosts+["TrackLRT"]+flavourghosts,
83  modifiers = truthmods+clustermods+("Filter:15000","LArHVCorr",),
84  lock = True,
85  )
86  AntiKt4TopoTowersSK = JetDefinition("AntiKt",0.4,cst["TopoTowerSK"],
87  ghostdefs = standardghosts+["TrackLRT"]+flavourghosts,
88  modifiers = truthmods+clustermods+("Filter:15000","LArHVCorr",),
89  lock = True,
90  )
91 
92  jetList = [AntiKt4EMTopo422, AntiKt4EMTopo422SK, AntiKt4TopoTowers, AntiKt4TopoTowersSK]
93 
94  for jd in jetList:
95  acc.merge(JetRecCfg(flags,jd))
96 
97  # augmentation tools
98  augmentationTools = []
99 
100  # skimming tools
101  skimmingTools = []
102 
103  # thinning tools
104  thinningTools = []
105 
106  # Finally the kernel itself
107  DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
108  acc.addEventAlgo(DerivationKernel(name, AugmentationTools = augmentationTools, ThinningTools = thinningTools, SkimmingTools = skimmingTools))
109  return acc
110 
111 

Variable Documentation

◆ logJETM42

python.JETM42.logJETM42 = logging.getLogger('JETM42')

Definition at line 10 of file JETM42.py.

python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.JetRecConfig.getInputAlgs
def getInputAlgs(jetOrConstitdef, flags, context="default", monTool=None)
Definition: JetRecConfig.py:279
python.OutputStreamConfig.OutputStreamCfg
def OutputStreamCfg(flags, streamName, ItemList=[], MetadataItemList=[], disableEventTag=False, trigNavThinningSvc=None, takeItemsFromInput=False, extendProvenanceRecord=True, AcceptAlgs=[], HelperTools=[])
Definition: OutputStreamConfig.py:12
python.JETM42.JETM42KernelCfg
def JETM42KernelCfg(flags, name='JETM42Kernel', **kwargs)
Definition: JETM42.py:13
python.PhysCommonThinningConfig.PhysCommonThinningCfg
def PhysCommonThinningCfg(flags, StreamName="StreamDAOD_PHYS", **kwargs)
Definition: PhysCommonThinningConfig.py:9
python.StandardJetConstits.standardReco
def standardReco(input)
Definition: StandardJetConstits.py:50
TrigSlimmingHelper.addTrigEDMSetToOutput
def addTrigEDMSetToOutput(flags, SlimmingHelper helper, str edmSet, int edmVersion=None)
Definition: TrigSlimmingHelper.py:9
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.JETM42.JETM42Cfg
def JETM42Cfg(flags)
Definition: JETM42.py:154
python.PhysCommonConfig.PhysCommonAugmentationsCfg
def PhysCommonAugmentationsCfg(flags, **kwargs)
Definition: PhysCommonConfig.py:14
SlimmingHelper
Definition: SlimmingHelper.py:1
python.HION12.DerivationKernel
DerivationKernel
Definition: HION12.py:67
python.JETM42.JETM42CoreCfg
def JETM42CoreCfg(flags, name, StreamName, TriggerListsHelper, TauJets_EleRM_in_input)
Definition: JETM42.py:112
python.PHYS.PHYSCoreCfg
def PHYSCoreCfg(flags, name_tag='PHYS', StreamName='StreamDAOD_PHYS', TriggerListsHelper=None)
Definition: PHYS.py:58