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

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

◆ compactSpecification

dict JetHistoTools.compactSpecification

Definition at line 13 of file JetHistoTools.py.