ATLAS Offline Software
Loading...
Searching...
No Matches
JetHistoTools 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()

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

Definition at line 240 of file JetHistoTools.py.

240def selectionAndHistos( selectType, histos, selectionName="", histoNameSuffix="",**otherArgs):
241
242 if isinstance(selectType, str):
243 # interpret selectType as a string. For ex "20000<pt<500000" or "subleadingjet"
244 tool = jhm.tool(selectType)
245 if issubclass( tool.__class__ , HistosForJetSelection):
246 # we're done.
247 selTool = tool
248 else:
249 # assume we have or need an attribute selector
250 attSel = tool
251 if tool is None:
252 attSel = attributeHistoManager.addSelector(selectType)
253 # and we rebuild a HistosForJetSelection in any case.
254 if histoNameSuffix=="" : histoNameSuffix = attSel.getName()
255 selTool = HistosForJetSelection("hjsel_"+attSel.getName(), SelectionType=3,
256 JetSelectorTool = attSel ,
257 HistoTitleSuffix = ' ('+selectType+')',
258 HistoNameSuffix = histoNameSuffix)
259 else:
260 selTool = selectType
261
262 if selTool is None :
263 print ("ERROR can't build histo tool for a jet selection. Uknown or wrong selection request :",selectType , selTool)
264 return None
265
266 if selectionName != "":
267 selTool = selTool.clone(selectionName)
268
269 interpretedTools = []
270 for h in histos:
271 if isinstance(h,str):
272 h = jhm.tool(h)
273 interpretedTools.append(h)
274
275 selTool.HistoTools = interpretedTools
276
277 # set other args if any:
278 for k,v in otherArgs.items():
279 setattr(selTool, k, v)
280 return selTool
281
282
283
284
Fills a list of histograms on a selected subset of a JetContainer.

Variable Documentation

◆ caloSamples

list JetHistoTools.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 180 of file JetHistoTools.py.

◆ compactSpecification

dict JetHistoTools.compactSpecification

Definition at line 13 of file JetHistoTools.py.