cib_interface.h 2.24 KB
Newer Older
1 2 3 4 5
#ifndef CIB_INTERFACE
#define CIB_INTERFACE

#include "Astro/utils.h"

6 7 8 9
// Forward declaration
class ClassEngine;


10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
namespace cib {

  struct cib_parameters {
    double Meffmax;
    double etamax;
    double sigmaMh;
    // double alpha;
    // double beta;
    // double delta;
    double tau;
  };

  class cib_interface {

  public:
    /// Constructor
    cib_interface();

    /// Destructor
    ~cib_interface();

    /// Initialize method
32
    void initialize(ClassEngine* klass_);
33 34 35 36 37

    /// Update CIB parameters
    void update(const cib::cib_parameters & parameters_);

    /// Compute and retrieve Cls
Xavier Garrido's avatar
Xavier Garrido committed
38 39 40
    void compute_cls(cib::array3d & cl_cib_,
                     cib::array3d & cl_tsz_,
                     cib::array3d & cl_cibxtsz_) const;
41 42 43 44 45 46

  private:

    /// Compute djc_dlnMh
    void _compute_djc_dlnMh_(cib::array3d & dj_cen_) const;

Xavier Garrido's avatar
Xavier Garrido committed
47 48
    void _compute_djsub_dlnMh_(cib::array3d & dj_sub_) const;

49 50 51 52
    void _compute_sfr_(const cib::array1d & mhalo_, cib::array2d & sfr_) const;

    void _compute_sfr_mhdot_(const cib::array1d & mhalo_, cib::array2d & sfr_mhdot_) const;

53 54
    void _compute_Mdot_(const cib::array1d & mhalo_, cib::array2d & sfr_mhdot_) const;

Xavier Garrido's avatar
Xavier Garrido committed
55 56 57 58
    void _compute_msub_(const double mhalo_, cib::array1d & msub_) const;

    void _compute_subhmf_(const double mhalo_, const cib::array1d & ms_, cib::array1d & subhmf_) const;

Xavier Garrido's avatar
Xavier Garrido committed
59
    void _compute_J_nu_(cib::array3d & Jnu_, const cib::array3d & dj_cen_, const cib::array3d & dj_sub_) const;
Xavier Garrido's avatar
Xavier Garrido committed
60

61 62 63 64 65
  private:

    /// Initalized flag
    bool _initialized_;

66 67 68
    /// Class engine
    ClassEngine * _klass_;

69 70 71 72 73 74 75 76 77 78 79
    /// CIB parameter model
    cib_parameters _parameters_;

    /// Frequencies
    cib::array1d _nu_;
    size_t _nfreq_;

    /// Multipole
    cib::array1d _ell_;
    size_t _nell_;

Xavier Garrido's avatar
Xavier Garrido committed
80 81 82
    // Pk
    cib::array2d _power_;

83 84 85 86 87 88 89 90 91 92 93
    /// Color corrections
    cib::array1d _cc_;

    /// Calibration factors
    cib::array1d _fc_;

    /// Mass of halo
    cib::array1d _mh_;

    /// Redshift values
    cib::array1d _z_;
94 95 96 97

    /// Comoving distances in Mpc
    cib::array1d _comoving_distances_;

Xavier Garrido's avatar
Xavier Garrido committed
98 99 100 101
    ///
    cib::array1d _dVcdz_;
    cib::array1d _dchidz_;

102 103 104
    /// ?
    cib::array2d _hmfmz_;
    cib::array2d _snu_eff_;
Xavier Garrido's avatar
Xavier Garrido committed
105
    cib::array3d _unfw_;
Xavier Garrido's avatar
Xavier Garrido committed
106
    cib::array2d _biasmz_;
107 108 109 110
  };

} // end of namespace
#endif