Skip to content

Commit 3c8b923

Browse files
committed
Implement multiplicative PC for jet
1 parent 1b40c4c commit 3c8b923

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

validphys2/src/validphys/theorycovariance/higher_twist_functions.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -245,23 +245,27 @@ def jets_pc_func(
245245
return PC
246246

247247

248-
def JET_pc(pc_nodes, pT, rap, pc_func_type: str = "step"):
248+
def JET_pc(dataset_sp, pdf, pc_nodes, pT, rap, pc_func_type: str = "step"):
249249
"""
250250
Returns the function that computes the shift for the ratio for single
251251
jet cross sections. In particular, the shift is computed such that
252252
253-
xsec -> xsec + PC,
253+
xsec -> xsec * ( 1 + PC ),
254254
255255
and the shift is defined as
256256
257257
Delta(xsec) = (xsec + xsec) - xsec = PC.
258258
259-
The power correction is a function of the transverse momentum of the jet.
259+
The power correction is a function of the rapidity.
260260
"""
261+
cuts = dataset_sp.cuts
262+
(fkspec,) = dataset_sp.fkspecs
263+
fk = fkspec.load_with_cuts(cuts)
264+
xsec = central_fk_predictions(fk, pdf)
261265

262266
def func(y_values):
263267
result = jets_pc_func(y_values, pc_nodes, pT, rap, pc_func_type)
264-
return result
268+
return np.multiply(result, xsec.to_numpy()[:, 0])
265269

266270
return func
267271

@@ -1054,7 +1058,7 @@ def average(y_values_pc2_p, y_values_pcL_p, y_values_pc3_p):
10541058
eta = cd_table['kin1'].to_numpy()
10551059
pT = cd_table['kin2'].to_numpy()
10561060

1057-
pc_func = JET_pc(pc_jet_nodes, pT, eta, pc_func_type)
1061+
pc_func = JET_pc(dataset_sp, pdf, pc_jet_nodes, pT, eta, pc_func_type)
10581062
for pars_pc in pars_combs:
10591063
deltas[pars_pc['label']] = pc_func(pars_pc['comb']['Hj'])
10601064

0 commit comments

Comments
 (0)