ijazz.toys
Attributes
Functions
|
Decalibrate the response of the events for the property x. |
|
Applies additional oversmearing based on the property x. |
|
Create the dataset. |
|
|
|
|
|
|
|
Adds Gaussian smearing with resolution sigma to x1, x2, and mee. |
|
Decalibrate and add oversmearing to pT1, pT2, and mee. |
Module Contents
- ijazz.toys.__doc__ = 'This module allows to create a simple MC simulation of the Z->ee decaywith a gaussian smearing...[source]
- ijazz.toys.decalibrate(x)[source]
Decalibrate the response of the events for the property x.
- Parameters:
x (np.ndarray) – Input property.
- Returns:
Decalibrated response.
- Return type:
tf.Tensor
- ijazz.toys.oversmearing(x)[source]
Applies additional oversmearing based on the property x.
- Parameters:
x (np.ndarray) – Input property.
- Returns:
Oversmearing values.
- Return type:
np.ndarray
- ijazz.toys.dataset(do_decal, n_toys=100, decalibrate_f=decalibrate, oversmearing_f=oversmearing, smear_property=False, prop_gaus=False, return_smear=False)[source]
Create the dataset.
- Parameters:
prop_gaus (bool) – If True, generate properties with a Gaussian distribution (mean=45, sigma=25).
do_decal (bool) – If True, decalibrate the Z BW events using the decalibrate_f and oversmearing_f functions.
n_toys (int) – Number of Monte Carlo toys to generate.
decalibrate_f (Callable) – Function to apply scale decalibration.
oversmearing_f (Callable) – Function to apply oversmearing.
smear_property (bool) – If True, smear the properties x1 and x2 according to the smearing in the mass.
prop_gaus – If True, generate properties with a Gaussian shape.
return_smear (bool) – If True, return smeared values.
- Returns:
A tuple containing the smeared mass (mee_smear), and the properties x1 and x2 of the two electrons. If return_smear is True, also return the smearing factors s1 and s2.
- Return type:
Tuple[tf.Tensor, tf.Tensor, tf.Tensor]
- ijazz.toys.detector_smearing(x1, x2, mee, sigma=0.02)[source]
Adds Gaussian smearing with resolution sigma to x1, x2, and mee.
- Parameters:
x1 (np.ndarray) – Variable to apply the smearing (first electron).
x2 (np.ndarray) – Variable to apply the smearing (second electron).
mee (np.ndarray) – Variable to apply the smearing (dilepton system).
sigma (float, optional) – Gaussian resolution. Defaults to 0.02.
- Returns:
Smeared variables x1_smear, x2_smear, and mee_smear.
- Return type:
Tuple[np.ndarray, np.ndarray, np.ndarray]
- ijazz.toys.decal_and_os(x1, x2, pT1, pT2, mee, decalibrate_f=decalibrate, oversmearing_f=oversmearing, decal_kwargs={}, os_kwargs={})[source]
Decalibrate and add oversmearing to pT1, pT2, and mee.
- Parameters:
x1 (tuple) – Variables to use as input for the decalibrate and oversmearing functions (first lepton).
x2 (tuple) – Variables to use as input for the decalibrate and oversmearing functions (second lepton).
pT1 (float) – Variable to apply the decalibration and oversmearing (first lepton).
pT2 (float) – Variable to apply the decalibration and oversmearing (second lepton).
mee (float) – Variable to apply the decalibration and oversmearing (dilepton system).
decalibrate_f (Callable) – Function to decalibrate the pT. Defaults to decalibrate.
oversmearing_f (Callable) – Function to oversmear the pT. Defaults to oversmearing_all.
- Returns:
pT1_smear, pT2_smear, mee_smear, mee_os (mee with only oversmearing).
- Return type:
Tuple[float, float, float, float]