ATLAS Offline Software
Functions | Variables
HIJetHistoTools Namespace Reference

Functions

def selectionAndHistos (selectType, histos, selectionName="", histoNameSuffix="", **otherArgs)
 

Variables

dictionary compactSpecification
 
list caloSamples = ["PreSamplerB", "EMB1", "EMB2", "EMB3", "PreSamplerE", "EME1", "EME2", "EME3", "HEC0", "HEC1", "HEC2", "HEC3", "TileBar0", "TileBar1", "TileBar2", "TileGap1", "TileGap2", "TileGap3", "TileExt0", "TileExt1", "TileExt2", "FCAL0", "FCAL1", "FCAL2", ]
 

Function Documentation

◆ selectionAndHistos()

def HIJetHistoTools.selectionAndHistos (   selectType,
  histos,
  selectionName = "",
  histoNameSuffix = "",
**  otherArgs 
)

Definition at line 256 of file HIJetHistoTools.py.

256 def selectionAndHistos( selectType, histos, selectionName="", histoNameSuffix="",**otherArgs):
257 
258  if isinstance(selectType, str):
259  # interpret selectType as a string. For ex "20000<pt<500000" or "subleadingjet"
260  tool = jhm.tool(selectType)
261  if issubclass( tool.__class__ , HistosForJetSelection):
262  # we're done.
263  selTool = tool
264  else:
265  # assume we have or need an attribute selector
266  attSel = tool
267  if tool is None:
268  attSel = attributeHistoManager.addSelector(selectType)
269  # and we rebuild a HistosForJetSelection in any case.
270  if histoNameSuffix=="" : histoNameSuffix = attSel.getName()
271  selTool = HistosForJetSelection("hjsel_"+attSel.getName(), SelectionType=3,
272  JetSelectorTool = attSel ,
273  HistoTitleSuffix = ' ('+selectType+')',
274  HistoNameSuffix = histoNameSuffix)
275  else:
276  selTool = selectType
277 
278  if selTool is None :
279  print ("ERROR can't build histo tool for a jet selection. Uknown or wrong selection request :",selectType , selTool)
280  return None
281 
282  if selectionName != "":
283  selTool = selTool.clone(selectionName)
284 
285  interpretedTools = []
286  for h in histos:
287  if isinstance(h,str):
288  h = jhm.tool(h)
289  interpretedTools.append(h)
290 
291  selTool.HistoTools = interpretedTools
292 
293  # set other args if any:
294  for k,v in otherArgs.items():
295  setattr(selTool, k, v)
296  return selTool
297 
298 

Variable Documentation

◆ caloSamples

list HIJetHistoTools.caloSamples = ["PreSamplerB", "EMB1", "EMB2", "EMB3", "PreSamplerE", "EME1", "EME2", "EME3", "HEC0", "HEC1", "HEC2", "HEC3", "TileBar0", "TileBar1", "TileBar2", "TileGap1", "TileGap2", "TileGap3", "TileExt0", "TileExt1", "TileExt2", "FCAL0", "FCAL1", "FCAL2", ]

Definition at line 64 of file HIJetHistoTools.py.

◆ compactSpecification

dictionary HIJetHistoTools.compactSpecification

Definition at line 12 of file HIJetHistoTools.py.

HistosForJetSelection
Definition: HistosForJetSelection.h:27
HIJetHistoTools.selectionAndHistos
def selectionAndHistos(selectType, histos, selectionName="", histoNameSuffix="", **otherArgs)
Definition: HIJetHistoTools.py:256