Commit 9bd13cf1 by janlukas.bosse

### somebody oughta learn about pep8 :D

parent cdecd505
 ... ... @@ -10,8 +10,9 @@ class Algorithm: def Yij(self, p, q): pq = p.px * q.px + p.py * q.py + p.pz * q.pz return 2. * pow(min(p.E, q.E), 2) * (1.0 - min(max(pq / m.sqrt(p.P2() * q.P2()), -1.0), 1.0)) / self.ecm2 return (2. * min(p.E, q.E)**2 * (1.0 - min(max(pq / m.sqrt(p.P2() * q.P2()), -1.0), 1.0)) / self.ecm2) def Cluster(self, event): ... ... @@ -31,10 +32,12 @@ class Analysis: def __init__(self, algorithm): self.n = 0. self.ynm = [Histo1D(100, -4.3, -0.3, '/LL_JetRates/log10_y_{0}{1}'.format(i + 2, i + 3)) self.ynm = [Histo1D(100, -4.3, -0.3, '/LL_JetRates/log10_y_{0}{1}'.format(i + 2, i + 3)) for i in range(4)] self.ynm_integ = [Scatter2D( 100, -4.3, -0.3, '/LL_JetRates/integ_log10_y_{0}'.format(i + 2)) for i in range(5)] 100, -4.3, -0.3, '/LL_JetRates/integ_log10_y_{0}'.format(i + 2)) for i in range(5)] self.duralg = algorithm def Analyze(self, event, w): ... ...
 ... ... @@ -40,12 +40,14 @@ class Vec4: def __mul__(self, v): if isinstance(v, Vec4): return self.E * v.E - self.px * v.px - self.py * v.py - self.pz * v.pz return (self.E * v.E - self.px * v.px - self.py * v.py - self.pz * v.pz) return Vec4(self.E * v, self.px * v, self.py * v, self.pz * v) def __rmul__(self, v): if isinstance(v, Vec4): return self.E * v.E - self.px * v.px - self.py * v.py - self.pz * v.pz return (self.E * v.E - self.px * v.px - self.py * v.py - self.pz * v.pz) return Vec4(self.E * v, self.px * v, self.py * v, self.pz * v) def __div__(self, v): ... ...
 ... ... @@ -106,8 +106,8 @@ def plot_jet_histograms(filenames): y = histo[:, 2] / widths yerr = np.sqrt(histo[:, 3]) / widths main_ax.step(x, np.append( y, y[-1]), where="post", linewidth=1.0, label=file, color=color) main_ax.step(x, np.append(y, y[-1]), where="post", linewidth=1.0, label=file, color=color) main_ax.bar(centers, y, yerr=yerr, alpha=0.0, linewidth=lw, ecolor=color) ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment