Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fastNLO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
qcd-public
fastNLO
Commits
aac48a00
Commit
aac48a00
authored
3 years ago
by
Klaus Rabbertz
Browse files
Options
Downloads
Patches
Plain Diff
Fix two scripts for law usage up to NLO only
parent
3a8ab3bd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tools/plotting/fastnnlo_runtime.py
+6
-1
6 additions, 1 deletion
tools/plotting/fastnnlo_runtime.py
tools/plotting/fastnnlo_statunc.py
+7
-5
7 additions, 5 deletions
tools/plotting/fastnnlo_statunc.py
with
13 additions
and
6 deletions
tools/plotting/fastnnlo_runtime.py
+
6
−
1
View file @
aac48a00
...
...
@@ -360,7 +360,12 @@ def plot_events_per_hour(infodict, out_path, out_name, formats):
ax
.
vlines
(
median
,
0
,
max
(
n
),
colors
=
'
green
'
,
linestyles
=
'
dashdot
'
,
label
=
r
'
Median: {0:0.2e}$\pm${1:0.2e} events/hour
'
.
format
(
median
,
iqd
))
ax
.
ticklabel_format
(
axis
=
'
x
'
,
style
=
'
plain
'
,
useOffset
=
False
)
else
:
n
,
batches
,
_
=
ax
.
hist
(
evrs
,
histtype
=
'
barstacked
'
,
log
=
True
,
stacked
=
True
,
bins
=
logbins
,
edgecolor
=
'
black
'
,
color
=
_channel_colors
,
label
=
_channels
)
chnlab
=
[]
chncol
=
[]
for
chn
in
unique_channels
:
chnlab
.
append
(
chn
)
chncol
.
append
(
_channel_colors
[
_channel_number
[
chn
]])
n
,
batches
,
_
=
ax
.
hist
(
evrs
,
histtype
=
'
barstacked
'
,
log
=
True
,
stacked
=
True
,
bins
=
logbins
,
edgecolor
=
'
black
'
,
color
=
chncol
,
label
=
chnlab
)
ax
.
set_xlim
(
0.9
*
ephmin
,
1.1
*
ephmax
)
ax
.
set_xscale
(
'
log
'
)
...
...
This diff is collapsed.
Click to expand it.
tools/plotting/fastnnlo_statunc.py
+
7
−
5
View file @
aac48a00
...
...
@@ -92,7 +92,9 @@ class SplitArgs(argparse.Action):
# Some global definitions
_channels
=
[
'
LO
'
,
'
R
'
,
'
V
'
,
'
RRa
'
,
'
RRb
'
,
'
RV
'
,
'
VV
'
]
_channel_lists
=
{
'
LO
'
:
[
'
LO
'
],
'
NLO
'
:
[
'
LO
'
,
'
R
'
,
'
V
'
],
'
NNLO
'
:
[
'
LO
'
,
'
R
'
,
'
V
'
,
'
RRa
'
,
'
RRb
'
,
'
RV
'
,
'
VV
'
]
}
_orders
=
[
'
LO
'
,
'
NLO
'
,
'
NNLO
'
,
'
NLO_only
'
,
'
NNLO_only
'
]
_order_lists
=
{
'
LO
'
:
[
'
LO
'
],
'
NLO
'
:
[
'
LO
'
,
'
NLO
'
,
'
NLO_only
'
],
'
NNLO
'
:
[
'
LO
'
,
'
NLO
'
,
'
NNLO
'
,
'
NLO_only
'
,
'
NNLO_only
'
]
}
_fntrans
=
str
.
maketrans
({
'
[
'
:
''
,
'
]
'
:
''
,
'
(
'
:
''
,
'
)
'
:
''
,
'
,
'
:
''
})
# Filename translation table
_formats
=
{
'
eps
'
:
0
,
'
pdf
'
:
1
,
'
png
'
:
2
,
'
svg
'
:
3
}
_text_to_order
=
{
'
LO
'
:
0
,
'
NLO
'
:
1
,
'
NNLO
'
:
2
,
'
NLO_only
'
:
3
,
'
NNLO_only
'
:
4
}
...
...
@@ -141,7 +143,7 @@ def plotting(x_axis, xmin, xmax, dxsr_ch, dxsr_or, xlabel, ylabel, title, tablen
# Plot all normalised statistical uncertainties in channel list
xs_index
=
-
1
for
channel_item
,
shift
in
zip
(
_channel
s
,
shift_list
):
for
channel_item
,
shift
in
zip
(
_channel
_lists
[
order
]
,
shift_list
):
xs_index
+=
1
yerror
=
0
*
dxsr_ch
[
xs_index
,
:]
ax1
.
errorbar
(
x_axis
*
shift
,
dxsr_ch
[
xs_index
],
yerr
=
yerror
,
elinewidth
=
1
,
linewidth
=
0.0
,
...
...
@@ -184,7 +186,7 @@ def plotting(x_axis, xmin, xmax, dxsr_ch, dxsr_or, xlabel, ylabel, title, tablen
# Plot signed cross-section shares per channel
xs_index
=
-
1
for
channel_item
,
shift
in
zip
(
_channel
s
,
shift_list
):
for
channel_item
,
shift
in
zip
(
_channel
_lists
[
order
]
,
shift_list
):
xs_index
+=
1
yerror
=
0
*
xsr_ch
[
xs_index
,
:]
ax2
.
errorbar
(
x_axis
*
shift
,
xsr_ch
[
xs_index
],
yerr
=
yerror
,
elinewidth
=
1
,
linewidth
=
0.0
,
...
...
@@ -446,7 +448,7 @@ def main():
xsr_or
=
[]
dxs_or
=
[]
dxsr_or
=
[]
for
lorder
in
_order
s
:
for
lorder
in
_order
_lists
[
order
]
:
parts
=
tablename
.
split
(
sep
)
parts
[
1
]
=
lorder
datfile
=
tablepath
+
'
/
'
+
sep
.
join
(
parts
)
+
'
.dat
'
...
...
@@ -470,14 +472,14 @@ def main():
dxs_ch
=
[]
dxsr_ch
=
[]
if
args
[
'
datfiles
'
]
is
None
or
args
[
'
datfiles
'
][
0
]
==
''
:
for
channel
in
_channel
s
:
for
channel
in
_channel
_lists
[
order
]
:
parts
=
tablename
.
split
(
sep
)
parts
[
1
]
=
channel
datfile
=
tablepath
+
'
/
'
+
sep
.
join
(
parts
)
+
'
.dat
'
datfilenames
.
append
(
datfile
)
lstat
=
(
len
(
datfilenames
)
>
0
)
if
lstat
and
len
(
datfilenames
)
!=
len
(
_channel
s
):
if
lstat
and
len
(
datfilenames
)
!=
len
(
_channel
_lists
[
order
]
):
print
(
'
[fastnnlo_statunc]: Mismatch between required channels and no. of filenames for statistical uncertainties, aborted!
'
)
exit
(
1
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment