ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
METRecoCfg.METConfig Class Reference

Top level MET configuration. More...

Collaboration diagram for METRecoCfg.METConfig:

Public Member Functions

def outputCollection (self)
 
def outputMap (self)
 
def setupBuilders (self, buildconfigs)
 
def setupRefiners (self, flags, refconfigs)
 
def setupRegions (self, buildconfigs)
 
def __init__ (self, suffix, inputFlags, buildconfigs=[], refconfigs=[], doTracks=False, doSum=False, doRegions=False, doCells=False, doTriggerMET=True, duplicateWarning=True, doOriginCorrClus=False)
 

Public Attributes

 accumulator
 
 suffix
 
 doSum
 
 doTracks
 
 doRegions
 
 doCells
 
 doOriginCorrClus
 
 doTriggerMET
 
 duplicateWarning
 
 builders
 
 buildlist
 
 refiners
 
 reflist
 
 regions
 
 reglist
 
 trkseltool
 
 trkvxtool
 
 trkisotool
 
 caloisotool
 

Detailed Description

Top level MET configuration.

Definition at line 147 of file METRecoCfg.py.

Constructor & Destructor Documentation

◆ __init__()

def METRecoCfg.METConfig.__init__ (   self,
  suffix,
  inputFlags,
  buildconfigs = [],
  refconfigs = [],
  doTracks = False,
  doSum = False,
  doRegions = False,
  doCells = False,
  doTriggerMET = True,
  duplicateWarning = True,
  doOriginCorrClus = False 
)

Definition at line 194 of file METRecoCfg.py.

194  def __init__(self,suffix,inputFlags,buildconfigs=[],refconfigs=[],
195  doTracks=False,doSum=False,doRegions=False,
196  doCells=False,doTriggerMET=True,duplicateWarning=True,
197  doOriginCorrClus=False):
198  metlog.info("{} Creating MET config {}".format(prefix,suffix))
199  self.accumulator = ComponentAccumulator()
200  self.suffix = suffix
201  self.doSum = doSum
202  self.doTracks = doTracks
203  self.doRegions = doRegions
204  self.doCells = doCells,
205  self.doOriginCorrClus = doOriginCorrClus
206  self.doTriggerMET = doTriggerMET
207  self.duplicateWarning = duplicateWarning
208  #
209  self.builders = {}
210  self.buildlist = [] # need an ordered list
211  #
212  self.refiners = {}
213  self.reflist = [] # need an ordered list
214  #
215  self.regions = {}
216  self.reglist = [] # need an ordered list
217  if doRegions:
218  self.setupRegions(buildconfigs)
219  #
220  if self.suffix != 'Truth':
221  # TODO: These Z0 and D0 cuts are left over from R21. The track vertex association can now use looser ones.
222  # To be investigated and possibly updated by the MET group.
223  self.trkseltool=CompFactory.getComp("InDet::InDetTrackSelectionTool")("IDTrkSel_MET",
224  CutLevel="TightPrimary",
225  maxZ0SinTheta=3,
226  maxD0=2,
227  minPt=500)
228  #
229  from TrackVertexAssociationTool.TrackVertexAssociationToolConfig import TTVAToolCfg
230  self.trkvxtool = self.accumulator.popToolsAndMerge(
231  TTVAToolCfg(inputFlags, "TrackVertexAssociationTool_MET", addDecoAlg=True,
232  WorkingPoint="Nonprompt_All_MaxWeight", HardScatterLinkDeco=""))
233  #
234  self.trkisotool = CompFactory.getComp("xAOD::TrackIsolationTool")("TrackIsolationTool_MET")
235  self.trkisotool.TrackSelectionTool = self.trkseltool # As configured above
236 
237  from TrkConfig.AtlasExtrapolatorConfig import AtlasExtrapolatorCfg
238  extrapCfg = AtlasExtrapolatorCfg(inputFlags)
239  CaloExtensionTool= CompFactory.getComp("Trk::ParticleCaloExtensionTool")(Extrapolator = self.accumulator.popToolsAndMerge(extrapCfg))
240  CaloCellAssocTool = CompFactory.getComp("Rec::ParticleCaloCellAssociationTool")(ParticleCaloExtensionTool = CaloExtensionTool)
241  self.caloisotool = CompFactory.getComp("xAOD::CaloIsolationTool")("CaloIsolationTool_MET",
242  saveOnlyRequestedCorrections=True,
243  ParticleCaloExtensionTool = CaloExtensionTool,
244  ParticleCaloCellAssociationTool = CaloCellAssocTool)
245 
246  self.setupBuilders(buildconfigs)
247  self.setupRefiners(inputFlags,refconfigs)
248 
249 # Set up a top-level tool with mostly defaults

Member Function Documentation

◆ outputCollection()

def METRecoCfg.METConfig.outputCollection (   self)

Definition at line 148 of file METRecoCfg.py.

148  def outputCollection(self):
149  return 'MET_'+self.suffix

◆ outputMap()

def METRecoCfg.METConfig.outputMap (   self)

Definition at line 151 of file METRecoCfg.py.

151  def outputMap(self):
152  return 'METMap_'+self.suffix

◆ setupBuilders()

def METRecoCfg.METConfig.setupBuilders (   self,
  buildconfigs 
)

Definition at line 154 of file METRecoCfg.py.

154  def setupBuilders(self,buildconfigs):
155  metlog.info("{} Setting up builders for MET config {}".format(prefix,self.suffix))
156  for config in buildconfigs:
157  if config.objType in self.builders:
158  metlog.error("{} Config {} already contains a builder of type {}".format(prefix,self.suffix,config.objType))
159  raise LookupError
160  else:
161  builder = getBuilder(config,self.suffix,self.doTracks,self.doCells,
162  self.doTriggerMET,self.doOriginCorrClus)
163  self.builders[config.objType] = builder
164  self.buildlist.append(builder)
165  metlog.info("{} Added {} tool named {}".format(prefix,config.objType,builder.name))

◆ setupRefiners()

def METRecoCfg.METConfig.setupRefiners (   self,
  flags,
  refconfigs 
)

Definition at line 167 of file METRecoCfg.py.

167  def setupRefiners(self,flags,refconfigs):
168  metlog.info("{} Setting up refiners for MET config {}".format(prefix,self.suffix))
169  for config in refconfigs:
170  # need to enforce this?
171  if config.type in self.refiners:
172  metlog.error("Config {} already contains a refiner of type {}".format(self.suffix,config.type))
173  raise LookupError
174  else:
175  refiner = getRefiner(flags, config=config,suffix=self.suffix,
176  trkseltool=self.trkseltool,trkvxtool=self.trkvxtool,
177  trkisotool=self.trkisotool,caloisotool=self.caloisotool)
178  self.refiners[config.type] = refiner
179  self.reflist.append(refiner)
180  metlog.info("{} Added {} tool named {}".format(prefix,config.type,refiner.name))

◆ setupRegions()

def METRecoCfg.METConfig.setupRegions (   self,
  buildconfigs 
)

Definition at line 182 of file METRecoCfg.py.

182  def setupRegions(self,buildconfigs):
183  metlog.info("{} Setting up regions for MET config {}".format(prefix,self.suffix))
184  for config in buildconfigs:
185  if config.objType in self.regions:
186  metlog.error("{} Config {} already contains a region tool of type {}".format(prefix,self.suffix,config.objType))
187  raise LookupError
188  else:
189  regions = getRegions(config,self.suffix)
190  self.regions[config.objType] = regions
191  self.reglist.append(regions)
192  metlog.info("{} Added {} region tool named {}".format(prefix,config.objType,regions.name))

Member Data Documentation

◆ accumulator

METRecoCfg.METConfig.accumulator

Definition at line 196 of file METRecoCfg.py.

◆ builders

METRecoCfg.METConfig.builders

Definition at line 206 of file METRecoCfg.py.

◆ buildlist

METRecoCfg.METConfig.buildlist

Definition at line 207 of file METRecoCfg.py.

◆ caloisotool

METRecoCfg.METConfig.caloisotool

Definition at line 238 of file METRecoCfg.py.

◆ doCells

METRecoCfg.METConfig.doCells

Definition at line 201 of file METRecoCfg.py.

◆ doOriginCorrClus

METRecoCfg.METConfig.doOriginCorrClus

Definition at line 202 of file METRecoCfg.py.

◆ doRegions

METRecoCfg.METConfig.doRegions

Definition at line 200 of file METRecoCfg.py.

◆ doSum

METRecoCfg.METConfig.doSum

Definition at line 198 of file METRecoCfg.py.

◆ doTracks

METRecoCfg.METConfig.doTracks

Definition at line 199 of file METRecoCfg.py.

◆ doTriggerMET

METRecoCfg.METConfig.doTriggerMET

Definition at line 203 of file METRecoCfg.py.

◆ duplicateWarning

METRecoCfg.METConfig.duplicateWarning

Definition at line 204 of file METRecoCfg.py.

◆ refiners

METRecoCfg.METConfig.refiners

Definition at line 209 of file METRecoCfg.py.

◆ reflist

METRecoCfg.METConfig.reflist

Definition at line 210 of file METRecoCfg.py.

◆ regions

METRecoCfg.METConfig.regions

Definition at line 212 of file METRecoCfg.py.

◆ reglist

METRecoCfg.METConfig.reglist

Definition at line 213 of file METRecoCfg.py.

◆ suffix

METRecoCfg.METConfig.suffix

Definition at line 197 of file METRecoCfg.py.

◆ trkisotool

METRecoCfg.METConfig.trkisotool

Definition at line 231 of file METRecoCfg.py.

◆ trkseltool

METRecoCfg.METConfig.trkseltool

Definition at line 220 of file METRecoCfg.py.

◆ trkvxtool

METRecoCfg.METConfig.trkvxtool

Definition at line 227 of file METRecoCfg.py.


The documentation for this class was generated from the following file:
METRecoCfg.getRefiner
def getRefiner(flags, config, suffix, trkseltool=None, trkvxtool=None, trkisotool=None, caloisotool=None)
Definition: METRecoCfg.py:113
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
TrackVertexAssociationToolConfig.TTVAToolCfg
def TTVAToolCfg(flags, name, addDecoAlg=True, VertexContName="PrimaryVertices", **kwargs)
Definition: TrackVertexAssociationToolConfig.py:15
METRecoCfg.getBuilder
def getBuilder(config, suffix, doTracks, doCells, doTriggerMET, doOriginCorrClus)
Definition: METRecoCfg.py:53
METRecoCfg.getRegions
def getRegions(config, suffix)
Region tools are a special case of refiners.
Definition: METRecoCfg.py:134
postInclude.outputCollection
outputCollection
Definition: postInclude.SortInput.py:27
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18