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

Numerical FONLL #195

Merged
merged 100 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
c4e193d
try something for asy implementation
RoyStegeman May 7, 2023
742a952
checkpoint
RoyStegeman May 18, 2023
b428827
rebase
RoyStegeman May 18, 2023
8735b2f
why doesn't apfel agree?
RoyStegeman May 23, 2023
cfc5910
use nf instead of nl inputs for ffn0
RoyStegeman May 23, 2023
53fc25b
add some docstrings
RoyStegeman May 24, 2023
bd1fd67
remove ipdb
RoyStegeman May 24, 2023
ecbe8d5
change sign asy
RoyStegeman May 24, 2023
804e51d
benchmark ffn0 for various nf
RoyStegeman May 24, 2023
fbec1f4
expand xgrid ffn0 benchmark
RoyStegeman May 24, 2023
8b82e41
fix FFN0x in yadism
RoyStegeman May 24, 2023
9ee1e6c
fix test
RoyStegeman May 25, 2023
2bc3745
organize apfel_.py
RoyStegeman May 25, 2023
dd1cbb1
update ffn0 benchmark
RoyStegeman May 25, 2023
5fa33c3
some cleanup
RoyStegeman May 29, 2023
4a9dc2b
remove asy observable in favor of using scheme
RoyStegeman May 30, 2023
fafa337
reinstate is_havylight flavor_family
RoyStegeman May 30, 2023
1b4a4d6
rename fonll to asy
RoyStegeman May 30, 2023
a77f66a
generate_heavy_intrinsic_diff -> generate_heavy_intrinsic_asy
RoyStegeman May 30, 2023
c52529d
remove pdf matching
RoyStegeman Jun 1, 2023
b6e230a
Restructure light collection
felixhekhorn Jun 1, 2023
2cffea2
fix observablename properties
RoyStegeman Jun 1, 2023
b1dc466
unpin eko dependency
RoyStegeman Jun 5, 2023
39e0d39
update poetry.lock
RoyStegeman Jun 5, 2023
d842f96
remove pol matching
RoyStegeman Jun 5, 2023
53575e6
update eko dependency
RoyStegeman Jun 5, 2023
5620fe4
Update poetry.lock
felixhekhorn Jun 5, 2023
4f3ac03
Apply suggestions from code review
RoyStegeman Jun 5, 2023
892d863
remove damping
RoyStegeman Jun 6, 2023
798882a
reintroduce nc asy polarized test
RoyStegeman Jun 6, 2023
bc4ec4c
remove heavlight exception for FFN0
RoyStegeman Jun 7, 2023
a923ca7
Drop Delta_qq, K_qq
felixhekhorn Jun 7, 2023
8b01921
minimal changes for removal intrinsic matching
RoyStegeman Jun 7, 2023
20daf43
Disentangle heavy and intrinsic
felixhekhorn Jun 8, 2023
961357a
Reintroduce log, fix LO intrinsic asy
felixhekhorn Jun 8, 2023
0f82a19
Fix LO intrinsic asy correctly
felixhekhorn Jun 8, 2023
983008b
Fix typo, add tests for LO intr asy
felixhekhorn Jun 8, 2023
ebc0882
Add partonic channels for intrinsic asy
felixhekhorn Jun 9, 2023
c3ee34d
Provide intrinsic asy kernels
felixhekhorn Jun 9, 2023
8b6a262
Fix pylint errors
felixhekhorn Jun 9, 2023
981d8f9
Fix IC test
felixhekhorn Jun 9, 2023
a182c86
make Intrinsic classes recognised as intrinsic channel
RoyStegeman Jun 10, 2023
0c605a0
also include heavy kernel if heavy quark is intrinsic
RoyStegeman Jun 15, 2023
5b27d71
Apply suggestions from code review
RoyStegeman Jun 16, 2023
009be85
remove LightNonsingletShifted g1_nc
RoyStegeman Jun 16, 2023
4e950ed
Merge branch 'master' into numerical_fonll
RoyStegeman Jun 16, 2023
ba250be
fix import
RoyStegeman Jun 16, 2023
949b3ef
remove ihq=nl+1 restriction in ffn0
RoyStegeman Jun 17, 2023
77d2db2
this time remove ihq=nl+1 restriction from the heavy function
RoyStegeman Jun 17, 2023
0427940
fix to add light missing contribution for heavy quarks if zm
RoyStegeman Jun 17, 2023
83e73df
nl+1 becomes nf in missing_asy
RoyStegeman Jun 17, 2023
40ad452
Add unit test for missing FL
felixhekhorn Jun 19, 2023
f899c72
undo mistake
RoyStegeman Jun 19, 2023
f3eec27
rename nl to nf for asy kernels
RoyStegeman Jun 22, 2023
54bad14
change nf for alphas of
RoyStegeman Jun 23, 2023
f1f82a6
Make generate_missing* more symmetric
felixhekhorn Jun 27, 2023
c6efb2b
Make missing asy tests running
felixhekhorn Jun 28, 2023
02d3d11
add FONLL-FFNS and FONLL-FFN0 schemes
RoyStegeman Jul 22, 2023
e18a0ff
update min eta for LeProHQ
RoyStegeman Jul 22, 2023
d2a5943
Replace Adler integral with interpolation
felixhekhorn Jul 28, 2023
79670ba
add 'fonll-parts' flag
RoyStegeman Jul 31, 2023
20f3f48
Merge remote-tracking branch 'origin/numerical_fonll' into numerical_…
RoyStegeman Jul 31, 2023
42475ac
only calculate light contribution of fonll-parts in 'massless' or 'full'
RoyStegeman Jul 31, 2023
d8b49d0
rename fonll-parts to FONLLParts
RoyStegeman Jul 31, 2023
75f533a
fix tiny bug
RoyStegeman Jul 31, 2023
3d6458f
update bcdms pinecard generation to split by q2 bin
RoyStegeman Aug 3, 2023
47a5f9d
Merge branch 'master' into numerical_fonll
RoyStegeman Aug 3, 2023
b3fd5ad
improve f3_nc_asy
RoyStegeman Aug 3, 2023
0cc6478
consider only a single mass for fonll
RoyStegeman Aug 3, 2023
67be9ad
add comment to single mass fonll fns
RoyStegeman Aug 4, 2023
51743fc
Shift intrinsic asy convolution point
felixhekhorn Aug 9, 2023
c06ed9a
pair production threshold for f2_nc
RoyStegeman Aug 16, 2023
a72d485
always init self.m2hq in PartonicChannelAsy
RoyStegeman Aug 17, 2023
e092a60
rename is_below_threshold -> is_below_pair_threshold
RoyStegeman Aug 17, 2023
b57552c
lift is_below_pair_threshold to NC level class, thus duplicate for he…
RoyStegeman Aug 17, 2023
7a06832
add FONLLparts=full to test_export.py
RoyStegeman Aug 17, 2023
5071e98
finish asy pair threshold implementation by doing fL
RoyStegeman Aug 17, 2023
65ab2ed
init scratcing kin thr from asy
giacomomagni Sep 12, 2023
a2213e4
comment 51743fc for IC asy
giacomomagni Sep 13, 2023
13ad233
complete fixes on nFONLL removing thr in asy
giacomomagni Sep 26, 2023
b97e6d8
remove unused m2hq
giacomomagni Sep 26, 2023
7ecc714
remove missing asy test
RoyStegeman Sep 26, 2023
eef2355
Merge pull request #226 from NNPDF/fix_numerical_fonll
RoyStegeman Sep 26, 2023
df6f9b8
remove PTODIS=PTO constraint
RoyStegeman Oct 4, 2023
c9ba28f
only do PTODIS=PTO if PTODIS not defined in theorycard
RoyStegeman Oct 4, 2023
e2d6d67
remove kDIS{fl}Thr in favour of k{fl}Thr
RoyStegeman Oct 6, 2023
62022b1
make FONLLParts key optional
RoyStegeman Oct 6, 2023
7bd087e
minor cleaning
giacomomagni Oct 9, 2023
80e61ad
Update src/yadism/coefficient_functions/__init__.py
RoyStegeman Oct 9, 2023
5b61932
update doctring asy.kernels module
RoyStegeman Oct 9, 2023
fdc153a
remove fonll from apfel runner
RoyStegeman Oct 9, 2023
73aacec
remove skip_heavylight from light.kernels.generate inputs
RoyStegeman Oct 9, 2023
c60ecfc
Apply suggestions from code review
RoyStegeman Oct 10, 2023
bb150a1
remove FONLLParts=full from yadbox inputcard
RoyStegeman Oct 10, 2023
6c8834c
Update Adler
felixhekhorn Oct 13, 2023
aaca1c1
change Adler interpolation function
RoyStegeman Oct 15, 2023
560dea0
Use LeProHQ.Adler
felixhekhorn Oct 16, 2023
5df9d8a
Merge branch 'master' into numerical_fonll
giacomomagni Oct 19, 2023
2360c21
Add hack nans function
niclaurenti Oct 24, 2023
abe93f0
Revert "Add hack nans function"
niclaurenti Oct 24, 2023
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
209 changes: 129 additions & 80 deletions benchmarks/runners/apfel_.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ def benchmark_pto(self, pto):
)
self.run([{"PTO": pto}], obs_updates, ["ToyLH"])

# ============================================================================ #
# ZM-VFNS #
# ============================================================================ #


@pytest.mark.skip
class BenchmarkFlavorNumberScheme(ApfelBenchmark):
Expand All @@ -151,99 +155,156 @@ class BenchmarkFlavorNumberScheme(ApfelBenchmark):
# and thus we can NOT probe as low Q2 as before.

@staticmethod
def theory_updates_ffns(pto):
def theory_updates_zm(pto):
sv = {
"XIR": [0.5, 2.0],
"XIF": [0.5, 2.0],
# "XIR": [0.5, 2.0],
# "XIF": [0.5, 2.0],
"PTO": [pto],
"FNS": ["FFNS"],
"mb": 1e6,
"mt": 1e6,
"FNS": ["ZM-VFNS"],
}
theory_updates = cartesian_product(sv)
# add FONLL
sv["FNS"] = ["FONLL-A"]
sv["NfFF"] = [4]
theory_updates.append(cartesian_product(sv))
return theory_updates
return cartesian_product(sv)

@staticmethod
def obs_updates_ffns():
def obs_updates_zm():
kins = []
kins.extend(
[
dict(x=x, Q2=10.0)
for x in observables.default_card["interpolation_xgrid"][3::3]
]
)
kins.extend([dict(x=0.001, Q2=Q2) for Q2 in np.geomspace(5, 22, 10).tolist()])
# kins.extend(
# [
# dict(x=x, Q2=10.0)
# for x in observables.default_card["interpolation_xgrid"][3::3]
# ]
# )
kins.extend([dict(x=0.01, Q2=Q2) for Q2 in np.geomspace(5, 1e4, 10).tolist()])
obs_updates = observables.build(
["F2total", "F2charm", "FLtotal", "FLcharm", "F3total", "F3charm"],
kins,
update={"prDIS": ["NC", "CC"]},
["F2_total", "F3_total", "FL_total"], kins, update={"prDIS": ["NC", "CC"]}
)
return obs_updates

def benchmark_zm(self, pto):
self.run(
self.theory_updates_zm(pto),
self.obs_updates_zm(),
["ToyLH"],
)

# ============================================================================ #
# FFNS #
# ============================================================================ #

@staticmethod
def theory_updates_zm(pto):
def theory_updates_ffns(pto):
sv = {
"XIR": [0.5, 2.0],
"XIF": [0.5, 2.0],
# "XIR": [0.5, 2.0],
# "XIF": [0.5, 2.0],
"PTO": [pto],
"FNS": ["ZM-VFNS"],
"FNS": ["FFNS"],
"mb": [1e7],
"mt": [1e8],
"NfFF": [3],
"Qref": [1.9],
"nfref": [3],
}
# theory_updates = cartesian_product(sv)
# sv["NfFF"] = [5]
# theory_updates.append(cartesian_product(sv))
return cartesian_product(sv)

@staticmethod
def obs_updates_zm():
def obs_updates_ffns():
kins = []
kins.extend(
[
dict(x=x, Q2=10.0)
for x in observables.default_card["interpolation_xgrid"][10::3]
for x in observables.default_card["interpolation_xgrid"][12::3]
]
)
kins.extend([dict(x=0.001, Q2=Q2) for Q2 in np.geomspace(3, 1e4, 10).tolist()])
kins.extend([dict(x=0.001, Q2=Q2) for Q2 in np.geomspace(10, 20, 5).tolist()])
obs_updates = observables.build(
["F2_total", "F3_total", "FL_total"], kins, update={"prDIS": ["NC", "CC"]}
[
# "F2_total",
# "F2_charm",
# "F2_bottom",
"F2_light"
],
kins,
update={
"prDIS": [
"NC",
# "CC"
]
},
)
return obs_updates

def benchmark_ffns(self, pto):
self.run(
self.theory_updates_ffns(pto),
self.obs_updates_ffns(),
["NNPDF40_nnlo_as_01180"],
)

# ============================================================================ #
# FFN0 #
# ============================================================================ #

@staticmethod
def theory_updates_ffn0(pto):
sv = {
# "XIR": [0.5, 2.0],
# "XIF": [0.5, 2.0],
# "kcThr": [np.inf],
# "kbThr": [np.inf],
# "ktThr": [np.inf],
"PTO": [pto],
"FNS": ["FFN0"],
"mb": [1e7],
"mt": [1e8],
"NfFF": [3],
"Qref": [1.9],
"nfref": [3],
}
return cartesian_product(sv)

@staticmethod
def obs_updates_pol():
def obs_updates_ffn0():
kins = []
kins.extend(
[
dict(x=x, Q2=10.0)
for x in observables.default_card["interpolation_xgrid"][10::3]
dict(x=x, Q2=10**2)
for x in observables.default_card["interpolation_xgrid"][12::3]
]
)
kins.extend([dict(x=0.001, Q2=Q2) for Q2 in np.geomspace(3, 1e4, 10).tolist()])
kins.extend(
[dict(x=0.001, Q2=Q**2) for Q in np.geomspace(1, 1e4, 5).tolist()]
)
obs_updates = observables.build(
["g1_total"], kins, update={"prDIS": ["EM"], "PolarizationDIS": [True]}
[
"F2_charm",
# "F2_bottom",
# "F2_top",
# "F2_light",
# "F2_total",
],
kins,
update={
"prDIS": [
"NC",
# "CC",
]
},
)
return obs_updates

def benchmark_ffns(self, pto):
def benchmark_ffn0(self, pto):
self.run(
self.theory_updates_ffns(pto),
self.obs_updates_ffns(),
self.theory_updates_ffn0(pto),
self.obs_updates_ffn0(),
["ToyLH"],
)

def benchmark_zm(self, pto):
self.run(
self.theory_updates_zm(pto),
self.obs_updates_zm(),
["ToyLH"],
)

def benchmark_polarized(self, pto):
self.run(
[{"PTO": pto, "FNS": "ZM-VFNS"}],
self.obs_updates_pol(),
["ToyLH"],
)
# ============================================================================ #
# IC #
# ============================================================================ #


class ApfelICBenchmark(ApfelBenchmark):
Expand All @@ -261,15 +322,15 @@ def obs_updates(allow_cc=False):
obs = [
{
"prDIS": "NC",
"observables": {f: kinematics for f in ["F2charm", "FLcharm"]},
"observables": {f: kinematics for f in ["F2_charm", "FL_charm"]},
},
]
if allow_cc:
obs.append(
{
"prDIS": "CC",
"observables": {
f: kinematics for f in ["F2charm", "FLcharm", "F3charm"]
f: kinematics for f in ["F2_charm", "FL_charm", "F3_charm"]
},
}
)
Expand All @@ -278,19 +339,10 @@ def obs_updates(allow_cc=False):

class BenchmarkICFFNS(ApfelICBenchmark):
def benchmark_lo(self):
self.run([{"IC": 1}], self.obs_updates(True), ["conly", "CT14llo_NF4"])

def benchmark_nlo(self):
self.run([{"PTO": 1, "IC": 1}], self.obs_updates(), ["conly", "CT14llo_NF4"])

self.run([{"IC": 1}], self.obs_updates(True), ["CT14llo_NF4"])

class BenchmarkICFONLL(ApfelICBenchmark):
def benchmark_nlo(self):
self.run(
[{"PTO": 1, "IC": 1, "FNS": "FONLL-A", "NfFF": 4}],
self.obs_updates(),
["conly", "CT14llo_NF4"],
)
self.run([{"PTO": 1, "IC": 1}], self.obs_updates(), ["CT14llo_NF4"])


if __name__ == "__main__":
Expand All @@ -306,18 +358,26 @@ def benchmark_nlo(self):
# pos.benchmark_pto(0)
# pos.benchmark_pto(1)

ffn0bench = BenchmarkFlavorNumberScheme()
# ffn0bench.benchmark_zm(0)
# ffn0bench.benchmark_zm(1)
# ffn0bench.benchmark_zm(2)
# ffn0bench.benchmark_ffns(1)
# ffn0bench.benchmark_ffns(2)
# ffn0bench.benchmark_ffn0(0)
# ffn0bench.benchmark_ffn0(1)
ffn0bench.benchmark_ffn0(2)

# ffns = BenchmarkICFFNS()
# ffns.benchmark_lo()
# ffns.benchmark_nlo()
# fonll = BenchmarkICFONLL()
# fonll.benchmark_nlo()

# xs = BenchmarkXS()
# xs.benchmark_pto(0)

pol = BenchmarkFlavorNumberScheme()
pol.benchmark_polarized(0)
pol.benchmark_polarized(1)
# pol = BenchmarkFlavorNumberScheme()
# pol.benchmark_polarized(0)
# pol.benchmark_polarized(1)

# def plain_assert_external(theory, obs, sf, yad):
# # APFEL has a discretization in Q2/m2
Expand Down Expand Up @@ -375,14 +435,3 @@ def benchmark_nlo(self):
# ):
# return False
# return None

# def fonll_assert(theory, _obs, sf, yad):
# if (
# sf == "FLbottom"
# and theory["mb"] ** 2 / 4 < yad["Q2"] < theory["mb"] ** 2
# ):
# # APFEL has a discreization in Q2/m2
# return dict(abs=5e-6)
# if sf == "FLcharm" and yad["Q2"] < 7 and theory["DAMP"] == 1:
# return dict(abs=2e-5)
# return None
1 change: 0 additions & 1 deletion benchmarks/runners/sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ def run_pineappl(self):
# t["FNS"] = "FFNS"
t["NfFF"] = 4
t["PTO"] = 1
# t["kDISbThr"] = 10
# t["mb"] = 1e6
# t["mt"] = 1e7
self.run([t], [o], [
Expand Down
3 changes: 0 additions & 3 deletions extras/fonll_hq_treatment/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@
"Comments": "NNPDF4.0 NNLO alphas=0.118",
"global_nx": 0,
"EScaleVar": 1,
"kDIScThr": 1.0,
"kDISbThr": 1.0,
"kDIStThr": 1.0,
}

observables_card = {
Expand Down
Loading