50 shared_ptr<STR_data_HOD> pp = static_pointer_cast<STR_data_HOD>(inputs);
52 vector<double>
wp(rp.size(), 0);
54 #pragma omp parallel num_threads(omp_get_max_threads())
57 #pragma omp for schedule(static, 2)
58 for (
size_t i=0; i<
wp.size(); i++) {
60 auto integrand = [&] (
double rad) {
return func({rad}, inputs, parameter)[0]/sqrt(rad*rad-rp[i]*rp[i]); };
62 double r_out = sqrt(pow(rp[i], 2)+pow(pp->r_max_int, 2));
106 shared_ptr<STR_data_HOD> pp = static_pointer_cast<STR_data_HOD>(inputs);
108 vector<double>
wp(rp.size(), 0);
110 #pragma omp parallel num_threads(omp_get_max_threads())
113 #pragma omp for schedule(static, 2)
114 for (
size_t i=0; i<
wp.size(); i++) {
116 auto integrand = [&] (
double pi) {
return func(rp[i],
pi, inputs, parameter); };
Functions to model the projected two-point correlation function.
static const double pi
: the ratio of a circle's circumference to its diameter
std::vector< double > wp_from_xi_approx(FunctionVectorVectorPtrVectorRef func, const std::vector< double > rp, const std::shared_ptr< void > inputs, std::vector< double > ¶meter)
function used to compute the projected two-point correlation function
double xi_HOD_zspace(const double rp, const double pi, const std::shared_ptr< void > inputs, std::vector< double > ¶meter)
HOD model of the redshift-space monopole of the two-point correlation function.
std::vector< double > wp_HOD_approx(const std::vector< double > rp, const std::shared_ptr< void > inputs, std::vector< double > ¶meter)
HOD model of the projected two-point correlation function.
std::vector< double > xi_HOD(const std::vector< double > rad, const std::shared_ptr< void > inputs, std::vector< double > ¶meter)
HOD model of the monopole of the two-point correlation function.
std::vector< double > wp_2halo(const std::vector< double > rp, const std::shared_ptr< void > inputs, std::vector< double > ¶meter)
model for the 2-halo term of the projected two-point correlation function
std::vector< double > wp_1halo(const std::vector< double > rp, const std::shared_ptr< void > inputs, std::vector< double > ¶meter)
model for the 1-halo term of the projected two-point correlation function
double xi_2halo_zspace(const double rp, const double pi, const std::shared_ptr< void > inputs, std::vector< double > ¶meter)
model for the 2-halo term of the redshift-space monopole of the two-point correlation function
std::vector< double > wp_1halo_approx(const std::vector< double > rp, const std::shared_ptr< void > inputs, std::vector< double > ¶meter)
model for the 1-halo term of the projected two-point correlation function
double xi_1halo_zspace(const double rp, const double pi, const std::shared_ptr< void > inputs, std::vector< double > ¶meter)
model for the 1-halo term of the redshift-space monopole of the two-point correlation function
std::vector< double > wp_from_xi(FunctionDoubleDoubleDoublePtrVectorRef func, const std::vector< double > rp, const std::shared_ptr< void > inputs, std::vector< double > ¶meter)
function used to compute the projected two-point correlation function
std::vector< double > xi_2halo(const std::vector< double > rad, const std::shared_ptr< void > inputs, std::vector< double > ¶meter)
model for the 2-halo term of the monopole of the two-point correlation function
std::vector< double > wp_HOD(const std::vector< double > rp, const std::shared_ptr< void > inputs, std::vector< double > ¶meter)
HOD model of the projected two-point correlation function.
std::vector< double > wp_2halo_approx(const std::vector< double > rp, const std::shared_ptr< void > inputs, std::vector< double > ¶meter)
model for the 2-halo term of the projected two-point correlation function
std::vector< double > xi_1halo(const std::vector< double > rad, const std::shared_ptr< void > inputs, std::vector< double > ¶meter)
model for the 1-halo term of the monopole of the two-point correlation function
double GSL_integrate_qag(gsl_function Func, const double a, const double b, const double rel_err=1.e-3, const double abs_err=0, const int limit_size=1000, const int rule=6)
integral, computed using the GSL qag method
The global namespace of the CosmoBolognaLib
std::function< std::vector< double >std::vector< double >, std::shared_ptr< void >, std::vector< double > &)> FunctionVectorVectorPtrVectorRef
typedef of a function returning a vector with a vector, a pointer and a vector reference in input
std::function< double(double, double, std::shared_ptr< void >, std::vector< double > &)> FunctionDoubleDoubleDoublePtrVectorRef
typedef of a function returning a double with two double, a pointer and a vector reference in input
double wp(const double rp, const std::vector< double > rr, const std::vector< double > xi, const double r_max=100.)
the projected two-point correlation function