|
def | __init__ (self) |
|
def | addHist2D (self, name, binx, xmin, xmax, biny, ymin, ymax, xlab="", ylab="", zlab="", average=False) |
|
def | hist2DExists (self, name) |
|
def | fillHist2D (self, name, x, y, *args) |
|
def | hist2D (self, name) |
|
def | hist2Diter (self) |
|
Definition at line 66 of file plot_material.py.
◆ __init__()
def plot_material.HistManager.__init__ |
( |
|
self | ) |
|
◆ _key()
def plot_material.HistManager._key |
( |
|
self, |
|
|
|
k |
|
) |
| |
|
private |
◆ addHist2D()
def plot_material.HistManager.addHist2D |
( |
|
self, |
|
|
|
name, |
|
|
|
binx, |
|
|
|
xmin, |
|
|
|
xmax, |
|
|
|
biny, |
|
|
|
ymin, |
|
|
|
ymax, |
|
|
|
xlab = "" , |
|
|
|
ylab = "" , |
|
|
|
zlab = "" , |
|
|
|
average = False |
|
) |
| |
Definition at line 77 of file plot_material.py.
77 def addHist2D(self, name, binx, xmin, xmax, biny, ymin, ymax, xlab="", ylab="", zlab="", average=False):
79 root_name = os.path.basename(name)
81 assert key
not in self._hist2D,
"hist2D with key {} exists".
format(key)
82 self._hist2D[key] = ROOT.TH2D(root_name, root_name, binx, xmin, xmax, biny, ymin, ymax)
83 self._hist2D[key].GetXaxis().SetTitle(xlab)
84 self._hist2D[key].GetYaxis().SetTitle(ylab)
85 self._hist2D[key].GetZaxis().SetTitle(zlab)
90 self._hist2D_count[key] = ROOT.TH2D(root_name+
"_count", root_name+
"_count", binx, xmin, xmax, biny, ymin, ymax)
◆ fillHist2D()
def plot_material.HistManager.fillHist2D |
( |
|
self, |
|
|
|
name, |
|
|
|
x, |
|
|
|
y, |
|
|
* |
args |
|
) |
| |
Definition at line 96 of file plot_material.py.
96 def fillHist2D(self, name, x, y, *args):
98 assert key
in self._hist2D,
"{} not in histograms".
format(key)
99 self._hist2D[key].Fill(x, y, *args)
100 if key
in self._hist2D_count:
101 self._hist2D_count[key].Fill(x, y)
◆ hist2D()
def plot_material.HistManager.hist2D |
( |
|
self, |
|
|
|
name |
|
) |
| |
Definition at line 103 of file plot_material.py.
103 def hist2D(self, name):
104 key = self._key(name)
105 return self._hist2D[key]
◆ hist2DExists()
def plot_material.HistManager.hist2DExists |
( |
|
self, |
|
|
|
name |
|
) |
| |
Definition at line 92 of file plot_material.py.
92 def hist2DExists(self, name):
94 return key
in self._hist2D
◆ hist2Diter()
def plot_material.HistManager.hist2Diter |
( |
|
self | ) |
|
Definition at line 107 of file plot_material.py.
107 def hist2Diter(self):
108 for name, hist
in self._hist2D.
items():
109 if name
not in self._hist2D_count:
112 hist_divided = hist.Clone()
113 hist_divided.Divide(self._hist2D_count[name])
114 yield name, hist_divided
◆ _hist2D
plot_material.HistManager._hist2D |
|
private |
◆ _hist2D_count
plot_material.HistManager._hist2D_count |
|
private |
The documentation for this class was generated from the following file: