Skip to content

Commit

Permalink
gp_stack: fix yr and 19 GeV cocktail
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaume committed Jan 23, 2014
1 parent 35926c4 commit 3521fc7
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions pyana/examples/gp_stack.py
Expand Up @@ -29,9 +29,14 @@ def gp_stack(version):
data_type = re.sub('%s\.dat' % energy, '', file)
file_url = os.path.join(inDir, file)
data_import = np.loadtxt(open(file_url, 'rb'))
# following scaling is wrong for y < 0 && shift != 1
data_import[:, 1:] *= shift[energy]
if fnmatch(file, 'data*'): data[energy] = data_import
else: cocktail[energy] = data_import
if fnmatch(file, 'data*'):
data[energy] = data_import
elif energy == '19': # cut of cocktail above 1.1 GeV/c^2
cocktail[energy] = data_import[data_import[:,0] < 1.3]
else:
cocktail[energy] = data_import
dataOrdered = OrderedDict(
(' '.join([k, 'GeV', '{/Symbol \264} %g' % shift[k]]), data[k])
for k in sorted(data, key=int)
Expand All @@ -47,12 +52,11 @@ def gp_stack(version):
name = os.path.join(outDir, 'stack%s' % version),
ylabel = 'dielectron pair production rate',
xlabel = 'dielectron mass (GeV/c^{2})',
ylog = True, xr = [0, 3.5], yr = [3e-6, 2e3],
ylog = True, xr = [0, 3.5], yr = [1e-6, 2e3],
lmargin = 0.07, key = ['width -3'],
arrows = [ # missing error bars @ 39 GeV
[ [2.4, 5e-5], [2.3, 1e-5], 'head filled lc 1 lw 5 lt 1 front' ],
],
labels = { '??': [2.4, 1e-4, True] }
#arrows = [ # example arrow
# [ [2.4, 5e-5], [2.3, 1e-5], 'head filled lc 1 lw 5 lt 1 front' ],
#],
)
return 'done'

Expand Down

0 comments on commit 3521fc7

Please sign in to comment.