Lecture 18 – Polarization observables#
Polarization observables extraction examples: RGK data on KΛ electroproduction data and MC.
This routine reads txt files containing yields in the three kinematic variables in the prime reference frame and produces a txt file (example.txt) with the x component of the polarization vs. \(Q^2\). We have three types of txt files: DATA, REC and MC.
Get C++ code
import os
import gdown
from IPython.display import Code
path = "lecture18.cpp"
if not os.path.exists(path):
path = gdown.download(
url=f"https://raw.githubusercontent.com/ComPWA/strong2020-salamanca/main/docs/{path}",
quiet=True,
)
Code(path, language="cpp")
Get C++ code
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include <cmath>
#include <vector>
using namespace std;
int main()
{
double Q2_bin[20] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19};
double W_bin[31] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30};
double costheta_bin[40] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39};
double ACC_Q2_f[20] = {0};
double ACC_W_f[31] = {0};
double ACC_c_f[40] = {0};
double ACC_Q2_b[20] = {0};
double ACC_W_b[31] = {0};
double ACC_c_b[40] = {0};
double Q2[20] = {0};
double W[31] = {0};
double costheta[40] = {0};
double Q2_data_x_up[20] = {0};
double W_data_x_up[31] = {0};
double costheta_data_x_up[40] = {0};
double Q2_MC_x_up[20] = {0};
double W_MC_x_up[31] = {0};
double costheta_MC_x_up[40] = {0};
double Q2_REC_x_up[20] = {0};
double W_REC_x_up[31] = {0};
double costheta_REC_x_up[40] = {0};
double Q2_data_y_up[20] = {0};
double W_data_y_up[31] = {0};
double costheta_data_y_up[40] = {0};
double Q2_MC_y_up[20] = {0};
double W_MC_y_up[31] = {0};
double costheta_MC_y_up[40] = {0};
double Q2_REC_y_up[20] = {0};
double W_REC_y_up[31] = {0};
double costheta_REC_y_up[40] = {0};
double Q2_data_z_up[20] = {0};
double W_data_z_up[31] = {0};
double costheta_data_z_up[40] = {0};
double Q2_MC_z_up[20] = {0};
double W_MC_z_up[31] = {0};
double costheta_MC_z_up[40] = {0};
double Q2_REC_z_up[20] = {0};
double W_REC_z_up[31] = {0};
double costheta_REC_z_up[40] = {0};
double Q2_data_x_down[20] = {0};
double W_data_x_down[31] = {0};
double costheta_data_x_down[40] = {0};
double Q2_MC_x_down[20] = {0};
double W_MC_x_down[31] = {0};
double costheta_MC_x_down[40] = {0};
double Q2_REC_x_down[20] = {0};
double W_REC_x_down[31] = {0};
double costheta_REC_x_down[40] = {0};
double Q2_data_y_down[20] = {0};
double W_data_y_down[31] = {0};
double costheta_data_y_down[40] = {0};
double Q2_MC_y_down[20] = {0};
double W_MC_y_down[31] = {0};
double costheta_MC_y_down[40] = {0};
double Q2_REC_y_down[20] = {0};
double W_REC_y_down[31] = {0};
double costheta_REC_y_down[40] = {0};
double Q2_data_z_down[20] = {0};
double W_data_z_down[31] = {0};
double costheta_data_z_down[40] = {0};
double Q2_MC_z_down[20] = {0};
double W_MC_z_down[31] = {0};
double costheta_MC_z_down[40] = {0};
double Q2_REC_z_down[20] = {0};
double W_REC_z_down[31] = {0};
double costheta_REC_z_down[40] = {0};
bool Pprime = true;
bool Psec = false;
bool Punprime = false;
bool sigmaTRUE = false;
bool windowTRUE = true;
// Leggo i file 1D e acquisisco i valori
ifstream lettura;
if (windowTRUE)
{
if (!sigmaTRUE)
if (Pprime)
lettura.open("Q2_Pprime_induced_lambda.dat");
}
int tot = 0;
for (int i = 0; i < 20; i++)
{
lettura >> Q2[i] >> Q2_data_x_up[i] >> Q2_data_x_down[i] >> Q2_data_y_up[i] >> Q2_data_y_down[i] >> Q2_data_z_up[i] >> Q2_data_z_down[i];
}
lettura.close();
if (windowTRUE)
{
if (!sigmaTRUE)
if (Pprime)
lettura.open("genKY_Q2_Pprime_induced_MC_lambda.dat");
}
if (!windowTRUE)
{
if (!sigmaTRUE)
if (Pprime)
lettura.open("/home/Lucilla/workspace/KYdata/prove1/genKY_Q2_Pprime_induced_MC_lambda.dat");
}
tot = 0;
for (int i = 0; i < 20; i++)
{
lettura >> Q2[i] >> Q2_MC_x_up[i] >> Q2_MC_x_down[i] >> Q2_MC_y_up[i] >> Q2_MC_y_down[i] >> Q2_MC_z_up[i] >> Q2_MC_z_down[i];
Q2_MC_x_up[i] = Q2_MC_x_up[i] * 0.64;
Q2_MC_x_down[i] = Q2_MC_x_down[i] * 0.64;
Q2_MC_y_up[i] = Q2_MC_y_up[i] * 0.64;
Q2_MC_y_down[i] = Q2_MC_y_down[i] * 0.64;
Q2_MC_z_up[i] = Q2_MC_z_up[i] * 0.64;
Q2_MC_z_down[i] = Q2_MC_z_down[i] * 0.64;
}
lettura.close();
if (windowTRUE)
{
if (!sigmaTRUE)
if (Pprime)
lettura.open("Q2_Pprime_induced_REC_genKY_lambda.dat");
}
tot = 0;
for (int i = 0; i < 20; i++)
{
lettura >> Q2[i] >> Q2_REC_x_up[i] >> Q2_REC_x_down[i] >> Q2_REC_y_up[i] >> Q2_REC_y_down[i] >> Q2_REC_z_up[i] >> Q2_REC_z_down[i];
}
lettura.close();
for (int i = 0; i < 20; i++)
{
ACC_Q2_f[i] = 0.64 * (double)(Q2_REC_x_up[i] / (Q2_MC_x_up[i]));
}
for (int i = 0; i < 20; i++)
{
ACC_Q2_b[i] = 0.64 * (double)(Q2_REC_x_down[i] / (Q2_MC_x_down[i]));
}
if (windowTRUE)
{
if (!sigmaTRUE)
if (Pprime)
lettura.open("W_Pprime_induced_lambda.dat");
}
tot = 0;
for (int i = 0; i < 31; i++)
{
lettura >> W[i] >> W_data_x_up[i] >> W_data_x_down[i] >> W_data_y_up[i] >> W_data_y_down[i] >> W_data_z_up[i] >> W_data_z_down[i];
}
lettura.close();
if (windowTRUE)
{
if (!sigmaTRUE)
if (Pprime)
lettura.open("genKY_W_Pprime_induced_MC_lambda.dat");
}
tot = 0;
for (int i = 0; i < 31; i++)
{
lettura >> W[i] >> W_MC_x_up[i] >> W_MC_x_down[i] >> W_MC_y_up[i] >> W_MC_y_down[i] >> W_MC_z_up[i] >> W_MC_z_down[i];
W_MC_x_up[i] = W_MC_x_up[i] * 0.64;
W_MC_x_down[i] = W_MC_x_down[i] * 0.64;
W_MC_y_up[i] = W_MC_y_up[i] * 0.64;
W_MC_y_down[i] = W_MC_y_down[i] * 0.64;
W_MC_z_up[i] = W_MC_z_up[i] * 0.64;
W_MC_z_down[i] = W_MC_z_down[i] * 0.64;
}
lettura.close();
if (windowTRUE)
{
if (!sigmaTRUE)
if (Pprime)
lettura.open("W_Pprime_induced_REC_genKY_lambda.dat");
}
tot = 0;
for (int i = 0; i < 31; i++)
{
lettura >> W[i] >> W_REC_x_up[i] >> W_REC_x_down[i] >> W_REC_y_up[i] >> W_REC_y_down[i] >> W_REC_z_up[i] >> W_REC_z_down[i];
}
lettura.close();
for (int i = 0; i < 31; i++)
{
if (W_MC_x_up[i] != 0)
ACC_W_f[i] = 0.64 * (double)(W_REC_x_up[i] / (W_MC_x_up[i]));
}
for (int i = 0; i < 31; i++)
{
if (W_MC_x_down[i] != 0)
ACC_W_b[i] = 0.64 * (double)(W_REC_x_down[i] / (W_MC_x_down[i]));
}
if (windowTRUE)
{
if (!sigmaTRUE)
if (Pprime)
lettura.open("costheta_Pprime_induced_lambda.dat");
}
tot = 0;
for (int i = 0; i < 40; i++)
{
lettura >> costheta[i] >> costheta_data_x_up[i] >> costheta_data_x_down[i] >> costheta_data_y_up[i] >> costheta_data_y_down[i] >> costheta_data_z_up[i] >> costheta_data_z_down[i];
}
lettura.close();
if (windowTRUE)
{
if (!sigmaTRUE)
if (Pprime)
lettura.open("genKY_costheta_Pprime_induced_MC_lambda.dat");
}
for (int i = 0; i < 40; i++)
{
lettura >> costheta[i] >> costheta_MC_x_up[i] >> costheta_MC_x_down[i] >> costheta_MC_y_up[i] >> costheta_MC_y_down[i] >> costheta_MC_z_up[i] >> costheta_MC_z_down[i];
costheta_MC_x_up[i] = costheta_MC_x_up[i] * 0.64;
costheta_MC_x_down[i] = costheta_MC_x_down[i] * 0.64;
costheta_MC_y_up[i] = costheta_MC_y_up[i] * 0.64;
costheta_MC_y_down[i] = costheta_MC_y_down[i] * 0.64;
costheta_MC_z_up[i] = costheta_MC_z_up[i] * 0.64;
costheta_MC_z_down[i] = costheta_MC_z_down[i] * 0.64;
}
lettura.close();
if (windowTRUE)
{
if (!sigmaTRUE)
if (Pprime)
lettura.open("costheta_Pprime_induced_REC_genKY_lambda.dat");
}
for (int i = 0; i < 40; i++)
{
lettura >> costheta[i] >> costheta_REC_x_up[i] >> costheta_REC_x_down[i] >> costheta_REC_y_up[i] >> costheta_REC_y_down[i] >> costheta_REC_z_up[i] >> costheta_REC_z_down[i];
}
lettura.close();
for (int i = 0; i < 40; i++)
{
ACC_c_f[i] = 0.64 * (double)(costheta_REC_x_up[i] / (costheta_MC_x_up[i]));
}
for (int i = 0; i < 40; i++)
{
ACC_c_b[i] = 0.64 * (double)(costheta_REC_x_down[i] / (costheta_MC_x_down[i]));
}
double N_tot = 0;
char comp_array[] = {"xyz"};
double Costheta_array[40] = {-1, -0.95, -0.9, -0.85, -0.8, -0.75, -0.7, -0.65, -0.6, -0.55, -0.5, -0.45, -0.4, -0.35, -0.3, -0.25, -0.2, -0.15, -0.1, -0.05, 0., 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95};
double W_array[31] = {1.625, 1.650, 1.675, 1.7, 1.725, 1.75, 1.775, 1.8, 1.825, 1.85, 1.875, 1.9, 1.925, 1.95, 1.975, 2., 2.025, 2.05, 2.075, 2.1, 2.125, 2.15, 2.175, 2.2, 2.225, 2.25, 2.275, 2.3, 2.325, 2.35, 2.375};
double Q2_array[20] = {0.35, 0.45, 0.55, 0.65, 0.75, 0.85, 0.95, 1.05, 1.15, 1.25, 1.35, 1.45, 1.6, 1.8, 2., 2.2, 2.4, 2.65, 2.95, 3.3};
double asimmetry_q2[20] = {0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double asimmetry_q2_REC[20] = {0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double asimmetry_q2_corr[20] = {0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double asimmetry_q2_REC_corr[20] = {0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double asimmetry_q2_MC[20] = {0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double asimmetry_w[31] = {0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double asimmetry_w_REC[31] = {0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double asimmetry_w_corr[31] = {0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double asimmetry_w_REC_corr[31] = {0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double asimmetry_w_MC[31] = {0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double asimmetry_c[40] = {0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double asimmetry_c_REC[40] = {0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double asimmetry_c_corr[40] = {0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double asimmetry_c_REC_corr[40] = {0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double asimmetry_c_MC[40] = {0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double err_q2[20] = {0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double err_q2_REC[20] = {0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double err_q2_MC[20] = {0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double err_w[31] = {0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double err_w_REC[31] = {0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double err_w_MC[31] = {0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double err_c[40] = {0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double err_c_REC[40] = {0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double err_c_MC[40] = {0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
// Q2
ofstream myfile;
myfile.open("example.txt");
// cout<<" X "<<endl;
for (int i = 0; i < 20; i++)
{
asimmetry_q2[i] = (double)(Q2_data_x_up[i] - Q2_data_x_down[i]) / (Q2_data_x_up[i] + Q2_data_x_down[i]) / 0.5 / 0.732;
asimmetry_q2_REC[i] = (double)(Q2_REC_x_up[i] - Q2_REC_x_down[i]) / (Q2_REC_x_up[i] + Q2_REC_x_down[i]) / 0.5 / 0.732;
asimmetry_q2_MC[i] = (double)(Q2_MC_x_up[i] - Q2_MC_x_down[i]) / (Q2_MC_x_up[i] + Q2_MC_x_down[i]) / 0.5 / 0.732;
asimmetry_q2_corr[i] = (double)((Q2_data_x_up[i] / (Q2_REC_x_up[i] / Q2_MC_x_up[i])) - (Q2_data_x_down[i] / (Q2_REC_x_down[i] / Q2_MC_x_down[i]))) / ((Q2_data_x_up[i] / (Q2_REC_x_up[i] / Q2_MC_x_up[i])) + (Q2_data_x_down[i] / (Q2_REC_x_down[i] / Q2_MC_x_down[i]))) / 0.5 / 0.732;
if (sigmaTRUE)
{
asimmetry_q2[i] = asimmetry_q2[i] / (-0.256);
asimmetry_q2_REC[i] = asimmetry_q2_REC[i] / (-0.256);
asimmetry_q2_MC[i] = asimmetry_q2_MC[i] / (-0.256);
asimmetry_q2_corr[i] = asimmetry_q2_corr[i] / (-0.256);
}
// cout<<"Q2: "<<Q2_array[i]<<" "<<asimmetry_q2_corr[i]<<" "<<Q2_data_x_up[i] <<" "<< Q2_REC_x_up[i]<<" "<<Q2_MC_x_up[i]<<endl;
asimmetry_q2_REC_corr[i] = (double)((Q2_REC_x_up[i] / (Q2_REC_x_up[i] / Q2_MC_x_up[i])) - (Q2_REC_x_down[i] / (Q2_REC_x_down[i] / Q2_MC_x_down[i]))) / ((Q2_REC_x_up[i] / (Q2_REC_x_up[i] / Q2_MC_x_up[i])) + (Q2_REC_x_down[i] / (Q2_REC_x_down[i] / Q2_MC_x_down[i]))) / 0.5 / 0.732;
myfile << Q2_array[i] << " " << asimmetry_q2_corr[i] << endl;
}
myfile.close();
// W
// cout<<" X "<<endl;
for (int i = 0; i < 31; i++)
{
asimmetry_w[i] = (double)(W_data_x_up[i] - W_data_x_down[i]) / (W_data_x_up[i] + W_data_x_down[i]) / 0.5 / 0.732;
asimmetry_w_REC[i] = (double)(W_REC_x_up[i] - W_REC_x_down[i]) / (W_REC_x_up[i] + W_REC_x_down[i]) / 0.5 / 0.732;
asimmetry_w_MC[i] = (double)(W_MC_x_up[i] - W_MC_x_down[i]) / (W_MC_x_up[i] + W_MC_x_down[i]) / 0.5 / 0.732;
asimmetry_w_corr[i] = (double)((W_data_x_up[i] / (W_REC_x_up[i] / W_MC_x_up[i])) - (W_data_x_down[i] / (W_REC_x_down[i] / W_MC_x_down[i]))) / ((W_data_x_up[i] / (W_REC_x_up[i] / W_MC_x_up[i])) + (W_data_x_down[i] / (W_REC_x_down[i] / W_MC_x_down[i]))) / 0.5 / 0.732;
if (sigmaTRUE)
{
asimmetry_w[i] = asimmetry_w[i] / (-0.256);
asimmetry_w_REC[i] = asimmetry_w_REC[i] / (-0.256);
asimmetry_w_MC[i] = asimmetry_w_MC[i] / (-0.256);
asimmetry_w_corr[i] = asimmetry_w_corr[i] / (-0.256);
}
// cout<<W_array[i]<<" "<<asimmetry_w_corr[i]<<endl;
asimmetry_w_REC_corr[i] = (double)((W_REC_x_up[i] / (W_REC_x_up[i] / W_MC_x_up[i])) - (W_REC_x_down[i] / (W_REC_x_down[i] / W_MC_x_down[i]))) / ((W_REC_x_up[i] / (W_REC_x_up[i] / W_MC_x_up[i])) + (W_REC_x_down[i] / (W_REC_x_down[i] / W_MC_x_down[i]))) / 0.5 / 0.732;
}
// costheta
// cout<<" X "<<endl;
for (int i = 0; i < 40; i++)
{
asimmetry_c[i] = (double)(costheta_data_x_up[i] - costheta_data_x_down[i]) / (costheta_data_x_up[i] + costheta_data_x_down[i]) / 0.5 / 0.732;
asimmetry_c_REC[i] = (double)(costheta_REC_x_up[i] - costheta_REC_x_down[i]) / (costheta_REC_x_up[i] + costheta_REC_x_down[i]) / 0.5 / 0.732;
asimmetry_c_MC[i] = (double)(costheta_MC_x_up[i] - costheta_MC_x_down[i]) / (costheta_MC_x_up[i] + costheta_MC_x_down[i]) / 0.5 / 0.732;
asimmetry_c_corr[i] = (double)((costheta_data_x_up[i] / (costheta_REC_x_up[i] / costheta_MC_x_up[i])) - (costheta_data_x_down[i] / (costheta_REC_x_down[i] / costheta_MC_x_down[i]))) / ((costheta_data_x_up[i] / (costheta_REC_x_up[i] / costheta_MC_x_up[i])) + (costheta_data_x_down[i] / (costheta_REC_x_down[i] / costheta_MC_x_down[i]))) / 0.5 / 0.732;
if (sigmaTRUE)
{
asimmetry_c[i] = asimmetry_c[i] / (-0.256);
asimmetry_c_REC[i] = asimmetry_c_REC[i] / (-0.256);
asimmetry_c_MC[i] = asimmetry_c_MC[i] / (-0.256);
asimmetry_c_corr[i] = asimmetry_c_corr[i] / (-0.256);
}
// cout<<Costheta_array[i]<<" "<<asimmetry_c_corr[i]<<endl;
asimmetry_c_REC_corr[i] = (double)((costheta_REC_x_up[i] / (costheta_REC_x_up[i] / costheta_MC_x_up[i])) - (costheta_REC_x_down[i] / (costheta_REC_x_down[i] / costheta_MC_x_down[i]))) / ((costheta_REC_x_up[i] / (costheta_REC_x_up[i] / costheta_MC_x_up[i])) + (costheta_REC_x_down[i] / (costheta_REC_x_down[i] / costheta_MC_x_down[i]))) / 0.5 / 0.732;
}
return 0;
}
Export Q2_Pprime_induced_lambda.dat
%%writefile Q2_Pprime_induced_lambda.dat
0.35 49391.0 49835.0 63218.0 36014.0 55977.0 43244.0
0.45 50378.0 52763.0 62324.0 40817.0 56464.0 46672.0
0.55 41502.0 43508.0 49658.0 35352.0 46928.0 38084.0
0.65 35589.0 36129.0 40296.0 31422.0 39731.0 31986.0
0.75 29954.0 30434.0 33164.0 27224.0 33625.0 26767.0
0.85 25867.0 25308.0 27457.0 23718.0 28433.0 22748.0
0.95 22427.0 21824.0 23540.0 20711.0 24122.0 20129.0
1.05 19383.0 18378.0 19851.0 17910.0 20725.0 17039.0
1.15 16912.0 15732.0 16932.0 15712.0 17650.0 14990.0
1.25 14484.0 13362.0 14438.0 13408.0 14933.0 12910.0
1.35 12188.0 11187.0 11934.0 11441.0 12549.0 10820.0
1.45 10687.0 9431.0 10426.0 9692.0 10683.0 9430.0
1.6 16556.0 14798.0 16098.0 15256.0 16326.0 15022.0
1.8 11868.0 10672.0 11498.0 11042.0 11629.0 10914.0
2.0 8684.0 7909.0 8442.0 8151.0 8402.0 8186.0
2.2 6269.0 5914.0 6274.0 5909.0 5962.0 6217.0
2.4 4695.0 4307.0 4687.0 4315.0 4462.0 4538.0
2.65 4991.0 4632.0 5021.0 4601.0 4752.0 4869.0
2.95 3557.0 3443.0 3682.0 3312.0 3416.0 3580.0
3.3 2975.0 3006.0 3187.0 2798.0 2929.0 3051.0
Writing Q2_Pprime_induced_lambda.dat
Export W_Pprime_induced_lambda.dat
%%writefile W_Pprime_induced_lambda.dat
1.6 0.0 0.0 0.0 0.0 0.0 0.0
1.625 4855.0 5049.0 3823.0 6081.0 5328.0 4576.0
1.65 10189.0 10932.0 8259.0 12862.0 11067.0 10054.0
1.675 15613.0 16210.0 13081.0 18742.0 16678.0 15145.0
1.7 18480.0 19120.0 16622.0 20978.0 19850.0 17750.0
1.725 19590.0 19647.0 18161.0 21076.0 20726.0 18511.0
1.75 19682.0 19876.0 19180.0 20378.0 21018.0 18540.0
1.775 19454.0 19083.0 18936.0 19601.0 20498.0 18039.0
1.8 18973.0 18762.0 19588.0 18147.0 19952.0 17783.0
1.825 18984.0 18478.0 19977.0 17485.0 20179.0 17283.0
1.85 18632.0 18529.0 20527.0 16634.0 20267.0 16894.0
1.875 18094.0 17985.0 20487.0 15592.0 19420.0 16659.0
1.9 17270.0 16688.0 19815.0 14143.0 18577.0 15381.0
1.925 16786.0 16329.0 19691.0 13424.0 18141.0 14974.0
1.95 15707.0 15187.0 18607.0 12287.0 16776.0 14118.0
1.975 14491.0 13930.0 17390.0 11039.0 15617.0 12812.0
2.0 13029.0 12730.0 15942.0 9817.0 13988.0 11771.0
2.025 12014.0 11533.0 14578.0 8972.0 12708.0 10839.0
2.05 11278.0 10793.0 13730.0 8341.0 12162.0 9909.0
2.075 10520.0 10113.0 12879.0 7754.0 11308.0 9325.0
2.1 10030.0 9638.0 12445.0 7223.0 10821.0 8847.0
2.125 9543.0 9149.0 11885.0 6807.0 10140.0 8552.0
2.15 9028.0 8812.0 11514.0 6326.0 9865.0 7975.0
2.175 8811.0 8375.0 11146.0 6040.0 9583.0 7603.0
2.2 8384.0 8126.0 10627.0 5883.0 9272.0 7238.0
2.225 7860.0 7720.0 10209.0 5373.0 8782.0 6798.0
2.25 7559.0 7183.0 9678.0 5061.0 8348.0 6391.0
2.275 7019.0 6892.0 9186.0 4725.0 7895.0 6016.0
2.3 6682.0 6485.0 8773.0 4394.0 7662.0 5505.0
2.325 6409.0 6206.0 8475.0 4135.0 7468.0 5142.0
2.35 6135.0 5940.0 8073.0 4002.0 7231.0 4844.0
2.375 5754.0 5619.0 7689.0 3684.0 6836.0 4537.0
Writing W_Pprime_induced_lambda.dat
Export costheta_Pprime_induced_lambda.dat
%%writefile costheta_Pprime_induced_lambda.dat
-1.0 178.0 133.0 172.0 139.0 169.0 142.0
-0.95 3179.0 2508.0 2985.0 2702.0 3150.0 2537.0
-0.9 6546.0 5689.0 6422.0 5813.0 6781.0 5454.0
-0.85 8272.0 7352.0 8377.0 7247.0 8673.0 6951.0
-0.8 8782.0 8166.0 9271.0 7677.0 9439.0 7509.0
-0.75 8825.0 8442.0 9187.0 8080.0 9644.0 7623.0
-0.7 8694.0 8124.0 8891.0 7927.0 9396.0 7422.0
-0.65 8370.0 7886.0 8611.0 7645.0 9212.0 7044.0
-0.6 8126.0 8002.0 8292.0 7836.0 9079.0 7049.0
-0.55 7727.0 7718.0 7870.0 7575.0 8625.0 6820.0
-0.5 7679.0 7444.0 7528.0 7595.0 8448.0 6675.0
-0.45 7493.0 7535.0 7519.0 7509.0 8414.0 6614.0
-0.4 7280.0 7353.0 7276.0 7357.0 8184.0 6449.0
-0.35 7629.0 7346.0 7416.0 7559.0 8400.0 6575.0
-0.3 7769.0 7268.0 7597.0 7440.0 8386.0 6651.0
-0.25 7494.0 7514.0 7614.0 7386.0 8259.0 6744.0
-0.2 7845.0 7611.0 7908.0 7548.0 8550.0 6906.0
-0.15 8041.0 7760.0 8228.0 7573.0 8709.0 7092.0
-0.1 8169.0 7730.0 8312.0 7587.0 8647.0 7252.0
-0.05 8608.0 8114.0 8931.0 7791.0 9013.0 7709.0
0.0 8884.0 8326.0 9311.0 7899.0 9300.0 7910.0
0.05 9047.0 8608.0 9696.0 7959.0 9493.0 8162.0
0.1 9529.0 8846.0 10205.0 8170.0 9942.0 8433.0
0.15 9985.0 9324.0 11069.0 8240.0 10416.0 8893.0
0.2 10352.0 9663.0 11291.0 8724.0 10763.0 9252.0
0.25 10751.0 10350.0 12116.0 8985.0 11541.0 9564.0
0.3 11638.0 10731.0 13148.0 9221.0 12290.0 10079.0
0.35 12642.0 11637.0 14356.0 9924.0 13291.0 10989.0
0.4 13602.0 12684.0 15461.0 10825.0 14061.0 12225.0
0.45 14507.0 13506.0 16700.0 11313.0 14946.0 13067.0
0.5 15362.0 14488.0 17820.0 12030.0 15853.0 13997.0
0.55 16192.0 15142.0 18726.0 12608.0 16447.0 14887.0
0.6 16810.0 15909.0 19681.0 13038.0 17212.0 15507.0
0.65 16862.0 16756.0 20049.0 13569.0 17617.0 16001.0
0.7 16387.0 17105.0 20050.0 13442.0 17758.0 15734.0
0.75 14724.0 16946.0 18824.0 12849.0 16877.0 14796.0
0.8 12723.0 15731.0 16742.0 11712.0 15689.0 12765.0
0.85 10283.0 12417.0 13211.0 9489.0 12898.0 9802.0
0.9 7385.0 8562.0 9391.0 6556.0 8887.0 7060.0
0.95 3985.0 6143.0 5861.0 4267.0 5254.0 4874.0
Writing costheta_Pprime_induced_lambda.dat
Export genKY_Q2_Pprime_induced_MC_lambda.dat
%%writefile genKY_Q2_Pprime_induced_MC_lambda.dat
0.35 1863962.0 1865507.0 1864599.0 1864870.0 1863719.0 1865750.0
0.45 1218452.0 1219060.0 1220372.0 1217140.0 1217272.0 1220240.0
0.55 842798.0 841381.0 841639.0 842540.0 840717.0 843462.0
0.65 603115.0 604017.0 603776.0 603356.0 602919.0 604213.0
0.75 441288.0 441672.0 442323.0 440637.0 441370.0 441590.0
0.85 327969.0 328560.0 328625.0 327904.0 327282.0 329247.0
0.95 247179.0 247374.0 246989.0 247564.0 246740.0 247813.0
1.05 192300.0 191818.0 192492.0 191626.0 191820.0 192295.0
1.15 153950.0 154163.0 153753.0 154360.0 154141.0 153972.0
1.25 125076.0 124586.0 125022.0 124640.0 124491.0 125171.0
1.35 102245.0 102239.0 102386.0 102101.0 101972.0 102515.0
1.45 82819.0 83015.0 82960.0 82874.0 82659.0 83175.0
1.6 125489.0 125172.0 125505.0 125156.0 125096.0 125565.0
1.8 87998.0 88111.0 87973.0 88136.0 88012.0 88097.0
2.0 62106.0 62762.0 62424.0 62444.0 62417.0 62451.0
2.2 46843.0 46580.0 46635.0 46792.0 46373.0 47055.0
2.4 36365.0 36093.0 36224.0 36234.0 36174.0 36284.0
2.65 39675.0 39597.0 39535.0 39737.0 39815.0 39457.0
2.95 25986.0 26006.0 26050.0 25942.0 26096.0 25896.0
3.3 21302.0 21518.0 21323.0 21497.0 21497.0 21323.0
Writing genKY_Q2_Pprime_induced_MC_lambda.dat
Export genKY_W_Pprime_induced_MC_lambda.dat
%%writefile genKY_W_Pprime_induced_MC_lambda.dat
1.6 53553.0 53399.0 53704.0 53248.0 53563.0 53389.0
1.625 236234.0 237029.0 237046.0 236217.0 236304.0 236959.0
1.65 345012.0 346312.0 345748.0 345576.0 345661.0 345663.0
1.675 411303.0 411398.0 411780.0 410921.0 410981.0 411720.0
1.7 459383.0 458085.0 458370.0 459098.0 457809.0 459659.0
1.725 459923.0 461563.0 460606.0 460880.0 461502.0 459984.0
1.75 429648.0 429534.0 429022.0 430160.0 429925.0 429257.0
1.775 395458.0 395334.0 396154.0 394638.0 395113.0 395679.0
1.8 373248.0 372068.0 372842.0 372474.0 372372.0 372944.0
1.825 347288.0 348578.0 346860.0 349006.0 347219.0 348647.0
1.85 330261.0 330899.0 331261.0 329899.0 330034.0 331126.0
1.875 308534.0 308233.0 309187.0 307580.0 307782.0 308985.0
1.9 279261.0 279909.0 279822.0 279348.0 278884.0 280286.0
1.925 251984.0 251903.0 251722.0 252163.0 251788.0 252103.0
1.95 225008.0 225155.0 225462.0 224701.0 224674.0 225489.0
1.975 199621.0 198957.0 199110.0 199468.0 198658.0 199920.0
2.0 180367.0 180218.0 180333.0 180252.0 179595.0 180990.0
2.025 165498.0 164941.0 165496.0 164943.0 165082.0 165357.0
2.05 150487.0 150656.0 150827.0 150316.0 150286.0 150857.0
2.075 140668.0 141196.0 141025.0 140839.0 140504.0 141360.0
2.1 124633.0 124980.0 124769.0 124844.0 124674.0 124939.0
2.125 112135.0 112162.0 112485.0 111816.0 111609.0 112695.0
2.15 98838.0 98495.0 98811.0 98522.0 98875.0 98458.0
2.175 91619.0 92002.0 91645.0 91976.0 91792.0 91829.0
2.2 83006.0 82966.0 83009.0 82963.0 82346.0 83626.0
2.225 72044.0 72119.0 72164.0 71999.0 72306.0 71857.0
2.25 69688.0 68899.0 69295.0 69292.0 69323.0 69264.0
2.275 62148.0 62022.0 61975.0 62195.0 61734.0 62436.0
2.3 54394.0 54701.0 54546.0 54549.0 54364.0 54731.0
2.325 48506.0 48133.0 48177.0 48462.0 48272.0 48367.0
2.35 47521.0 47853.0 47670.0 47704.0 47947.0 47427.0
2.375 39646.0 39528.0 39679.0 39495.0 39604.0 39570.0
Writing genKY_W_Pprime_induced_MC_lambda.dat
Export genKY_costheta_Pprime_induced_MC_lambda.dat
%%writefile genKY_costheta_Pprime_induced_MC_lambda.dat
-1.0 80901.0 80953.0 80790.0 81064.0 80632.0 81222.0
-0.95 81494.0 81378.0 81596.0 81276.0 81209.0 81663.0
-0.9 80393.0 80351.0 80463.0 80281.0 80494.0 80250.0
-0.85 81107.0 80807.0 80945.0 80969.0 80848.0 81066.0
-0.8 79462.0 80051.0 79843.0 79672.0 79585.0 79930.0
-0.75 78770.0 78596.0 78541.0 78825.0 78734.0 78632.0
-0.7 77759.0 78095.0 77945.0 77909.0 77666.0 78188.0
-0.65 77755.0 77919.0 78055.0 77619.0 77843.0 77831.0
-0.6 77426.0 78169.0 77757.0 77838.0 77651.0 77944.0
-0.55 80349.0 79962.0 80141.0 80170.0 80131.0 80180.0
-0.5 82378.0 82723.0 82460.0 82641.0 82362.0 82739.0
-0.45 84695.0 84213.0 84655.0 84253.0 84522.0 84386.0
-0.4 87272.0 86873.0 87159.0 86988.0 86893.0 87254.0
-0.35 89226.0 89063.0 89471.0 88818.0 89271.0 89018.0
-0.3 91387.0 91750.0 91591.0 91546.0 91598.0 91539.0
-0.25 96422.0 95873.0 96583.0 95712.0 96146.0 96149.0
-0.2 101615.0 101975.0 101861.0 101729.0 101308.0 102282.0
-0.15 108779.0 108552.0 108511.0 108820.0 108621.0 108710.0
-0.1 114342.0 114968.0 115135.0 114182.0 114697.0 114620.0
-0.05 120626.0 121118.0 120548.0 121196.0 120734.0 121010.0
0.0 128197.0 128077.0 128058.0 128216.0 127781.0 128493.0
0.05 136448.0 136244.0 136263.0 136429.0 135958.0 136734.0
0.1 145009.0 146144.0 145714.0 145439.0 145032.0 146121.0
0.15 153015.0 153619.0 152957.0 153677.0 152983.0 153651.0
0.2 162573.0 161734.0 162099.0 162208.0 161841.0 162466.0
0.25 170881.0 170990.0 171166.0 170705.0 170693.0 171178.0
0.3 178977.0 178427.0 178793.0 178611.0 178885.0 178519.0
0.35 190662.0 190513.0 190505.0 190670.0 189806.0 191369.0
0.4 202778.0 202860.0 202869.0 202769.0 202610.0 203028.0
0.45 217777.0 217947.0 217804.0 217920.0 217558.0 218166.0
0.5 231285.0 231028.0 231633.0 230680.0 230717.0 231596.0
0.55 245478.0 246078.0 245666.0 245890.0 245535.0 246021.0
0.6 261776.0 261523.0 260906.0 262393.0 261937.0 261362.0
0.65 282421.0 282033.0 282797.0 281657.0 282040.0 282414.0
0.7 308573.0 308575.0 309271.0 307877.0 308392.0 308756.0
0.75 335570.0 335600.0 336456.0 334714.0 334939.0 336231.0
0.8 358963.0 359257.0 359570.0 358650.0 359078.0 359142.0
0.85 380437.0 380698.0 380567.0 380568.0 380515.0 380620.0
0.9 391571.0 392162.0 390631.0 393102.0 391476.0 392257.0
0.95 392360.0 392333.0 392826.0 391867.0 391861.0 392832.0
Writing genKY_costheta_Pprime_induced_MC_lambda.dat
Export Q2_Pprime_induced_REC_genKY_lambda.dat
%%writefile Q2_Pprime_induced_REC_genKY_lambda.dat
0.35 23386.0 23530.0 32654.0 14262.0 24667.0 22249.0
0.45 22117.0 23162.0 30762.0 14517.0 23800.0 21479.0
0.55 17761.0 18774.0 23923.0 12612.0 19386.0 17149.0
0.65 14617.0 15427.0 19238.0 10806.0 16118.0 13926.0
0.75 11962.0 12550.0 15512.0 9000.0 13334.0 11178.0
0.85 9968.0 10250.0 12576.0 7642.0 10824.0 9398.0
0.95 8363.0 8247.0 10228.0 6387.0 8931.0 7684.0
1.05 7071.0 6844.0 8460.0 5455.0 7434.0 6480.0
1.15 6308.0 5956.0 7549.0 4715.0 6482.0 5782.0
1.25 5327.0 4821.0 6144.0 4004.0 5394.0 4754.0
1.35 4455.0 4244.0 5162.0 3537.0 4574.0 4125.0
1.45 3713.0 3617.0 4385.0 2951.0 3849.0 3487.0
1.6 5909.0 5444.0 6663.0 4684.0 5828.0 5525.0
1.8 4319.0 3965.0 4893.0 3393.0 4148.0 4136.0
2.0 3183.0 3006.0 3646.0 2543.0 3084.0 3105.0
2.2 2340.0 2209.0 2706.0 1843.0 2226.0 2323.0
2.4 1765.0 1709.0 2027.0 1447.0 1677.0 1797.0
2.65 1845.0 1866.0 2254.0 1457.0 1775.0 1936.0
2.95 1139.0 1158.0 1341.0 956.0 1119.0 1178.0
3.3 913.0 929.0 1081.0 761.0 889.0 953.0
Writing Q2_Pprime_induced_REC_genKY_lambda.dat
Export W_Pprime_induced_REC_genKY_lambda.dat
%%writefile W_Pprime_induced_REC_genKY_lambda.dat
1.6 0.0 0.0 0.0 0.0 0.0 0.0
1.625 1742.0 2046.0 1477.0 2311.0 2042.0 1746.0
1.65 3911.0 4577.0 3653.0 4835.0 4611.0 3877.0
1.675 5542.0 6442.0 5712.0 6272.0 6179.0 5805.0
1.7 6889.0 7837.0 7560.0 7166.0 7526.0 7200.0
1.725 8105.0 8622.0 9217.0 7510.0 8439.0 8288.0
1.75 8425.0 8799.0 9722.0 7501.0 8882.0 8341.0
1.775 8288.0 8564.0 9979.0 6873.0 8659.0 8193.0
1.8 8327.0 8426.0 10218.0 6535.0 8624.0 8129.0
1.825 8219.0 8095.0 10196.0 6118.0 8503.0 7811.0
1.85 8147.0 7977.0 10422.0 5702.0 8447.0 7677.0
1.875 7947.0 7991.0 10597.0 5341.0 8387.0 7551.0
1.9 7500.0 7429.0 9938.0 4991.0 7866.0 7063.0
1.925 7158.0 7099.0 9660.0 4597.0 7514.0 6743.0
1.95 6535.0 6536.0 8973.0 4097.0 6848.0 6222.0
1.975 6059.0 5986.0 8367.0 3678.0 6352.0 5693.0
2.0 5617.0 5311.0 7556.0 3372.0 5879.0 5049.0
2.025 5207.0 5053.0 7263.0 2997.0 5447.0 4813.0
2.05 4833.0 4541.0 6667.0 2707.0 4958.0 4416.0
2.075 4592.0 4411.0 6348.0 2655.0 4845.0 4158.0
2.1 4163.0 4071.0 5916.0 2318.0 4422.0 3812.0
2.125 3901.0 3777.0 5570.0 2108.0 4055.0 3627.0
2.15 3543.0 3424.0 5021.0 1946.0 3757.0 3210.0
2.175 3216.0 3182.0 4636.0 1762.0 3486.0 2912.0
2.2 3052.0 2898.0 4415.0 1534.0 3205.0 2745.0
2.225 2718.0 2556.0 3866.0 1408.0 2884.0 2390.0
2.25 2641.0 2373.0 3698.0 1316.0 2728.0 2286.0
2.275 2333.0 2294.0 3440.0 1187.0 2489.0 2138.0
2.3 2072.0 1972.0 2964.0 1080.0 2271.0 1773.0
2.325 1946.0 1809.0 2798.0 957.0 2083.0 1672.0
2.35 1912.0 1789.0 2718.0 983.0 2078.0 1623.0
2.375 1640.0 1507.0 2386.0 761.0 1792.0 1355.0
Writing W_Pprime_induced_REC_genKY_lambda.dat
Export costheta_Pprime_induced_REC_genKY_lambda.dat
%%writefile costheta_Pprime_induced_REC_genKY_lambda.dat
-1.0 13.0 8.0 12.0 9.0 12.0 9.0
-0.95 457.0 383.0 489.0 351.0 407.0 433.0
-0.9 1441.0 1322.0 1578.0 1184.0 1360.0 1402.0
-0.85 2229.0 2148.0 2475.0 1902.0 2183.0 2194.0
-0.8 2755.0 2764.0 3259.0 2260.0 2799.0 2720.0
-0.75 3062.0 3182.0 3721.0 2523.0 3179.0 3065.0
-0.7 3194.0 3341.0 3968.0 2567.0 3368.0 3167.0
-0.65 3215.0 3462.0 4039.0 2638.0 3491.0 3186.0
-0.6 3218.0 3382.0 3969.0 2629.0 3443.0 3155.0
-0.55 3264.0 3512.0 4031.0 2745.0 3505.0 3271.0
-0.5 3128.0 3489.0 4034.0 2583.0 3489.0 3128.0
-0.45 3304.0 3539.0 4132.0 2711.0 3646.0 3197.0
-0.4 3192.0 3575.0 4122.0 2645.0 3572.0 3195.0
-0.35 3128.0 3498.0 4121.0 2505.0 3496.0 3130.0
-0.3 3097.0 3389.0 3943.0 2543.0 3436.0 3050.0
-0.25 3110.0 3384.0 3896.0 2598.0 3514.0 2980.0
-0.2 3408.0 3455.0 4268.0 2595.0 3669.0 3194.0
-0.15 3490.0 3434.0 4359.0 2565.0 3786.0 3138.0
-0.1 3691.0 3651.0 4551.0 2791.0 3946.0 3396.0
-0.05 3743.0 3732.0 4791.0 2682.0 4000.0 3473.0
0.0 4021.0 3813.0 5043.0 2791.0 4126.0 3708.0
0.05 4203.0 4011.0 5326.0 2888.0 4397.0 3817.0
0.1 4432.0 4101.0 5462.0 3071.0 4532.0 4001.0
0.15 4540.0 4298.0 5657.0 3181.0 4652.0 4186.0
0.2 4591.0 4238.0 5812.0 3017.0 4735.0 4094.0
0.25 4677.0 4482.0 6031.0 3128.0 4881.0 4278.0
0.3 4993.0 4512.0 6230.0 3275.0 5112.0 4393.0
0.35 5327.0 4798.0 6777.0 3348.0 5408.0 4717.0
0.4 5755.0 5171.0 7331.0 3595.0 5852.0 5074.0
0.45 5915.0 5316.0 7482.0 3751.0 5967.0 5264.0
0.5 6180.0 5535.0 7981.0 3734.0 6112.0 5603.0
0.55 6355.0 5896.0 8336.0 3915.0 6401.0 5850.0
0.6 6550.0 6005.0 8452.0 4103.0 6471.0 6084.0
0.65 6426.0 6131.0 8422.0 4135.0 6592.0 5965.0
0.7 6209.0 6266.0 8288.0 4187.0 6477.0 5998.0
0.75 5865.0 6434.0 8113.0 4186.0 6529.0 5770.0
0.8 5217.0 6139.0 7417.0 3939.0 5994.0 5362.0
0.85 4214.0 5051.0 5902.0 3357.0 4879.0 4386.0
0.9 3174.0 3975.0 4527.0 2622.0 3830.0 3319.0
0.95 1689.0 2891.0 2859.0 1721.0 2288.0 2292.0
Writing costheta_Pprime_induced_REC_genKY_lambda.dat
!ls -l
%%bash
g++ lecture18.cpp -o lecture18
./lecture18
Show code cell source
import matplotlib.pyplot as plt
import numpy as np
x, y = np.loadtxt("example.txt", dtype="double", unpack=True)
plt.plot(x, y)
plt.title("Asimmetry vs. Q2")
plt.xlabel("Q2 [GeV2]")
plt.ylabel("Asimmetry")
plt.show()