Skip to content

Commit

Permalink
stack/panel/rdiff: start QM14
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaume committed May 14, 2014
1 parent 7660579 commit 4a6975f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
14 changes: 10 additions & 4 deletions pyana/examples/gp_panel.py
Expand Up @@ -35,7 +35,12 @@ def gp_panel(version, skip):
file_url = os.path.join(inDir, infile)
data_import = np.loadtxt(open(file_url, 'rb'))
data_import = data_import[data_import[:,0] < 1.1]
if data_type == 'data': data_import[:,(1,3,4)] *= scale[energy]
if data_type == 'data' and (
version == 'LatestPatrickJieYi' or (
version == 'QM14' and energy == '27'
)
):
data_import[:,(1,3,4)] *= scale[energy]
if data_type == 'cocktail': data_import[:,2:] = 0.
elif fnmatch(data_type, '*medium*'): data_import[:,2] = 0.
key = getEnergy4Key(energy)
Expand All @@ -53,6 +58,7 @@ def gp_panel(version, skip):
'cocktail': 'with lines lc %s lw 5 lt 1' % default_colors[8],
'data': 'lt 1 lw 4 ps 1.5 lc %s pt 18' % default_colors[0]
}
panel2D_versions = (version == 'LatestPatrickJieYi' or version == 'QM14')
make_panel(
dpt_dict = OrderedDict(
(' '.join([k, 'GeV']), [
Expand All @@ -67,14 +73,14 @@ def gp_panel(version, skip):
ylabel = '1/N@_{mb}^{evt} dN@_{ee}^{acc.}/dM_{ee} [ (GeV/c^2)^{-1} ]',
xlabel = 'invariant dielectron mass, M_{ee} (GeV/c^{2})',
ylog = True, xr = [0, 1.1], yr = [1e-4, 20],
lmargin = 0.12 if version == 'LatestPatrickJieYi' else 0.1,
bmargin = 0.11 if version == 'LatestPatrickJieYi' else 0.15,
lmargin = 0.12 if panel2D_versions else 0.1,
bmargin = 0.11 if panel2D_versions else 0.15,
arrow_length = 0.4, arrow_bar = 0.002,
gpcalls = ['mxtics 2'] + (['label %d "" at graph 0.4,0.7' % (
8 if skip is None else 6
)] if version == 'QM12Latest200' else []),
labels = {'STAR Preliminary': [0.4,0.5,False]},
layout = '3x2' if version == 'LatestPatrickJieYi' else ('%dx1' % len(data)),
layout = '3x2' if panel2D_versions else ('%dx1' % len(data)),
key = ['width -4', 'at graph 0.95,0.85']
)
return 'done'
Expand Down
8 changes: 6 additions & 2 deletions pyana/examples/gp_rdiff.py
Expand Up @@ -52,8 +52,12 @@ def gp_rdiff(version, nomed, noxerr, diffRel, divdNdy):
energy = getEnergy4Key(energy)
file_url = os.path.join(inDir, infile)
data_import = np.loadtxt(open(file_url, 'rb'))
if data_type == 'data':
#data_import[:,(1,3,4)] *= scale[energy]
if data_type == 'data' and (
version == 'LatestPatrickJieYi' or (
version == 'QM14' and energy == '27'
)
):
data_import[:,(1,3,4)] *= scale[energy]
data[energy] = data_import[data_import[:,0] < 0.8]
elif data_type == 'cocktail': cocktail[energy] = data_import
elif not nomed: medium[energy] = data_import
Expand Down
9 changes: 7 additions & 2 deletions pyana/examples/gp_stack.py
Expand Up @@ -176,7 +176,11 @@ def gp_stack(version, energies, inclMed, inclFits):
for e in ['19', '27', '39', '62' ]:
scale[e] = (pi0yld[e+'_cocktail'] / pi0yld[e+'_data']).nominal_value
scale['200'] = 1.
for k in data: data[k][:,(1,3,4)] *= scale[k]
for k in data:
if version == 'LatestPatrickJieYi' or (
version == 'QM14' and k == '27'
):
data[k][:,(1,3,4)] *= scale[k]
print scale
# ordered
dataOrdered = OrderedDict(
Expand Down Expand Up @@ -232,8 +236,9 @@ def gp_stack(version, energies, inclMed, inclFits):
] if version != 'QM12Latest200' else [
'width -14', 'maxcols 1'
],
#labels = {'BES Energies are STAR Preliminary': [0.38,0.9,False]}
labels = {
'BES: STAR Preliminary': [0.38,0.9,False],
'200 GeV: [arXiv:1312.7397]': [0.38,0.85,False],
'{/Symbol=50 \775}': [0.64,0.81 if not inclMed else 0.75,False]
} if version == 'QM12Latest200' else {}, size = '10in,13in',
#arrows = [ # example arrow
Expand Down

0 comments on commit 4a6975f

Please sign in to comment.