GLAMERDOC++
Gravitational Lensing Code Library
Loading...
Searching...
No Matches
powerCDMHM.h
1/*
2 * halo.h
3 *
4 * Created on: Oct 23, 2012
5 * Author: cgiocoli
6 *
7 * This class implement the non-linear power spectrum using the Halo Model
8 */
9
10#ifndef POWERCDMHM_H_
11#define POWERCDMHM_H_
12#include <math.h>
13#include <cosmo.h>
14#include <halo.h>
15#include <utilities.h>
16
17#ifdef ENABLE_GSL
18
19#include <gsl/gsl_errno.h>
20#include <gsl/gsl_integration.h>
21#include <gsl/gsl_sf.h>
22#include <gsl/gsl_math.h>
23#include <gsl/gsl_spline.h>
24#include <gsl/gsl_rng.h>
25
30class POWERCDMHM{
31 public:
32 POWERCDMHM(COSMOLOGY *co, double redshift, double minHalomass, double sigma=0.25,int cmRelation=0,double slope=-0.1);
33
34 double nonlinpowerCDMHM(double k);
35 double nonlinpowerCDMHM1Halo(double k);
36 double nonlinpowerCDMHM2Halo(double k);
37
38 double nonlinKAPPApowerCDMHM(double l, double zs);
39 double nonlinKAPPApowerCDMHM1Halo(double l, double zs);
40 double nonlinKAPPApowerCDMHM2Halo(double l, double zs);
41 double linKAPPApowerCDMHM(double l, double zs);
42 double nonlinfitKAPPApowerCDMHM(double l, double zs);
43 virtual ~POWERCDMHM ();
44
45 protected:
46 gsl_function intPk1,intPk2;
47 double Pklin,Pk1,Pk2;
48 double Pk20;
49 double weight (double z1, double z2);
50 double weight (double z0);
51
52 struct weightfnc{
53 std::vector<double> ai;
54 std::vector<double> wi;
55 };
56 weightfnc wgf; // weight function
57 void Initweight(double zs);
58 private:
59 float *xf,*wf;
60};
61#endif
62
63
64#endif /* POWERCDMHM_H_ */
65
66
67
68
The cosmology and all the functions required to calculated quantities based on the cosmology.
Definition cosmo.h:52