cib_interface.h 1.32 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
#ifndef CIB_INTERFACE
#define CIB_INTERFACE

#include "Astro/utils.h"

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
    void initialize();

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

    /// Compute and retrieve Cls
    void compute_cls(cib::array3d & cls_) const;

  private:

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

    void _compute_sfr_(const cib::array1d & mhalo_, cib::array2d & sfr_) const;

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

  private:

    /// Initalized flag
    bool _initialized_;

    /// CIB parameter model
    cib_parameters _parameters_;

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

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

    /// Color corrections
    cib::array1d _cc_;

    /// Calibration factors
    cib::array1d _fc_;

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

    /// Redshift values
    cib::array1d _z_;
  };

} // end of namespace
#endif