This differential cross section tool for exclusive single kaon electroproduction allows you to evaluate the differential cross section value for the large invariants' scales and any values. Relatively fast and effective procedures make this program a convenient and reliable choice for data analysis in particle physics.
The differential cross section of the kaons electroproduction off proton in the one-photon approximation:
Python is used as a primer programming language for that project. To use it you will need the following libraries: numpy, scipy, pandas and plotly. You can check the libriaries with "pip freeze" command. Make sure you have updated all packages (e.g. 'sudo apt update' and 'sudo apt upgrade')
To get this distributive use 'git clone -b python-version https://github.com/Maksaska/Diff_cros_strange.git'
Use 'config.yaml' file to set all KY model parameters. You will also need this file to fill your request. There you can find 4 modules:
model: This module sets the configuration. There are 6 parameters you can change:
- ratio_str: (recommended True) If True, Stt structure function is estimated from "ratio" method in the "weak" area of phase space. (See more in CLAS12 analysis note(in progress))
- add_factor: (recommended True) If True, Slt and Stt structure functions approximation fits along cos_th axis are factorized with sin_th and sin^2_th respectivly.
- W_sys: (recommended True) If True, adds an additional error to the output in the area of W extrapolation (with W > 2.575 GeV).
- err_option: 1 - constant extrapolation of errors along cos_th axis; 2 - linear extrapolation of errors along cos_th axis (up to a 100% of the last known data point error); 3 - quadratic extrapolation of errors along cos_th axis
- channel: "K+L" or "K+S0"
- E_beam: beam energy in GeV
cs_grid: This module provides you with either cross secton or structure function DataFrames in csv format
- str_func: if True, creates the DataFrame with all structure functions values for requested phase space points in csv format under './Result/str_fun/currrent_date.csv' path. Phase space grid is formed from all the possible combinations of (W, Q2, cos_th) provided by the user.
- diff_cs: if True, creates the DataFrame with all cross section values for requested phase space points in csv format under './Result/diff_cs/currrent_date.csv' path. Phase space grid is formed from all the possible combinations of (W, Q2, cos_th, phi) provided by the user.
- W: [1.7, 1.8]
- Q2: [0.5, 0.8]
- cos_th: [0.2, 0.6]
- phi: [-20, 30]
av_cs_grid: This module provides you with average cross secton DataFrames in csv format. There are 2 methods implemented:
- Manual bin input. The user can enter any amount of bins of any size. To add bin, add the following line into module:
binN: {'W': [W_min, W_max], 'Q2': [Q2_min, Q2_max], 'cos_th': [cos_th_min, cos_th_max], 'phi': [phi_min, phi_max]}
-
To activate the calculations set 'active' input field as 'True'
-
The output will be stored in csv format under './Result/av_diff_cs/currrent_date.csv' path. Phase space coordinats in the csv files are average points of specified bins.
- Average cross section calculation for predetermined number of bin along one (or two) of the axes. Set average phase space point with (W, Q2, cos_th, phi) and bin sizes with (dW, dQ2, dcos_th, dphi). By choosing one (or two) of the axes, you specify which reaction parameter will vary.
For example:
method2:
active: True
plot: False
W_axis: False
Q2_axis: True
cos_th_axis: True
phi_axis: False
W: 2.0
Q2: 1.5
cos_th: 0
phi: 45
dW: 0.1
dQ2: 0.5
dcos_th: 0.5
dphi: 10
-
method2 configuration above will request a DataFrame with average cross section dependencies along Q2 and cos_th with fixed average W and phi variables. Bin sizes for W and phi axes are fixed and equal to dW and dphi. This program will do the calculation for all possible phase space (e.g. for Q2 from 0 to 5 GeV2; W from MY to 2.65 GeV; cos_th from -1 to 1; phi from 0 to 360) Number of points for Q2 and cos_th axes depends on dQ2 and dcos_th. In our case, with 'dcos_th: 0.5' we will get 5 points along cos_th axis: -1, -0.5, 0, 0.5, 1.0. The same goes for Q2 with 'dQ2: 0.5', which runs from 0 to 5 GeV2.
-
To activate the calculations set 'active' input field as 'True'
-
if 'plot' is set to True, provide the user with interactive plot in html format under'./Result/Plots/observable_currrent_date.html' path.
-
The output will be stored in csv format under './Result/av_diff_cs/currrent_date.csv' path. Phase space coordinats in the csv files are average points of specified bins.
plot: This module provides you with plots for cross section or structure function.
- plot_cs - if set to True, creates a plot for cross section for specified (W, Q2, cos_th, phi)
- plot_str_func - if set to True, creates a plot for structure functions for specified (W, Q2, cos_th)
-
To activate the calculations set 'active' input field as 'True'
-
The output will be stored in html format under './Result/Plots/observable_currrent_date.html' path. Note: you can only choose one of the axes.