yadism.coefficient_functions package

Collect all kernels for given FNS.

class yadism.coefficient_functions.Combiner(esf)[source]

Bases: object

Does the matching between coefficient functions and partons with their appropriate coupling strength.

Parameters:

esf (EvaluatedStructureFunction) – current ESF

static apply_isospin(full, z, a)[source]

Apply isospin symmetry to u and d distributions.

Parameters:
  • full (list(yadism.kernels.Kernel)) – all participants

  • z (float) – number of protons

  • a (float) – atomic mass number

collect()[source]

Collect all kernels.

collect_elems()[source]

Collect all kernels according to the FNS.

Returns:

elems – all participants

Return type:

list(yadism.kernels.Kernel)

static drop_empty(full)[source]

Drop kernels with EmptyPartonicChannel or its partons with empty weight.

Parameters:

elems (list(yadism.kernels.Kernel)) – all participants

Returns:

filtered_kernels – improved participants

Return type:

list(yadism.kernels.Kernel)

heavy_components()[source]

Collect massive kernels.

heavylight_components()[source]

Collect single-flavor massless kernels.

light_component()[source]

Collect massless kernels.

class yadism.coefficient_functions.Component(heavy, kernels=None)[source]

Bases: list

Used for organize elements and debugging purpose.

__repr__()[source]

Return repr(self).

heavyness = {0: 'light', 4: 'charm', 5: 'bottom', 6: 'top'}

Subpackages

Submodules

yadism.coefficient_functions.coupling_constants module

Coupling between QCD particles and EW particles.

class yadism.coefficient_functions.coupling_constants.CKM2Matrix(elems)[source]

Bases: object

Wrapper for the CKM matrix.

__call__(pid)[source]

Get column and row depending on pid.

Parameters:

pid (int) – particle identifier

Returns:

row or column

Return type:

list(float)

__eq__(other) bool[source]

Equal method.

__getitem__(key)[source]

Allow pid and strings as key.

Parameters:

key (int or str) – input key

Returns:

element(s)

Return type:

float or list

__hash__ = None
__repr__()[source]

Return string representation.

flav_cols = ['d', 's', 'b']
flav_rows = ['u', 'c', 't']
classmethod from_str(theory_string)[source]

Create the object from a string representation.

Parameters:

theory_string (str) – all elements rowwise in a string

Returns:

created object

Return type:

CKMMatrix

masked(flavs)[source]

Apply a mask according to the flavor.

Parameters:

flavs (str) – participating flavors as single characters

Returns:

masked matrix

Return type:

CKMMatrix

pid_cols = [1, 3, 5]
pid_rows = [2, 4, 6]
class yadism.coefficient_functions.coupling_constants.CouplingConstants(theory_config, obs_config)[source]

Bases: object

Defines the coupling constants between the QCD particles and the EW particles.

classmethod from_dict(theory, observables)[source]

Create the object from the theory dictionary.

Parameters:
  • theory (dict) – theory dictionary

  • observables (dict) – observables dictionary

Returns:

created object

Return type:

CouplingConstants

get_fl11_weight(pid, Q2, nf, quark_coupling_type)[source]

Same as get_weight() but now for the NC flavor class \(fl_{11}\).

Combine the charges, both on the leptonic side and the hadronic side, as well as propagator changes and/or corrections.

Parameters:
  • pid (int) – particle identifier

  • Q2 (float) – DIS virtuality

  • nf (int) – number of active flavors

  • quark_coupling_type (str) – flag to distinguish for heavy quarks between vectorial and axial-vectorial coupling

Returns:

weight

Return type:

float

get_weight(pid, Q2, quark_coupling_type, cc_mask=None)[source]

Compute the weight for the pid contributions to the structure function.

Combine the charges, both on the leptonic side and the hadronic side, as well as propagator changes and/or corrections.

Parameters:
  • pid (int) – particle identifier

  • Q2 (float) – DIS virtuality

  • quark_coupling_type (str) – flag to distinguish for heavy quarks between vectorial and axial-vectorial coupling

  • cc_mask (str) – observable flavor to determine the heavy flavour couplings in F3

Returns:

weight

Return type:

float

leptonic_coupling(mode, quark_coupling_type)[source]

Compute the coupling of the boson to the lepton.

Parameters:
  • mode (str) – scattered bosons

  • quark_coupling_type (str) – (axial-)vectorial/(axial-)vectorial coupling

Returns:

leptonic coupling

Return type:

float

log()[source]

Write current configuration to log.

nc_partonic_coupling(pid)[source]

Neutral bosons-quark couplings.

partonic_coupling(mode, pid, quark_coupling_type, cc_mask=None)[source]

Compute the coupling of the boson to the parton.

Parameters:
  • mode (str) – scattered bosons

  • pid (int) – parton identifier

  • quark_coupling_type (str) – flag to distinguish for heavy quarks between vectorial and axial-vectorial coupling

  • cc_mask (str) – observable flavor to determine the heavy flavour couplings in F3

Returns:

partonic coupling

Return type:

float

partonic_coupling_fl11(mode, pid, nf, quark_coupling_type)[source]

Compute the coupling of the boson to the parton for the flavor class \(fl_{11}\).

This is a generalization of [LNvRV97] Table 2 (see also p. 27 there) for NC. The coupling is given by:

\[W_{q,bb'} = \frac{\text{tr}(Q_b)}{n_f} Q_b'\]

where the trace refers to flavor space. The gluon and pure singlet couplings are then build by summing over all the different electroweak channels.

Parameters:
  • mode (str) – scattered bosons

  • pid (int) – parton identifier

  • nf (int) – number of active flavors

  • quark_coupling_type (str) – flag to distinguish for heavy quarks between vectorial and axial-vectorial coupling

Returns:

partonic coupling

Return type:

float

propagator_factor(mode, Q2)[source]

Compute propagator correction to account for different bosons (\(\eta\) in PDG).

Parameters:
  • mode (str) – scattered bosons

  • Q2 (float) – virtuality of the process

Returns:

propagator shift

Return type:

float

vectorial_coupling(pid)[source]

Combine the vectorial coupling from electric and weak charges.

yadism.coefficient_functions.kernels module

Coefficient function kernels.

Kernels are a combination of the coupling structure (which parton with which weight) and the respective ‘raw’ mathematical coefficient function.

class yadism.coefficient_functions.kernels.Kernel(partons, coeff, max_order=None, min_order=None)[source]

Bases: object

Combination of partons with their weights and their mathematical expression in this channel.

Parameters:
  • partons (dict) – mapping pid -> weight

  • coeff (PartonicChannel) – mathematical expression

  • max_order (int) – if given, silence above this order

  • min_order (int) – if given, silence below this order

__mul__(f)[source]
__neg__()[source]
__repr__()[source]

Return repr(self).

__rmul__(f)[source]
property channel

Abstract classification in physical channels.

has_order(order)[source]

Is current order active.

Parameters:

order (int) – order

Returns:

is active?

Return type:

bool

yadism.coefficient_functions.kernels.cc_weights(coupling_constants, Q2, cc_mask, nf, is_pv)[source]

Collect the weights of the partons.

Parameters:
  • coupling_constants (CouplingConstants) – manager for coupling constants

  • Q2 (float) – W virtuality

  • cc_mask (str) – participating flavors on the CKM matrix

  • nf (int) – number of light flavors

  • is_pv (bool) – True if observable violates parity conservation

Returns:

weights – mapping pid -> weight for q and g channel

Return type:

dict

yadism.coefficient_functions.kernels.cc_weights_even(coupling_constants, Q2, cc_mask, nf, is_pv)[source]

Collect the weights of the partons.

Parameters:
  • coupling_constants (CouplingConstants) – manager for coupling constants

  • Q2 (float) – W virtuality

  • cc_mask (str) – participating flavors on the CKM matrix

  • nf (int) – number of light flavors

  • is_pv (bool) – True if observable violates parity conservation

Returns:

weights – mapping pid -> weight for q and g channel

Return type:

dict

yadism.coefficient_functions.kernels.cc_weights_odd(coupling_constants, Q2, cc_mask, nf, is_pv)[source]

Collect the weights of the partons.

Parameters:
  • coupling_constants (CouplingConstants) – manager for coupling constants

  • Q2 (float) – W virtuality

  • cc_mask (str) – participating flavors on the CKM matrix

  • nf (int) – number of light flavors

  • is_pv (bool) – True if observable violates parity conservation

Returns:

weights – mapping pid -> weight for q and g channel

Return type:

dict

yadism.coefficient_functions.kernels.generate_single_flavor_light(esf, nf, ihq)[source]

Add a light-like contribution for a single quark flavor.

The linear dependency to the electric charge is introduce by multiplying and diving by nf. The multiplication is implicit inside the coefficient function, the division is explicit made here.

Parameters:
Returns:

elems – list of elements

Return type:

list(yadism.kernels.Kernel)

yadism.coefficient_functions.kernels.import_local(kind, process, sibling)[source]

Import the suitable subpackage with the actual partonic channel implementation.

Parameters:
  • kind (str) – structure function kind

  • process (str) – DIS process type: “EM”,”NC”,”CC”

  • sibling (str) – relative parent to import from

Returns:

module – module

Return type:

module

yadism.coefficient_functions.partonic_channel module

class yadism.coefficient_functions.partonic_channel.EmptyPartonicChannel(*args, **_kwargs)[source]

Bases: PartonicChannel

class yadism.coefficient_functions.partonic_channel.PartonicChannel(ESF, nf)[source]

Bases: dict

Container of partonic coefficient functions

Parameters:
  • ESF (yadism.structure_function.esf.EvaluatedStructureFunction) – parent ESF

  • nf (int) – number of pure light flavors

static LO()[source]
static N3LO()[source]
static NLO()[source]
static NNLO()[source]
__annotations__ = {}
convolution_point()[source]

Convolution point

decorator(f)[source]

Deactivate preprocessing

Parameters:

f (callable) – input

Returns:

f – output

Return type:

callable

class yadism.coefficient_functions.partonic_channel.RSL(reg=None, sing=None, loc=None, args=None)[source]

Bases: object

RSL representation of a distribution, containing Dirac delta and plus distributions.

Parameters:
  • reg (callable) – regular part

  • sing (callable) – singular part

  • loc (callable) – local part

  • args (sequence or dict) – arguments to pass to the individual parts (if dict) or to all of them (if sequence); if no arguments needed None is available

__repr__()[source]

Return repr(self).

classmethod from_delta(delta_coeff)[source]
classmethod from_distr_coeffs(reg, coeffs, reg_args=None)[source]

Compute the RSL structure form the coefficients of the distributions.

Parameters:
  • regular (callable) – regular piece (passed unchanged)

  • delta (float) – coefficient of the Dirac-delta function

  • coeffs (list(float)) – coefficients of the plus-distributions with increasing power of log

yadism.coefficient_functions.partonic_channel.loc_from_delta(_, coeffs)[source]
yadism.coefficient_functions.partonic_channel.loc_from_distr_coeffs(x, coeffs)[source]
yadism.coefficient_functions.partonic_channel.sing_from_distr_coeffs(z, coeffs)[source]