ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
METAssocCfg.METAssocConfig Class Reference

Top level MET configuration. More...

Collaboration diagram for METAssocCfg.METAssocConfig:

Public Member Functions

def outputCollections (self)
 
def outputMap (self)
 
def setupAssociators (self, configFlags, buildconfigs)
 
def __init__ (self, suffix, inputFlags, buildconfigs=[], doPFlow=False, doTruth=False, usePFOLinks=False, trksel=None, modConstKey="", modClusColls={})
 

Public Attributes

 accumulator
 
 suffix
 
 doPFlow
 
 useFELinks
 
 modConstKey
 
 modClusColls
 
 doTruth
 
 trkseltool
 
 trkisotool
 
 caloisotool
 
 associators
 
 assoclist
 

Detailed Description

Top level MET configuration.

Definition at line 112 of file METAssocCfg.py.

Constructor & Destructor Documentation

◆ __init__()

def METAssocCfg.METAssocConfig.__init__ (   self,
  suffix,
  inputFlags,
  buildconfigs = [],
  doPFlow = False,
  doTruth = False,
  usePFOLinks = False,
  trksel = None,
  modConstKey = "",
  modClusColls = {} 
)

Definition at line 139 of file METAssocCfg.py.

139  def __init__(self,suffix,inputFlags,buildconfigs=[],
140  doPFlow=False, doTruth=False,
141  usePFOLinks=False,
142  trksel=None,
143  modConstKey="",
144  modClusColls={}
145  ):
146  self.accumulator = ComponentAccumulator()
147  # Set some sensible defaults
148  modConstKey_tmp = modConstKey
149  modClusColls_tmp = modClusColls
150  if doPFlow:
151  # Ideally this should not be hardcoded but linked to the JetDefinition with which this MET is built
152  # TODO : in new config, if possible use something like: jetdef.inputdef.containername
153  if modConstKey_tmp == "": modConstKey_tmp = "CHSGParticleFlowObjects"
154  else:
155  if modConstKey_tmp == "": modConstKey_tmp = "OriginCorr"
156  if modClusColls_tmp == {}: modClusColls_tmp = {'LCOriginCorrClusters':'LCOriginTopoClusters',
157  'EMOriginCorrClusters':'EMOriginTopoClusters'}
158  if doTruth:
159  metlog.info("{} Creating MET TruthAssoc config {}".format(prefix,suffix))
160  else:
161  metlog.info("{} Creating MET Assoc config {}".format(prefix,suffix))
162  self.suffix = suffix
163  self.doPFlow = doPFlow
164  self.useFELinks = usePFOLinks
165  self.modConstKey=modConstKey_tmp
166  self.modClusColls=modClusColls_tmp
167  self.doTruth = doTruth
168  if trksel:
169  self.trkseltool = trksel
170  else:
171  # TODO: These Z0 and D0 cuts are left over from R21. The track vertex association can now use looser ones.
172  # To be investigated and possibly updated by the MET group.
173  self.trkseltool=CompFactory.getComp("InDet::InDetTrackSelectionTool")("IDTrkSel_METAssoc",
174  CutLevel="TightPrimary",
175  maxZ0SinTheta=3,
176  maxD0=2,
177  minPt=500)
178 
179  self.trkisotool = CompFactory.getComp("xAOD::TrackIsolationTool")("TrackIsolationTool_MET")
180  self.trkisotool.TrackSelectionTool = self.trkseltool # As configured above
181  from TrkConfig.AtlasExtrapolatorConfig import AtlasExtrapolatorCfg
182  extrapCfg = AtlasExtrapolatorCfg(inputFlags)
183  CaloExtensionTool= CompFactory.getComp("Trk::ParticleCaloExtensionTool")(Extrapolator = self.accumulator.popToolsAndMerge(extrapCfg))
184  CaloCellAssocTool = CompFactory.getComp("Rec::ParticleCaloCellAssociationTool")(ParticleCaloExtensionTool = CaloExtensionTool)
185  self.caloisotool = CompFactory.getComp("xAOD::CaloIsolationTool")("CaloIsolationTool_MET",
186  saveOnlyRequestedCorrections=True,
187  ParticleCaloExtensionTool = CaloExtensionTool,
188  ParticleCaloCellAssociationTool = CaloCellAssocTool)
189  self.associators = {}
190  self.assoclist = [] # need an ordered list
191  #
192  self.setupAssociators(inputFlags, buildconfigs)
193 
194 # Set up a top-level tool with mostly defaults

Member Function Documentation

◆ outputCollections()

def METAssocCfg.METAssocConfig.outputCollections (   self)

Definition at line 113 of file METAssocCfg.py.

113  def outputCollections(self):
114  if self.doTruth: return 'MET_Core_'+self.suffix
115  else: return 'MET_Core_'+self.suffix,'MET_Reference_'+self.suffix

◆ outputMap()

def METAssocCfg.METAssocConfig.outputMap (   self)

Definition at line 117 of file METAssocCfg.py.

117  def outputMap(self):
118  return 'METAssoc_'+self.suffix

◆ setupAssociators()

def METAssocCfg.METAssocConfig.setupAssociators (   self,
  configFlags,
  buildconfigs 
)

Definition at line 120 of file METAssocCfg.py.

120  def setupAssociators(self, configFlags, buildconfigs):
121  metlog.info("{} Setting up associators for MET config {}".format(prefix,self.suffix))
122  for config in buildconfigs:
123  if config.objType in self.associators:
124  metlog.error("{} Config {} already contains a associator of type {}".format(prefix,self.suffix,config.objType))
125  raise LookupError
126  else:
127  associator = getAssociator(configFlags, config=config,suffix=self.suffix,
128  doPFlow=self.doPFlow,
129  useFELinks=self.useFELinks,
130  trkseltool=self.trkseltool,
131  trkisotool=self.trkisotool,
132  caloisotool=self.caloisotool,
133  modConstKey=self.modConstKey,
134  modClusColls=self.modClusColls)
135  self.associators[config.objType] = associator
136  self.assoclist.append(associator)
137  metlog.info("{} Added {} tool named {}".format(prefix,config.objType,associator.name))

Member Data Documentation

◆ accumulator

METAssocCfg.METAssocConfig.accumulator

Definition at line 140 of file METAssocCfg.py.

◆ associators

METAssocCfg.METAssocConfig.associators

Definition at line 183 of file METAssocCfg.py.

◆ assoclist

METAssocCfg.METAssocConfig.assoclist

Definition at line 184 of file METAssocCfg.py.

◆ caloisotool

METAssocCfg.METAssocConfig.caloisotool

Definition at line 179 of file METAssocCfg.py.

◆ doPFlow

METAssocCfg.METAssocConfig.doPFlow

Definition at line 157 of file METAssocCfg.py.

◆ doTruth

METAssocCfg.METAssocConfig.doTruth

Definition at line 161 of file METAssocCfg.py.

◆ modClusColls

METAssocCfg.METAssocConfig.modClusColls

Definition at line 160 of file METAssocCfg.py.

◆ modConstKey

METAssocCfg.METAssocConfig.modConstKey

Definition at line 159 of file METAssocCfg.py.

◆ suffix

METAssocCfg.METAssocConfig.suffix

Definition at line 156 of file METAssocCfg.py.

◆ trkisotool

METAssocCfg.METAssocConfig.trkisotool

Definition at line 173 of file METAssocCfg.py.

◆ trkseltool

METAssocCfg.METAssocConfig.trkseltool

Definition at line 163 of file METAssocCfg.py.

◆ useFELinks

METAssocCfg.METAssocConfig.useFELinks

Definition at line 158 of file METAssocCfg.py.


The documentation for this class was generated from the following file:
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
vtune_athena.format
format
Definition: vtune_athena.py:14
dumpHVPathFromNtuple.append
bool append
Definition: dumpHVPathFromNtuple.py:91
python.AtlasExtrapolatorConfig.AtlasExtrapolatorCfg
def AtlasExtrapolatorCfg(flags, name='AtlasExtrapolator')
Definition: AtlasExtrapolatorConfig.py:63
METAssocCfg.getAssociator
def getAssociator(configFlags, config, suffix, doPFlow=False, trkseltool=None, trkisotool=None, caloisotool=None, useFELinks=False, modConstKey="", modClusColls={})
Definition: METAssocCfg.py:44
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18