|
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 67 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 78 of file plot_material.py.
78 def addHist2D(self, name, binx, xmin, xmax, biny, ymin, ymax, xlab="", ylab="", zlab="", average=False):
80 root_name = os.path.basename(name)
82 assert key
not in self._hist2D,
"hist2D with key {} exists".
format(key)
83 self._hist2D[key] = ROOT.TH2D(root_name, root_name, binx, xmin, xmax, biny, ymin, ymax)
84 self._hist2D[key].GetXaxis().SetTitle(xlab)
85 self._hist2D[key].GetYaxis().SetTitle(ylab)
86 self._hist2D[key].GetZaxis().SetTitle(zlab)
91 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 97 of file plot_material.py.
97 def fillHist2D(self, name, x, y, *args):
99 assert key
in self._hist2D,
"{} not in histograms".
format(key)
100 self._hist2D[key].Fill(x, y, *args)
101 if key
in self._hist2D_count:
102 self._hist2D_count[key].Fill(x, y)
◆ hist2D()
def plot_material.HistManager.hist2D |
( |
|
self, |
|
|
|
name |
|
) |
| |
Definition at line 104 of file plot_material.py.
104 def hist2D(self, name):
105 key = self._key(name)
106 return self._hist2D[key]
◆ hist2DExists()
def plot_material.HistManager.hist2DExists |
( |
|
self, |
|
|
|
name |
|
) |
| |
Definition at line 93 of file plot_material.py.
93 def hist2DExists(self, name):
95 return key
in self._hist2D
◆ hist2Diter()
def plot_material.HistManager.hist2Diter |
( |
|
self | ) |
|
Definition at line 108 of file plot_material.py.
108 def hist2Diter(self):
109 for name, hist
in self._hist2D.
items():
110 if name
not in self._hist2D_count:
113 hist_divided = hist.Clone()
114 hist_divided.Divide(self._hist2D_count[name])
115 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: