MPF.histograms module

class MPF.histograms.Graph(**kwargs)[source]

Bases: object

draw(**kwargs)[source]
setColor()[source]
class MPF.histograms.Histogram[source]

Bases: object

add(other)[source]
addOverflowToLastBin()[source]

Add histograms overflow bin content (and error) to the last bin

addSystematicError(*hists, **kwargs)[source]

Add systematic variations to the errorband based on given variational histogram(s).

Parameters:
  • hists – one ore more histograms to be added
  • mode

    how to add and symmetrise the errors?

    • symUpDown (default): independently add up and down variations quadratically and symmetrise afterwards
    • largest: also add quadratically up and down variations, but then use the max(up, down) as the error
clone()[source]

Clones a histogram. Until i find out how to do this properly (e.g. with deepcopy) do some stuff manually here

static cloneAttributes(tohist, fromhist)[source]
color
createPoissonErrorGraph()[source]
draw(drawString='')[source]
fillColor
firstDraw(**kwargs)[source]
getXTitle()[source]
getYTitle()[source]
lineColor
markerColor
markerStyle
overflow()[source]
rebin(rebin=1)[source]
setColorAndStyle()[source]
truncateErrors(value=0)[source]
underflow()[source]
yieldBinNumbers(overFlow=False, underFlow=False)
class MPF.histograms.HistogramD(histogram, **kwargs)[source]

Bases: ROOT.TH1D, MPF.histograms.Histogram

class MPF.histograms.HistogramF(histogram, **kwargs)[source]

Bases: ROOT.TH1F, MPF.histograms.Histogram

class MPF.histograms.HistogramStack(histogram)[source]

Bases: ROOT.THStack

Add(hist)[source]
add(hist)[source]
checkSet(attr, to)[source]
draw(drawString='')[source]
firstDraw(**kwargs)[source]
getXTitle()[source]
getYTitle()[source]
class MPF.histograms.WrapTGraphAsymmErrors(graph, **kwargs)[source]

Bases: ROOT.TGraphAsymmErrors, MPF.histograms.Graph

MPF.histograms.getHM(histogram)[source]