Commit 4044641c authored by Matthieu Tristram's avatar Matthieu Tristram
Browse files

Merge branch 'dev-cib' of into dev-cib

parents 4a88192c ba3e436c
// Standard library
#include <string>
#include <vector>
// Utilities
#include "utils.h"
namespace cib {
const double KC = 1.0e-10; // Kennicutt constant for Chabroer IMF
const double fsub = 0.134;
const double Mpc_to_m = 3.086e22; // Mpc to m
const double sig_T = 6.6524587158e-29; // m^2 Thomson cross section
const double m_e = 9.10938356e-31; // kg electron mass
const double c_light = 299792458.0; // m/s light speed
const double h_p = 6.62607004e-34;
const double k_B = 1.38064852e-23;
const double Msun = 1.98847e30; //in kg
class cosmology {
cosmology( ClassEngine * klass,
const cib::array1d & z_);
double H0;
double Om0;
double Ode0;
double rho0;
cib::array1d redshift;
cib::array1d comoving_distances;
cib::array1d critical_densities;
cib::array1d Ob;
cib::array1d Om;
cib::array1d Ez;
cib::array1d dchidz;
cib::array1d dVcdz;
double Tcmb;
//useless ?
// const double Oc0;
// const double Ob0;
// const double Ogamma0;
// const double Onu0;
// const double n;
// const double sigma8;
// const double tau;
// const double z_reion;
// const double t0;
// const double Tcmb0;
// const double Neff;
// const array1d m_nu;
void dump() const;
double dchi_dz(double z);
// Default constructor can not instantiated
class cl_cib_tsz_cross {
// Constructor
cl_cib_tsz_cross(const cib::array2d & power_,
const cib::array1d & z_,
const cib::array1d & sig_z_arr_,
const cib::array1d & mh_,
const cib::array2d & hmfmz_,
const cib::array2d & snu_eff_,
const cib::array1d & ell_,
const cib::array3d & unfw_,
ClassEngine *klass,
const cib::array2d & biasmz_,
const double Meffmax_,
const double etamax_,
const double sigmaMh_,
const double tau_,
const cib::array1d & cc_,
const cib::array1d & fc_,
const std::string & law_,
const cib::array1d & nu_,
const cib::array2d & m500c_,
const double delta_h_tsz_,
const double B_,
const cib::array1d & x_
double slope_pk( const cib::array1d & lnpk, const cib::array1d & lnk);
void pkinterp_z_1( cib::array1d &z_class, cib::array1d &z, cib::array1d &kfin, cib::array1d &k_cls, cib::array2d &pk_cls, cib::array2d & Pk);
void karray( const cib::cosmology * cosmo, const cib::array1d & z, const cib::array1d & ell,
cib::array2d & k_array);
void pkinterp_k( const cib::array1d & ell, const cib::array1d & z, const cib::array2d & k_array,
const cib::array1d & k, const cib::array2d & Pk, cib::array2d & Pk_int);
void onehalo_int(cib::array3d & Cl_1h_) const;
void twohalo_int(cib::array3d & Cl_2h_) const;
void C_ell_1h(cib::array3d & cl_) const;
void C_ell_2h(cib::array3d & cl_) const;
void onehalo(cib::array3d & cl_) const;
void twohalo(cib::array3d & cl_) const;
void g_nu(cib::array1d & gnu_) const;
void y_ell(cib::array3d & y_ell_) const;
void C(cib::array2d & c_) const;
void P_e(cib::array3d & pe_) const;
void r_delta(cib::array2d & r_delta_) const;
void ell_delta(cib::array2d & ell_delta_) const;
void J_nu(cib::array3d & Jnu_) const;
void djsub_dlnMh(cib::array3d & dj_sub_) const;
void djc_dlnMh(cib::array3d & dj_cen_) const;
void sfr(const cib::array1d & mhalo_, cib::array2d & sfr_) const;
void sfr_mhdot(const cib::array1d & mhalo_, cib::array2d & sfr_mhdot_) const;
void Mdot(const cib::array1d & mhalo_, cib::array2d & mdot_) const;
void msub(const double mhalo_, cib::array1d & msub_) const;
void subhmf(const double mhalo_, const cib::array1d & ms_, cib::array1d & subhmf_) const;
void hmf(const cib::array1d & mass,
const cib::array1d & k, const cib::array2d & Pk,
cib::cosmology * cosmo, double delta_halo,
cib::array2d & hmf_) const;
void biasdm( const cib::array1d mass,
const cib::array1d & k, const cib::array2d & Pk,
cib::cosmology *cosmo, double delta_halo,
cib::array2d & bmz_) const;
// Default constructor can not instantiated
// Data members
// cib::array2d _kk_; // [ell][z]
cib::array2d _power_; // [ell][z]
cib::array1d _z_; // [z]
// double _z_c_;
cib::array1d _sig_z_arr_; // [z]
cib::array1d _mh_; // [mhalo]
cib::array2d _hmfmz_; // [mhalo][z]
cib::array2d _snu_eff_; // [nfreq][z]
cib::array1d _ell_; // [ell]
cib::array3d _unfw_; // [mhalo][ell][z]
cib::cosmology *_cosmo_;
cib::array2d _biasmz_; // [mhalo][z]
double _Meffmax_;
double _etamax_;
double _sigmaMh_;
// double _alpha_;
// double _delta_;
// double _beta_;
// double _tau_;
cib::array1d _cc_; // [nfreq]
cib::array1d _fc_; // [nfreq]
std::string _law_;
cib::array1d _sigpow_; // [z]
cib::array1d _nu_; // [nfreq]
size_t _nfreq_;
cib::array2d _m500c_; // [mhalo][z]
double _delta_h_tsz_;
double _B_;
cib::array1d _x_; // [?]
cib::array1d _dVcdz_; // [z]
cib::array1d _dchidz_;
double Kcmb_MJy[7] = {244.1, 371.74, 483.69, 287.45, 58.04, 2.27, 1.};
double mean_density0( ClassEngine & klass);
double mass_to_radius( double m, ClassEngine & klass);
double r_delta( double m, double z, ClassEngine & klass, double delta_h);
class Filter {
Filter( const cib::array1d & k,
const cib::array1d & Pk,
double z,
double rho_z, /* critical density at z */
double Omega_m_z,
double mean_density,
double delta_h);
double _delta_h_;
double _z_, _Omz_, _rhoz_;
double _mean_density0_;
cib::array1d _k_;
cib::array1d _Pk_;
double r_delta( double m) const;
double mass_to_radius( double m);
void W( const cib::array1d & rk, cib::array1d & wrk);
double sigma( double rad);
double nu_delta( double m);
double nu( double m);
void dw_dlnkr( cib::array1d rk, cib::array1d &dw);
double dlns2_dlnr( double rad);
double dlnr_dlnm();
double dlns2_dlnm( double rad);
double dlns_dlnm( double rad);
double delta_halo();
double fsigma( double rad);
double dn_dm( double m);
double dn_dlnm( double m);
double dn_dlogm( double m);
double n_eff( double rad);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment