//Renata Kopecna

#ifndef INTEGRALS_HH
#define INTEGRALS_HH

double integral_x_to_n(double x, int n);
double integrate_x_to_n(double a, double b, int n);

//this methods are helpful for the phi integration
//calculates int x^n * sin(x) dx
double integral_x_to_n_times_sin_x(double x, int n);
double integrate_x_to_n_times_sin_x(double a, double b, int n);

//calculates int x^n * cos(x) dx
double integral_x_to_n_times_cos_x(double x, int n);
double integrate_x_to_n_times_cos_x(double a, double b, int n);

//calculates int x^n * sin(2x) dx
double integral_x_to_n_times_sin_2x(double x, int n);
double integrate_x_to_n_times_sin_2x(double a, double b, int n);

//calculates int x^n * cos(2x) dx
double integral_x_to_n_times_cos_2x(double x, int n);
double integrate_x_to_n_times_cos_2x(double a, double b, int n);

//calculates int x^n * cos(x)^2 dx
double integral_x_to_n_times_cos_x_2(double x, int n);

//calculates int x^n * sin(x)^2 dx
double integral_x_to_n_times_sin_x_2(double x, int n);

//calculates int x^n * asin(x) dx
double integral_x_to_n_times_asin_x(double x, int n);
//calculates int x^n * sqrt(1-x^2) dx
double integral_x_to_n_times_sqrt_1_minus_x2(double x, int n);

double integrate_x_to_n_times_sqrt_1_minus_x2(double a, double b, int n);

double integral_chebyshev(double x, int n);
double integrate_gauss(double sigma, double mean, double min, double max);

double integrate_crystalball(double mean, double sigma, double alpha, double n, double min, double max);

double integrate_twotailedcrystalball(double mean, double sigma, double alpha1, double alpha2, double n1, double n2, double min, double max);

double integral_x_to_n_times_exp_minus_x(double x, double tau, int n);
//THESE FUNCTIONS NEED TO BE CHECKED
//i correspons to ctl, j to ctk and k to phi
double integral_f1(double ctl, double ctk, double phi, int n_ctl, int n_ctk, int n_phi);
double integrate_f1(double ctl_a, double ctl_b, double ctk_a, double ctk_b, double phi_a, double phi_b, int n_ctl, int n_ctk, int n_phi);

double integral_f2(double ctl, double ctk, double phi, int n_ctl, int n_ctk, int n_phi);
double integrate_f2(double ctl_a, double ctl_b, double ctk_a, double ctk_b, double phi_a, double phi_b, int n_ctl, int n_ctk, int n_phi);

double integral_f3(double ctl, double ctk, double phi, int n_ctl, int n_ctk, int n_phi);
double integrate_f3(double ctl_a, double ctl_b, double ctk_a, double ctk_b, double phi_a, double phi_b, int n_ctl, int n_ctk, int n_phi);

double integral_f4(double ctl, double ctk, double phi, int n_ctl, int n_ctk, int n_phi);
double integrate_f4(double ctl_a, double ctl_b, double ctk_a, double ctk_b, double phi_a, double phi_b, int n_ctl, int n_ctk, int n_phi);

double integral_f5(double ctl, double ctk, double phi, int n_ctl, int n_ctk, int n_phi);
double integrate_f5(double ctl_a, double ctl_b, double ctk_a, double ctk_b, double phi_a, double phi_b, int n_ctl, int n_ctk, int n_phi);

double integral_f6(double ctl, double ctk, double phi, int n_ctl, int n_ctk, int n_phi);
double integrate_f6(double ctl_a, double ctl_b, double ctk_a, double ctk_b, double phi_a, double phi_b, int n_ctl, int n_ctk, int n_phi);

double integral_f7(double ctl, double ctk, double phi, int n_ctl, int n_ctk, int n_phi);
double integrate_f7(double ctl_a, double ctl_b, double ctk_a, double ctk_b, double phi_a, double phi_b, int n_ctl, int n_ctk, int n_phi);

double integral_f8(double ctl, double ctk, double phi, int n_ctl, int n_ctk, int n_phi);
double integrate_f8(double ctl_a, double ctl_b, double ctk_a, double ctk_b, double phi_a, double phi_b, int n_ctl, int n_ctk, int n_phi);

double integral_f9(double ctl, double ctk, double phi, int n_ctl, int n_ctk, int n_phi);
double integrate_f9(double ctl_a, double ctl_b, double ctk_a, double ctk_b, double phi_a, double phi_b, int n_ctl, int n_ctk, int n_phi);

double integral_f10(double ctl, double ctk, double phi, int n_ctl, int n_ctk, int n_phi);
double integrate_f10(double ctl_a, double ctl_b, double ctk_a, double ctk_b, double phi_a, double phi_b, int n_ctl, int n_ctk, int n_phi);

double integral_f11(double ctl, double ctk, double phi, int n_ctl, int n_ctk, int n_phi);
double integrate_f11(double ctl_a, double ctl_b, double ctk_a, double ctk_b, double phi_a, double phi_b, int n_ctl, int n_ctk, int n_phi);

double integral_f12(double ctl, double ctk, double phi, int n_ctl, int n_ctk, int n_phi);
double integrate_f12(double ctl_a, double ctl_b, double ctk_a, double ctk_b, double phi_a, double phi_b, int n_ctl, int n_ctk, int n_phi);


///////////////////
//     sWave     //
///////////////////

double integral_s_f1(double ctl, double ctk, double phi, int n_ctl, int n_ctk, int n_phi);
double integrate_s_f1(double ctl_a, double ctl_b, double ctk_a, double ctk_b, double phi_a, double phi_b, int n_ctl, int n_ctk, int n_phi);

double integral_s_f2(double ctl, double ctk, double phi, int n_ctl, int n_ctk, int n_phi);
double integrate_s_f2(double ctl_a, double ctl_b, double ctk_a, double ctk_b, double phi_a, double phi_b, int n_ctl, int n_ctk, int n_phi);

double integral_s_f3(double ctl, double ctk, double phi, int n_ctl, int n_ctk, int n_phi);
double integrate_s_f3(double ctl_a, double ctl_b, double ctk_a, double ctk_b, double phi_a, double phi_b, int n_ctl, int n_ctk, int n_phi);

double integral_s_f4(double ctl, double ctk, double phi, int n_ctl, int n_ctk, int n_phi);
double integrate_s_f4(double ctl_a, double ctl_b, double ctk_a, double ctk_b, double phi_a, double phi_b, int n_ctl, int n_ctk, int n_phi);

double integral_s_f5(double ctl, double ctk, double phi, int n_ctl, int n_ctk, int n_phi);
double integrate_s_f5(double ctl_a, double ctl_b, double ctk_a, double ctk_b, double phi_a, double phi_b, int n_ctl, int n_ctk, int n_phi);

double integral_s_f6(double ctl, double ctk, double phi, int n_ctl, int n_ctk, int n_phi);
double integrate_s_f6(double ctl_a, double ctl_b, double ctk_a, double ctk_b, double phi_a, double phi_b, int n_ctl, int n_ctk, int n_phi);

#endif // INTEGRALS_HH
