CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
Bias_vector.cpp
1 /********************************************************************
2  * Copyright (C) 2010 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 
34 #include "Cosmology.h"
35 
36 using namespace std;
37 
38 using namespace cbl;
39 
40 
41 // =====================================================================================
42 
43 
44 vector<double> cbl::cosmology::Cosmology::bias_halo (const std::vector<double> Mass, const std::vector<double> Sigma, const double redshift, const std::string model_bias, const bool store_output, const std::string output_root, const std::string interpType, const double Delta, const double kk, const int norm, const double k_min, const double k_max, const double prec, const std::string method_SS, const std::string input_file, const bool is_parameter_file)
45 {
46  double D_N = DN(redshift);
47  vector<double> bias(Mass.size());
48  for (size_t i=0; i<Mass.size(); i++)
49  bias[i] = m_bias_halo_generator(Sigma[i], redshift, D_N, model_bias, Delta);
50 
51  if (m_fNL!=0)
52  for (size_t i=0; i<Mass.size(); i++)
53  bias[i] += bias_correction(kk, Mass[i], method_SS, store_output, output_root, interpType, norm, k_min, k_max, prec, input_file, is_parameter_file)*Sigma[i]*pow(bias[i]-1, 2); // check!!!
54 
55  return bias;
56 }
The class Cosmology.
double bias_halo(const double Mass, const double redshift, const std::string author, const std::string method_SS, const bool store_output=true, const std::string output_root="test", const std::string interpType="Linear", const double Delta=200., const double kk=-1., const int norm=-1, const double k_min=0.001, const double k_max=100., const double prec=1.e-2, const std::string input_file=par::defaultString, const bool is_parameter_file=true)
bias of dark matter haloes
Definition: Bias.cpp:44
double bias(const double Mmin, const double sigmalgM, const double M0, const double M1, const double alpha, const std::shared_ptr< void > inputs)
the mean galaxy bias
The global namespace of the CosmoBolognaLib
Definition: CAMB.h:38
T Mass(const T RR, const T Rho)
the mass of a sphere of a given radius and density
Definition: Func.h:1243
double Sigma(const std::vector< double > vect)
the standard deviation of a std::vector
Definition: Func.cpp:925