Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polarised Jet commondata implementation #2035

Merged
merged 82 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
9d52347
PHENIX implementation, eta still needs to be done
toonhasenack Apr 4, 2024
90f5342
pre-commit change
toonhasenack Apr 4, 2024
577512c
implemented changes for PHENIX
toonhasenack Apr 12, 2024
eb86dbd
Merge branch 'master' into Jet_commondata
giacomomagni Apr 15, 2024
49a3755
STAR2012 and STAR2015 addition
toonhasenack Apr 15, 2024
aace47c
Name change of STARyear to STAR_year convention
toonhasenack Apr 17, 2024
994638a
propagate previous namechange
toonhasenack Apr 17, 2024
12d2ac9
implemented correlations for STAR_2015
toonhasenack Apr 17, 2024
ebcc5ca
init 510 correlated data
giacomomagni Apr 22, 2024
9c76548
move symm error to utils
giacomomagni Apr 22, 2024
516b85f
Merge branch 'master' into Jet_commondata
giacomomagni Apr 22, 2024
a5888e1
correct label
giacomomagni Apr 22, 2024
34e2c8b
correct label
giacomomagni Apr 22, 2024
79bb21f
fix art systematics
giacomomagni Apr 22, 2024
250ea79
fix metadata
giacomomagni Apr 22, 2024
fb54e16
make test passing
giacomomagni Apr 22, 2024
9d3f3f4
Giacomo's suggestions with 1 to go
toonhasenack Apr 23, 2024
cee14dd
init star 2015 parser
giacomomagni Apr 23, 2024
106d475
implement 2015 dijet and jet and fix tests
giacomomagni Apr 23, 2024
42d4135
STAR_2009_2JET implementation with only correlations to go
toonhasenack Apr 24, 2024
73d93f7
fix 2009 dijet and implement 2012
giacomomagni Apr 24, 2024
875eede
small correction in metadata
toonhasenack Apr 24, 2024
c6cc214
Merge branch 'Jet_commondata' of https://github.com/NNPDF/nnpdf into …
toonhasenack Apr 24, 2024
dfa92ba
full implementation of STAR_2009 including correlations
toonhasenack Apr 29, 2024
6cc4020
change back filter import
toonhasenack Apr 29, 2024
8687f8a
Giacomo's suggestions
toonhasenack May 1, 2024
7241f99
minor fixes on syntax
giacomomagni May 6, 2024
65a2728
fix kinematic label
giacomomagni May 6, 2024
6b15c86
fixed STAR2015 polarised error
toonhasenack May 7, 2024
8218129
apply same fix also to dijet
giacomomagni May 8, 2024
637e7d8
STAR_2012 correct correlations
toonhasenack May 14, 2024
72e4969
correct wrong year label
giacomomagni May 14, 2024
45a5c8d
Merge branch 'Jet_commondata' of https://github.com/NNPDF/nnpdf into …
giacomomagni May 14, 2024
1b9a9cf
fix metadata
giacomomagni May 14, 2024
de2a065
init restore older filters
giacomomagni May 15, 2024
b262ebb
resotre previous atlas utils
giacomomagni May 15, 2024
77ca9bb
resotre previous atlas utils
giacomomagni May 15, 2024
0ab33c1
more cleaning
giacomomagni May 15, 2024
ede56cf
Adding pol unc to 2013 data
giacomomagni May 16, 2024
030f63e
various fixes in 2009 1 JET data
giacomomagni May 16, 2024
0840309
make notation more uniform
giacomomagni May 16, 2024
63b1760
Add beam pol error to phenix
giacomomagni May 16, 2024
4f5460e
remove minus sign from pol unc
giacomomagni May 16, 2024
a565ab8
adding pol unc to 2005 and 2006 data
giacomomagni May 16, 2024
fd9c6ed
uncorrelate PHENIX from STAR_2005
toonhasenack May 16, 2024
f696309
revert correlations in phenix and star 2005
giacomomagni May 17, 2024
879fd26
init collapsing 2012 dijets
giacomomagni May 17, 2024
1e39f34
init collapsing 2013 dijets
giacomomagni May 17, 2024
46ecd2e
init collapsing 2015 dijets
giacomomagni May 17, 2024
e5ed528
addind missing refs
giacomomagni May 17, 2024
31ab9c2
some fixes
giacomomagni May 17, 2024
9347f45
Adding lumi shift to 2013 data
giacomomagni May 17, 2024
fe6afde
collapse 2009 dijets
giacomomagni May 17, 2024
023a95f
fix lumi unc and stat in 2009 dijets
giacomomagni May 17, 2024
e3805a7
move filters closer to raw data
giacomomagni May 17, 2024
bbd5112
correct unc order in 2015 data
giacomomagni May 23, 2024
6e43675
Merge branch 'master' into Jet_commondata
giacomomagni Jun 14, 2024
4fc04c4
update 1jet fktables names
giacomomagni Jun 14, 2024
49e15e7
split 1jet 2009 and 2015 into 2 observables
giacomomagni Jun 18, 2024
d7f9507
fix fktables names
giacomomagni Jun 18, 2024
aa2c2a7
fix phenix name
giacomomagni Jun 18, 2024
b5ff1d5
correct PHENIX source table
giacomomagni Jun 19, 2024
0c91013
add review comments
giacomomagni Jun 19, 2024
e983e99
Merge branch 'master' into Jet_commondata
Radonirinaunimi Jun 25, 2024
c3877df
account for pol/unpol distinction in dijets
toonhasenack Jun 28, 2024
e0cbe64
Merge branch 'master' into Jet_commondata
giacomomagni Jun 28, 2024
80b9fbb
510-->200
toonhasenack Jun 28, 2024
012347f
Merge branch 'Jet_commondata' of https://github.com/NNPDF/nnpdf into …
toonhasenack Jun 28, 2024
a516d7a
implement E. Aschenauer suggestion
giacomomagni Jul 3, 2024
a2941ae
implement 2004 1JET data
giacomomagni Jul 3, 2024
681416b
Merge branch 'master' into Jet_commondata
giacomomagni Jul 3, 2024
3059e94
Merge branch 'master' into Jet_commondata
giacomomagni Jul 5, 2024
cd57101
Merge branch 'master' into Jet_commondata
giacomomagni Jul 5, 2024
5348827
Merge branch 'master' into Jet_commondata
giacomomagni Jul 9, 2024
9b90f15
init dijet eta implementation
giacomomagni Jul 12, 2024
45b9f90
add eta variables to star data
giacomomagni Jul 12, 2024
6cfdbf3
varius typos fixes
giacomomagni Jul 12, 2024
03bdb01
some fixes to metadata
giacomomagni Jul 14, 2024
c2d9401
remove sqrts from dijets
giacomomagni Jul 15, 2024
2c1feb4
minor fixes
giacomomagni Jul 15, 2024
a7d8d54
minor fix on plot labels
giacomomagni Jul 16, 2024
9925e4d
another attempt on plot labels, now working
giacomomagni Jul 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
data_central:
- -0.0007
- 0.0039
- -0.0014
- -0.0005
- 0.0058
- 0.0034
- 0.0077
- -0.0181
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
import glob

import pandas as pd
import yaml


def read_data(fnames):
df = pd.DataFrame()
for fname in fnames:
with open(fname, "r") as file:
data = yaml.safe_load(file)

pTbsub = data["independent_variables"][0]["values"]
pTsub = data["dependent_variables"][0]["values"]
ALLsub = data["dependent_variables"][1]["values"]

for i in range(len(ALLsub)):
df = pd.concat(
[
df,
pd.DataFrame(
{
"pT": [pTsub[i]["value"]],
"pTmin": [pTbsub[i]["low"]],
"pTmax": [pTbsub[i]["high"]],
"eta": [0.0],
giacomomagni marked this conversation as resolved.
Show resolved Hide resolved
"sqrts": [200],
"ALL": [ALLsub[i]["value"]],
"stat": [ALLsub[i]["errors"][0]["symerror"]],
}
),
],
ignore_index=True,
)

return df


def write_data(df):
data_central = []
for i in range(len(df["ALL"])):
data_central.append(float(df.loc[i, "ALL"]))

data_central_yaml = {"data_central": data_central}
with open("data.yaml", "w") as file:
yaml.dump(data_central_yaml, file, sort_keys=False)

# Write kin file
kin = []
for i in range(len(df["ALL"])):
kin_value = {
"pT": {
"min": float(df.loc[i, "pTmin"]),
"mid": float(df.loc[i, "pT"]),
"max": float(df.loc[i, "pTmax"]),
},
"sqrts": {"min": None, "mid": float(df.loc[i, "sqrts"]), "max": None},
"eta": {"min": None, "mid": float(df.loc[i, "eta"]), "max": None},
}
kin.append(kin_value)

kinematics_yaml = {"bins": kin}

with open("kinematics.yaml", "w") as file:
yaml.dump(kinematics_yaml, file, sort_keys=False)

# Write unc file
error = []
for idx, i in enumerate(range(len(df))):
giacomomagni marked this conversation as resolved.
Show resolved Hide resolved
e = {"stat": float(df.loc[i, "stat"])}
error.append(e)

error_definition = {
"stat": {"description": "statistical uncertainty", "treatment": "ADD", "type": "UNCORR"}
}

uncertainties_yaml = {"definitions": error_definition, "bins": error}

with open("uncertainties.yaml", "w") as file:
yaml.dump(uncertainties_yaml, file, sort_keys=False)


if __name__ == "__main__":
# TODO: Need to generate `observable` cards and corresponding
# pineappl grids and FK tables as the orders have changed!!!!
fnames = glob.glob("rawdata/*.yaml")
nnames = sorted([i for i in fnames])
df = read_data(nnames)
write_data(df)
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
bins:
- pT:
min: 2.0
mid: 2.4
max: 3.0
sqrts:
min: null
mid: 200.0
max: null
eta:
min: null
mid: 0.0
max: null
- pT:
min: 3.0
mid: 3.4
max: 4.0
sqrts:
min: null
mid: 200.0
max: null
eta:
min: null
mid: 0.0
max: null
- pT:
min: 4.0
mid: 4.4
max: 5.0
sqrts:
min: null
mid: 200.0
max: null
eta:
min: null
mid: 0.0
max: null
- pT:
min: 5.0
mid: 5.4
max: 6.0
sqrts:
min: null
mid: 200.0
max: null
eta:
min: null
mid: 0.0
max: null
- pT:
min: 6.0
mid: 6.4
max: 7.0
sqrts:
min: null
mid: 200.0
max: null
eta:
min: null
mid: 0.0
max: null
- pT:
min: 7.0
mid: 7.4
max: 8.0
sqrts:
min: null
mid: 200.0
max: null
eta:
min: null
mid: 0.0
max: null
- pT:
min: 8.0
mid: 8.8
max: 10.0
sqrts:
min: null
mid: 200.0
max: null
eta:
min: null
mid: 0.0
max: null
- pT:
min: 10.0
mid: 10.8
max: 12.0
sqrts:
min: null
mid: 200.0
max: null
eta:
min: null
mid: 0.0
max: null
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
setname: "PHENIX_1JET_200GEV_ALL"
giacomomagni marked this conversation as resolved.
Show resolved Hide resolved

nnpdf_metadata:
experiment: "PHENIX"
nnpdf31_process: "JET_POL"
giacomomagni marked this conversation as resolved.
Show resolved Hide resolved

iNSPIRE:
url: "https://inspirehep.net/literature/870912"
hepdata:
url: "https://www.hepdata.net/record/ins870912"
version: 1

version: 1
version_comment: "Initial implementation"

implemented_observables:
- observable:
{
description: "ALL w.r.t. pT",
label: '$\frac{d^2\sigma}{dq^{2}d\langle pT \rangle}$',
giacomomagni marked this conversation as resolved.
Show resolved Hide resolved
units: "$pb/GeV^3$",
giacomomagni marked this conversation as resolved.
Show resolved Hide resolved
}
observable_name: ALL
process_type: JET_POL
giacomomagni marked this conversation as resolved.
Show resolved Hide resolved
ndata: 8
tables: [18]
kinematics:
variables:
pT:
{
description: "mean transverse momentum",
label: '$\langle pT \rangle$',
units: "$GeV$",
}
sqrts:
{ description: "COM energy", label: '$\sqrt{s}$', units: "$GeV$" }
giacomomagni marked this conversation as resolved.
Show resolved Hide resolved
eta: { description: "pseudorapidity", label: '$\eta$', units: "" }

file: kinematics.yaml
data_central: data.yaml
data_uncertainties:
- uncertainties.yaml
kinematic_coverage: [pT, sqrts, eta]
plotting:
kinematics_override: identity
dataset_label: "$A_{LL}$"
plot_x: pT
x_scale: log
y_label: "$A_{LL}$"
theory:
FK_tables:
- - PHENIX_1JET_200GEV_ALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
independent_variables:
- header: {name: '$p^{reco}_T$ Bins (GeV/$c$)'}
values:
- {low: 2, high: 3}
- {low: 3, high: 4}
- {low: 4, high: 5}
- {low: 5, high: 6}
- {low: 6, high: 7}
- {low: 7, high: 8}
- {low: 8, high: 10}
- {low: 10, high: 12}
dependent_variables:
- header: {name: '$<p^{reco}_T>$ (GeV/$c$)'}
values:
- value: 2.4
- value: 3.4
- value: 4.4
- value: 5.4
- value: 6.4
- value: 7.4
- value: 8.8
- value: 10.8
- header: {name: 'Jet $A_{LL}$'}
values:
- value: -0.0007
errors:
- {symerror: 7.7e-5, label: 'stat.'}
- value: 0.0039
errors:
- {symerror: 8.2e-4, label: 'stat.'}
- value: -0.0014
errors:
- {symerror: 5.2e-4, label: 'stat.'}
- value: -0.0005
errors:
- {symerror: 3.0e-4, label: 'stat.'}
- value: 0.0058
errors:
- {symerror: 5.2e-3, label: 'stat.'}
- value: 0.0034
errors:
- {symerror: 4.5e-3, label: 'stat.'}
- value: 0.0077
errors:
- {symerror: 1.2e-2, label: 'stat.'}
- value: -0.0181
errors:
- {symerror: 5.1e-2, label: 'stat.'}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
definitions:
stat:
description: statistical uncertainty
treatment: ADD
type: UNCORR
bins:
- stat: 7.7e-05
- stat: 0.00082
- stat: 0.00052
- stat: 0.0003
- stat: 0.0052
- stat: 0.0045
- stat: 0.012
- stat: 0.051
Loading