CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
Modelling_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 
39 using namespace std;
40 
41 using namespace cbl;
42 
43 
44 // ============================================================================================
45 
46 
48 {
49  // set the model parameters
50  const int nparameters = 4;
51 
52  vector<statistics::ParameterType> parameterType = {statistics::ParameterType::_Base_};
53 
54  vector<string> parameterName(nparameters);
55  parameterName[0] = "b1";
56  parameterName[1] = "b2";
57  parameterName[2] = "bt";
58  parameterName[3] = "beta";
59 
60  vector<statistics::PriorDistribution> priors = {b1_prior, b2_prior, bt_prior, beta_prior};
61 
62  // input data used to construct the model
63  auto inputs = make_shared<STR_data_model_threept>(m_data_model);
64 
65  //set the priors
66  m_set_prior(priors);
67 
68  // construct the model
69  m_model = make_shared<statistics::Model1D>(statistics::Model1D(&zeta_RSD, nparameters, parameterType, parameterName, inputs));
70 }
The class Modelling_ThreePointCorrelation_comoving_connected.
void set_model_RSD(const statistics::PriorDistribution b1_prior, const statistics::PriorDistribution b2_prior, const statistics::PriorDistribution bt_prior, const statistics::PriorDistribution beta_prior)
model the redshift-space three-point correlation function (see Slepian&Eisenstein 2017)
The class Model1D.
Definition: Model1D.h:60
The class PriorDistribution.
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