ATLAS Offline Software
Loading...
Searching...
No Matches
HIJetHistoTools Namespace Reference

Functions

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

Variables

dict 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()

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

Definition at line 256 of file HIJetHistoTools.py.

256def 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
Fills a list of histograms on a selected subset of a JetContainer.

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

dict HIJetHistoTools.compactSpecification

Definition at line 12 of file HIJetHistoTools.py.