Skip to content

Commit

Permalink
gp_effcorr: add tpc_select_eff
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaume committed Jan 3, 2015
1 parent aecc3b3 commit cd243cb
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion pyana/examples/gp_effcorr.py
Expand Up @@ -50,6 +50,23 @@ def gp_syserr():
]
)

def gp_tpc_select_eff():
inDir, outDir = getWorkDirs()
infile = os.path.join(inDir, 'tpc_select_eff_electrons_39GeV.dat')
data = np.loadtxt(open(infile, 'rb'))
nrows = len(data)
data[:,1:] *= 100. # convert to %
data = np.c_[data[:,:2], np.zeros(nrows), np.zeros(nrows), data[:,-1] ]
make_plot(
data = [data], titles = [''],
properties = [ 'with filledcurves lt 1 lc %s lw 5 pt 0' % default_colors[1] ],
tmargin = 0.98, rmargin = 0.99, yr = [80,100], xr = [0.2,2.052],
gpcalls = ['nokey', 'xtics 0.5', 'mxtics 5', 'mytics 2'],
xlabel = 'momentum, p (GeV/c)', ylabel = 'TPC Selection Efficiency (%)',
name = os.path.join(outDir, 'tpc_select_eff'), size = '8.8in,6.8in',
labels = {'39 GeV Electrons': [1.0,93,True]}
)

if __name__ == '__main__':
checkSymLink()
parser = argparse.ArgumentParser()
Expand All @@ -59,4 +76,5 @@ def gp_syserr():
logging.basicConfig(
format='%(message)s', level=getattr(logging, loglevel)
)
gp_syserr()
#gp_syserr()
gp_tpc_select_eff()

0 comments on commit cd243cb

Please sign in to comment.