|
ATLAS Offline Software
|
|
def | getLayerGroup (helper, alg, layer) |
|
def | define2DProfHist (helper, alg, name, title, path, type='TProfile2D', doWeight=False, lifecycle='run', zmin=None, zmax=None, opt='', histname=None, onlylayers=baselayers) |
|
def | define2DProfPerFEHist (helper, alg, name, title, path, type='TProfile2D', doWeight=False, lifecycle='run', zmin=None, zmax=None, opt='', histname=None, onlylayers=baselayers) |
|
def | definePP0Histos (helper, alg, name, title, path, opt='') |
|
def | define1DProfLumiLayers (helper, alg, name, title, path, yaxistext, type='TProfile', opt='', histname=None, onlylayers=layers) |
|
def | defineMapVsLumiLayers (helper, alg, name, title, path, xaxistext, yaxistext, ybins, ymins, binsizes=[1.0], ylabels=None, opt='', type='TH2F', histname=None, onlylayers=layers) |
|
def | define1DLayers (helper, alg, name, title, path, xaxistext, yaxistext, xbins, xmins, binsizes=[1.0], type='TH1F', histname=None, onlylayers=layers) |
|
def | addOnTrackTxt (name, ontrack, wSpace=False) |
|
def | addOnTrackToPath (name, ontrack) |
|
def | fullDressTitle (name, ontrack, xaxistext, yaxistext) |
|
◆ addOnTrackToPath()
def PixelAthMonitoringBase.addOnTrackToPath |
( |
|
name, |
|
|
|
ontrack |
|
) |
| |
◆ addOnTrackTxt()
def PixelAthMonitoringBase.addOnTrackTxt |
( |
|
name, |
|
|
|
ontrack, |
|
|
|
wSpace = False |
|
) |
| |
◆ define1DLayers()
def PixelAthMonitoringBase.define1DLayers |
( |
|
helper, |
|
|
|
alg, |
|
|
|
name, |
|
|
|
title, |
|
|
|
path, |
|
|
|
xaxistext, |
|
|
|
yaxistext, |
|
|
|
xbins, |
|
|
|
xmins, |
|
|
|
binsizes = [1.0] , |
|
|
|
type = 'TH1F' , |
|
|
|
histname = None , |
|
|
|
onlylayers = layers |
|
) |
| |
This function configures 1D (Profile) histograms for Pixel layers.
Arguments:
helper -- AthMonitorCfgHelper(Old) instance
alg -- algorithm Configurable object returned from addAlgorithm
name -- Root name of variables and histogram (Name = name+'_'+layer)
title -- Title of histogram (Title = title +' '+layer)
path -- Path in ouput file for histogram
xaxistext -- X-axis title
yaxistext -- Y-axis title
type -- Type of histogram
histname -- alternative root name of the histogram (to be filled with the same variables defined by 'name' above)
onlylayers -- sublist of layers
Definition at line 486 of file PixelAthMonitoringBase.py.
486 def define1DLayers(helper, alg, name, title, path, xaxistext, yaxistext, xbins, xmins, binsizes=[1.0], type='TH1F', histname=None, onlylayers=layers):
488 This function configures 1D (Profile) histograms for Pixel layers.
491 helper -- AthMonitorCfgHelper(Old) instance
492 alg -- algorithm Configurable object returned from addAlgorithm
493 name -- Root name of variables and histogram (Name = name+'_'+layer)
494 title -- Title of histogram (Title = title +' '+layer)
495 path -- Path in ouput file for histogram
496 xaxistext -- X-axis title
497 yaxistext -- Y-axis title
498 type -- Type of histogram
499 histname -- alternative root name of the histogram (to be filled with the same variables defined by 'name' above)
500 onlylayers -- sublist of layers
502 assert(
set(onlylayers).issubset(layers))
505 for idx,layer
in enumerate(layers):
506 if layer
not in onlylayers:
508 fulltitle = title +
', {0}'.
format(layer) + runtext + xaxistext + yaxistext
510 fullvarstring =
'{0}_{1}'.
format(name,
'val')
511 fullvarstring +=
';' + histname +
'_{0}'.
format(layer)
512 if ( len(xbins)==1
and len(xmins)==1
and len(binsizes)==1):
513 layerGroup.defineHistogram(fullvarstring,
514 type=type, path=path, title=fulltitle,
515 xbins=xbins[0], xmin=xmins[0], xmax=xmins[0]+binsizes[0]*xbins[0])
516 elif (len(xbins)==len(layers)
and len(xmins)==len(layers)
and len(binsizes)==len(layers)):
517 layerGroup.defineHistogram(fullvarstring,
518 type=type, path=path, title=fulltitle,
519 xbins=xbins[idx], xmin=xmins[idx], xmax=xmins[idx]+binsizes[idx]*xbins[idx])
◆ define1DProfLumiLayers()
def PixelAthMonitoringBase.define1DProfLumiLayers |
( |
|
helper, |
|
|
|
alg, |
|
|
|
name, |
|
|
|
title, |
|
|
|
path, |
|
|
|
yaxistext, |
|
|
|
type = 'TProfile' , |
|
|
|
opt = '' , |
|
|
|
histname = None , |
|
|
|
onlylayers = layers |
|
) |
| |
This function configures 1D (Profile) vs lumi histograms for Pixel layers.
Arguments:
helper -- AthMonitorCfgHelper(Old) instance
alg -- algorithm Configurable object returned from addAlgorithm
name -- Name of histogram (Name = name_layer)
title -- Title of histogram (Title = title +' '+layer)
path -- Path in ouput file for histogram
yaxistext -- Text on the y-axis
type -- Type of histogram (TH1D, TProfile)
opt -- history depth of a histogram e.g. 'kLBNHistoryDepth=10' or 'kLive=100'
histname -- another way of naming the histogram(s), useful when multiple histograms are filled from exactly the same variables, but in a different way
onlylayers -- sublist of layers
Definition at line 401 of file PixelAthMonitoringBase.py.
401 def define1DProfLumiLayers(helper, alg, name, title, path, yaxistext, type='TProfile', opt='', histname=None, onlylayers=layers):
403 This function configures 1D (Profile) vs lumi histograms for Pixel layers.
406 helper -- AthMonitorCfgHelper(Old) instance
407 alg -- algorithm Configurable object returned from addAlgorithm
408 name -- Name of histogram (Name = name_layer)
409 title -- Title of histogram (Title = title +' '+layer)
410 path -- Path in ouput file for histogram
411 yaxistext -- Text on the y-axis
412 type -- Type of histogram (TH1D, TProfile)
413 opt -- history depth of a histogram e.g. 'kLBNHistoryDepth=10' or 'kLive=100'
414 histname -- another way of naming the histogram(s), useful when multiple histograms are filled from exactly the same variables, but in a different way
415 onlylayers -- sublist of layers
417 assert(
set(onlylayers).issubset(layers))
421 xbins =
int(opt.split(
'=')[1])
425 if layer
not in onlylayers:
427 fulltitle = title +
', {0}'.
format(layer) + runtext + lumitext + yaxistext
428 fullvarstring =
'{0}_{1}'.
format(name,
'lb')
429 if 'Profile' in type: fullvarstring +=
',{0}_{1}'.
format(name,
'val')
430 fullvarstring +=
';' + histname +
'_{0}'.
format(layer)
432 layerGroup.defineHistogram(fullvarstring,
433 type=type, path=path, title=fulltitle,
434 xbins=xbins, xmin=-0.5, xmax=-0.5+xbins, opt=opt)
◆ define2DProfHist()
def PixelAthMonitoringBase.define2DProfHist |
( |
|
helper, |
|
|
|
alg, |
|
|
|
name, |
|
|
|
title, |
|
|
|
path, |
|
|
|
type = 'TProfile2D' , |
|
|
|
doWeight = False , |
|
|
|
lifecycle = 'run' , |
|
|
|
zmin = None , |
|
|
|
zmax = None , |
|
|
|
opt = '' , |
|
|
|
histname = None , |
|
|
|
onlylayers = baselayers |
|
) |
| |
This function configures 2D (Profile) histograms (or maps) for Pixel base (i.e. w/o split in 2D/3D in IBL) layers.
Arguments:
helper -- AthMonitorCfgHelper(Old) instance
alg -- algorithm - Configurable object returned from addAlgorithm
name -- Name of histogram (Name = name_layer)
title -- Title of histogram (Title = title +' '+layer)
path -- Path in output file for histogram
type -- Type of histogram (TH2D, TProfile2D)
lifecycle -- global life duration of histograms (run, lowStat [i.e. 20 LB], lumiblock) - APPLIES to MonGroup only
zmin(zmax) -- fix the displayed range - simply chopping the range!!!
opt -- history depth of a histogram e.g. 'kLBNHistoryDepth=10'
histname -- another way of naming the histogram(s), useful when multiple histograms are filled from exactly the same variables, but in a different way
onlylayers -- sublist of Pixel layers
Definition at line 281 of file PixelAthMonitoringBase.py.
281 def define2DProfHist(helper, alg, name, title, path, type='TProfile2D', doWeight=False, lifecycle='run', zmin=None, zmax=None, opt='', histname=None, onlylayers=baselayers):
283 This function configures 2D (Profile) histograms (or maps) for Pixel base (i.e. w/o split in 2D/3D in IBL) layers.
286 helper -- AthMonitorCfgHelper(Old) instance
287 alg -- algorithm - Configurable object returned from addAlgorithm
288 name -- Name of histogram (Name = name_layer)
289 title -- Title of histogram (Title = title +' '+layer)
290 path -- Path in output file for histogram
291 type -- Type of histogram (TH2D, TProfile2D)
292 lifecycle -- global life duration of histograms (run, lowStat [i.e. 20 LB], lumiblock) - APPLIES to MonGroup only
293 zmin(zmax) -- fix the displayed range - simply chopping the range!!!
294 opt -- history depth of a histogram e.g. 'kLBNHistoryDepth=10'
295 histname -- another way of naming the histogram(s), useful when multiple histograms are filled from exactly the same variables, but in a different way
296 onlylayers -- sublist of Pixel layers
298 assert(
set(onlylayers).issubset(baselayers))
301 for i, layer
in enumerate(baselayers):
302 if layer
not in onlylayers:
304 fulltitle = title +
', {0}'.
format(layer) + runtext + etatxt[i] + phitext
307 fullvarstring =
'{0}_{1},{0}_{2}'.
format(name,
'em',
'pm')
309 if 'Profile' in type:
310 fullvarstring +=
',{0}_{1}'.
format(name,
'val')
312 weightvar =
'{0}_{1}'.
format(name,
'val')
314 fullvarstring +=
';' + histname +
'_{0}'.
format(layer)
315 layerGroup.defineHistogram(fullvarstring,
316 type=type, path=path, title=fulltitle, weight=weightvar,
317 xbins=xbinsl[i], xmin=xminsl[i], xmax=xminsl[i]+xbinsl[i],
318 ybins=ybinsl[i], ymin=-0.5, ymax=-0.5+ybinsl[i],
319 zmin=zmin, zmax=zmax,
321 opt=opt, xlabels=LabelX[i], ylabels=LabelY[i])
◆ define2DProfPerFEHist()
def PixelAthMonitoringBase.define2DProfPerFEHist |
( |
|
helper, |
|
|
|
alg, |
|
|
|
name, |
|
|
|
title, |
|
|
|
path, |
|
|
|
type = 'TProfile2D' , |
|
|
|
doWeight = False , |
|
|
|
lifecycle = 'run' , |
|
|
|
zmin = None , |
|
|
|
zmax = None , |
|
|
|
opt = '' , |
|
|
|
histname = None , |
|
|
|
onlylayers = baselayers |
|
) |
| |
This function configures 2D (Profile) histograms (or maps) for Pixel base (i.e. w/o split in 2D/3D in IBL) layers per FE.
Arguments:
helper -- AthMonitorCfgHelper(Old) instance
alg -- algorithm - Configurable object returned from addAlgorithm
name -- Name of histogram (Name = name_layer)
title -- Title of histogram (Title = title +' '+layer)
path -- Path in output file for histogram
type -- Type of histogram (TH2D, TProfile2D)
lifecycle -- global life duration of histograms (run, lowStat [i.e. 20 LB], lumiblock) - APPLIES to MonGroup only
zmin(zmax) -- fix the displayed range - simply chopping the range!!!
opt -- history depth of a histogram e.g. 'kLBNHistoryDepth=10'
histname -- another way of naming the histogram(s), useful when multiple histograms are filled from exactly the same variables, but in a different way
onlylayers -- sublist of Pixel layers
Definition at line 323 of file PixelAthMonitoringBase.py.
323 def define2DProfPerFEHist(helper, alg, name, title, path, type='TProfile2D', doWeight=False, lifecycle='run', zmin=None, zmax=None, opt='', histname=None, onlylayers=baselayers):
325 This function configures 2D (Profile) histograms (or maps) for Pixel base (i.e. w/o split in 2D/3D in IBL) layers per FE.
328 helper -- AthMonitorCfgHelper(Old) instance
329 alg -- algorithm - Configurable object returned from addAlgorithm
330 name -- Name of histogram (Name = name_layer)
331 title -- Title of histogram (Title = title +' '+layer)
332 path -- Path in output file for histogram
333 type -- Type of histogram (TH2D, TProfile2D)
334 lifecycle -- global life duration of histograms (run, lowStat [i.e. 20 LB], lumiblock) - APPLIES to MonGroup only
335 zmin(zmax) -- fix the displayed range - simply chopping the range!!!
336 opt -- history depth of a histogram e.g. 'kLBNHistoryDepth=10'
337 histname -- another way of naming the histogram(s), useful when multiple histograms are filled from exactly the same variables, but in a different way
338 onlylayers -- sublist of Pixel layers
340 assert(
set(onlylayers).issubset(baselayers))
343 for i, layer
in enumerate(baselayers):
344 if layer
not in onlylayers:
346 fulltitle = title +
', {0}'.
format(layer) + runtext + etatxt[i] + phitext
349 fullvarstring =
'{0}_{1},{0}_{2}'.
format(name,
'em',
'pm')
351 if 'Profile' in type:
352 fullvarstring +=
',{0}_{1}'.
format(name,
'val')
354 weightvar =
'{0}_{1}'.
format(name,
'val')
356 fullvarstring +=
';' + histname +
'_{0}'.
format(layer)
357 layerGroup.defineHistogram(fullvarstring,
358 type=type, path=path, title=fulltitle, weight=weightvar,
359 xbins=xbinsfel[i], xmin=xminsfel[i], xmax=xminsfel[i]+xbinsfel[i],
360 ybins=ybinsfel[i], ymin=-0.5, ymax=-0.5+ybinsfel[i],
361 zmin=zmin, zmax=zmax,
363 opt=opt, xlabels=LabelFEX[i], ylabels=LabelFEY[i])
◆ defineMapVsLumiLayers()
def PixelAthMonitoringBase.defineMapVsLumiLayers |
( |
|
helper, |
|
|
|
alg, |
|
|
|
name, |
|
|
|
title, |
|
|
|
path, |
|
|
|
xaxistext, |
|
|
|
yaxistext, |
|
|
|
ybins, |
|
|
|
ymins, |
|
|
|
binsizes = [1.0] , |
|
|
|
ylabels = None , |
|
|
|
opt = '' , |
|
|
|
type = 'TH2F' , |
|
|
|
histname = None , |
|
|
|
onlylayers = layers |
|
) |
| |
This function configures 2D histograms vs lumi for Pixel base (i.e. w/o split in 2D/3D in IBL) layers.
Arguments:
helper -- AthMonitorCfgHelper(Old) instance
alg -- algorithm Configurable object returned from addAlgorithm
name -- Name of histogram (Name = name_layer)
title -- Title of histogram (Title = title +' '+layer)
path -- Path in ouput file for histogram
ybins, ymin, ymax, yaxistext
-- Configure Y-axis
opt -- history depth of a histogram e.g. 'kLBNHistoryDepth=10' or 'kLive=100'
type -- Type of histogram (TH2I, TH2F, TProfile2D)
histname-- alternative root name of the histogram (to be filled with the same variables defined by 'name' above)
onlylayers -- sublist of Pixel layers
Definition at line 436 of file PixelAthMonitoringBase.py.
436 def defineMapVsLumiLayers(helper, alg, name, title, path, xaxistext, yaxistext, ybins, ymins, binsizes=[1.0], ylabels=None, opt='', type='TH2F', histname=None, onlylayers=layers):
438 This function configures 2D histograms vs lumi for Pixel base (i.e. w/o split in 2D/3D in IBL) layers.
441 helper -- AthMonitorCfgHelper(Old) instance
442 alg -- algorithm Configurable object returned from addAlgorithm
443 name -- Name of histogram (Name = name_layer)
444 title -- Title of histogram (Title = title +' '+layer)
445 path -- Path in ouput file for histogram
446 ybins, ymin, ymax, yaxistext
448 opt -- history depth of a histogram e.g. 'kLBNHistoryDepth=10' or 'kLive=100'
449 type -- Type of histogram (TH2I, TH2F, TProfile2D)
450 histname-- alternative root name of the histogram (to be filled with the same variables defined by 'name' above)
451 onlylayers -- sublist of Pixel layers
453 assert(
set(onlylayers).issubset(layers))
457 xbins =
int(opt.split(
'=')[1])
460 for idx,layer
in enumerate(layers):
461 if layer
not in onlylayers:
463 fulltitle = title +
', {0}'.
format(layer) + runtext + lumitext + yaxistext
465 fullvarstring =
'{0}_{1}'.
format(name,
'lb')
466 if 'Profile' in type: fullvarstring +=
',{0}_{1}'.
format(name,
'cat')
467 fullvarstring +=
',{0}_{1}'.
format(name,
'val')
468 fullvarstring +=
';' + histname +
'_{0}'.
format(layer)
469 if ( len(ybins)==1
and len(ymins)==1
and len(binsizes)==1):
470 layerGroup.defineHistogram(fullvarstring,
471 type=type, path=path, title=fulltitle,
472 xbins=xbins, xmin=-0.5, xmax=-0.5+xbins,
473 ybins=ybins[0], ymin=ymins[0], ymax=ymins[0]+binsizes[0]*ybins[0], opt=opt)
474 elif (len(ybins)==len(layers)
and len(ymins)==len(layers)
and len(binsizes)==len(layers)
and len(ylabels)==len(layers)):
475 layerGroup.defineHistogram(fullvarstring,
476 type=type, path=path, title=fulltitle,
477 xbins=xbins, xmin=-0.5, xmax=-0.5+xbins,
478 ybins=ybins[idx], ymin=ymins[idx], ymax=ymins[idx]+binsizes[idx]*ybins[idx], ylabels=ylabels[idx], opt=opt)
479 elif (len(ybins)==len(layers)
and len(ymins)==len(layers)
and len(binsizes)==1
and ylabels
is None):
480 layerGroup.defineHistogram(fullvarstring,
481 type=type, path=path, title=fulltitle,
482 xbins=xbins, xmin=-0.5, xmax=-0.5+xbins,
483 ybins=ybins[idx], ymin=ymins[idx], ymax=ymins[idx]+ybins[idx], opt=opt)
◆ definePP0Histos()
def PixelAthMonitoringBase.definePP0Histos |
( |
|
helper, |
|
|
|
alg, |
|
|
|
name, |
|
|
|
title, |
|
|
|
path, |
|
|
|
opt = '' |
|
) |
| |
This function configures TProfile histograms for Pixel layers per pp0 or ROD.
Arguments:
helper -- AthMonitorCfgHelper(Old) instance
alg -- algorithm Configurable object returned from addAlgorithm
name -- Name of histogram (Name = name_layer)
title -- Title of histogram (Title = title +' '+layer)
path -- Path in ouput file for histogram
opt -- history depth of a histogram e.g. 'kLBNHistoryDepth=10'
Definition at line 366 of file PixelAthMonitoringBase.py.
368 This function configures TProfile histograms for Pixel layers per pp0 or ROD.
371 helper -- AthMonitorCfgHelper(Old) instance
372 alg -- algorithm Configurable object returned from addAlgorithm
373 name -- Name of histogram (Name = name_layer)
374 title -- Title of histogram (Title = title +' '+layer)
375 path -- Path in ouput file for histogram
376 opt -- history depth of a histogram e.g. 'kLBNHistoryDepth=10'
379 for i, layer
in enumerate(pp0layers):
384 yatxt =
';average # clusters per event per '
389 fulltitle = title +
', {0}'.
format(layer) + runtext + xatxt + yatxt
390 groupname = name +
'_{0}'.
format(layer)
392 fullvarstring =
'{0}_{1},{0}_{2}'.
format(name,
'pospp0x',
'val')
393 fullvarstring +=
';' + groupname
394 layerGroup.defineHistogram(fullvarstring,
395 type=
'TProfile', path=path, title=fulltitle,
396 xbins=pp0xbins[i], xmin=-0.5, xmax=-0.5+pp0xbins[i],
397 opt=opt, xlabels=PP0LabelX[i])
◆ fullDressTitle()
def PixelAthMonitoringBase.fullDressTitle |
( |
|
name, |
|
|
|
ontrack, |
|
|
|
xaxistext, |
|
|
|
yaxistext |
|
) |
| |
◆ getLayerGroup()
def PixelAthMonitoringBase.getLayerGroup |
( |
|
helper, |
|
|
|
alg, |
|
|
|
layer |
|
) |
| |
Definition at line 273 of file PixelAthMonitoringBase.py.
274 if alg
not in layergroups:
275 layergroups[alg] = {}
276 if layer
not in layergroups[alg]:
277 layergroups[alg][layer] = helper.addGroup(alg, layer)
278 return layergroups[alg][layer]
def definePP0Histos(helper, alg, name, title, path, opt='')
def addOnTrackToPath(name, ontrack)
def define1DProfLumiLayers(helper, alg, name, title, path, yaxistext, type='TProfile', opt='', histname=None, onlylayers=layers)
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
def getLayerGroup(helper, alg, layer)
def define1DLayers(helper, alg, name, title, path, xaxistext, yaxistext, xbins, xmins, binsizes=[1.0], type='TH1F', histname=None, onlylayers=layers)
def defineMapVsLumiLayers(helper, alg, name, title, path, xaxistext, yaxistext, ybins, ymins, binsizes=[1.0], ylabels=None, opt='', type='TH2F', histname=None, onlylayers=layers)
def define2DProfHist(helper, alg, name, title, path, type='TProfile2D', doWeight=False, lifecycle='run', zmin=None, zmax=None, opt='', histname=None, onlylayers=baselayers)
def addOnTrackTxt(name, ontrack, wSpace=False)
def define2DProfPerFEHist(helper, alg, name, title, path, type='TProfile2D', doWeight=False, lifecycle='run', zmin=None, zmax=None, opt='', histname=None, onlylayers=baselayers)
def fullDressTitle(name, ontrack, xaxistext, yaxistext)