CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
ModelFunction_ThreePointCorrelation_comoving_connected.cpp
Go to the documentation of this file.
1 /*******************************************************************
2  * Copyright (C) 2017 by Federico Marulli *
3  * federico.marulli3@unibo.it *
4  * *
5  * This program is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU General Public License as *
7  * published by the Free Software Foundation; either version 2 of *
8  * the License, or (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful,*
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public *
16  * License along with this program; if not, write to the Free *
17  * Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  *******************************************************************/
20 
38 
40 
41 using namespace std;
42 
43 using namespace cbl;
44 
45 
46 // ============================================================================================
47 
48 
49 std::vector<double> cbl::modelling::threept::zeta_RSD (const std::vector<double> theta, const std::shared_ptr<void> inputs, std::vector<double> &parameter)
50 {
51  // structure contaning the required input data
52  shared_ptr<STR_data_model_threept> pp = static_pointer_cast<STR_data_model_threept>(inputs);
53 
54  // input likelihood parameters
55 
56  // bias
57  double b1 = parameter[0];
58  double b2 = parameter[1];
59  double bt = parameter[2];
60 
61  //beta
62  double beta = parameter[3];
63 
64  vector<double> model = pp->cosmology->zeta_RSD (pp->r1, pp->r2, theta.size(), b1, b2, bt, beta, pp->rr, pp->kk, pp->Pk_matter, false, pp->max_ll, pp->use_k);
65  return model;
66  /*
67  double theta_binSize = 1./theta.size();
68 
69  vector<double> xx = cosmobl::linear_bin_vector(model.size(), 0., 1.);
70  cosmobl::glob::FuncGrid interp_zeta(xx, model, "Spline");
71 
72  vector<double> zeta(theta.size());
73 
74  for (size_t i=0; i<theta.size(); i++)
75  zeta[i] = interp_zeta.integrate_qag(double(i)*theta_binSize, double(i+1)*theta_binSize, 1.e-4)/theta_binSize;
76 
77  return zeta;
78  */
79  //return pp->cosmology->zeta_RSD (pp->r1, pp->r2, theta.size(), b1, b2, bt, beta, pp->rr, pp->kk, pp->Pk_matter, false, pp->max_ll, pp->use_k);
80 }
Functions to model the three-point correlation function.
Functions to model the connected three-point correlation function in comoving coordinates.
std::vector< double > zeta_RSD(const std::vector< double > theta, const std::shared_ptr< void > inputs, std::vector< double > &parameter)
model for the connected three-point correlation function
The global namespace of the CosmoBolognaLib
Definition: CAMB.h:38