@@ -0,0 +1,950 @@
+#!/usr/bin/env python%0A# Tai Sakuma %3Csakuma@cern.ch%3E%0Aimport pandas as pd%0A%0A##__________________________________________________________________%7C%7C%0Ad1 = pd.read_table('tbl_process.txt', delim_whitespace = True)%0Ad2 = pd.read_table('tbl_component_met.txt', delim_whitespace = True)%0Ad3 = pd.read_table('tbl_nevt.txt', delim_whitespace = True)%0Ad4 = pd.read_table('tbl_xsec.txt', delim_whitespace = True)%0A%0Ad = pd.merge(d1, d2)%0Ad = d.groupby(%5B'phasespace', 'process', 'met'%5D).sum().reset_index()%0Ae = pd.merge(d1, d3)%0Ae = e.groupby(%5B'phasespace', 'process'%5D).sum().reset_index()%0Ae = pd. merge(e, d4)%0Ad = pd.merge(d, e)%0Alumi = 4000%0Ad.n = d.n*d.xsec/d.nevt*lumi%0Ad.nvar = d.nvar*(d.xsec/d.nevt*lumi)**2%0Ad = d.drop('nevt', 1)%0Ad = d.drop('xsec', 1)%0Ad = d.groupby(%5B'process', 'met'%5D).sum().reset_index()%0A%0Af = open('tbl_out_python.txt', 'w')%0Ad.to_string(f, index = False)%0Af.write(%22%5Cn%22)%0Af.close()%0A%0A##__________________________________________________________________%7C%7C%0A

add yield.py