Commit 34097bd6 authored by Xavier Garrido's avatar Xavier Garrido
Browse files

move Class engine into update method

parent 0f17b1ec
......@@ -67,7 +67,7 @@ namespace cib {
_initialized_ = true;
}
void cib_interface::update(const cib::cib_parameters & parameters_, ClassEngine* klass_)
void cib_interface::update(const cib::cib_parameters & parameters_, MnClassEngine* klass_)
{
if (! _initialized_) {
throw std::logic_error("cib_interface::update: CIB model not initialized !");
......
......@@ -4,7 +4,7 @@
#include "Astro/utils.h"
// Forward declaration
class ClassEngine;
class MnClassEngine;
namespace cib {
......@@ -32,7 +32,7 @@ namespace cib {
void initialize();
/// Update CIB parameters
void update(const cib::cib_parameters & parameters_, ClassEngine* klass_);
void update(const cib::cib_parameters & parameters_, MnClassEngine* klass_);
/// Compute and retrieve Cls
void compute_cls(cib::array3d & cl_cib_,
......@@ -70,7 +70,7 @@ namespace cib {
bool _initialized_;
/// Class engine
ClassEngine * _klass_;
MnClassEngine * _klass_;
/// CIB parameter model
cib_parameters _parameters_;
......
......@@ -4,7 +4,8 @@
HillipopCIB::HillipopCIB(const string fileName) : Hillipop(fileName)
{
std::cout << "HillipopCIB::HillipopCIB: Entering..." << std::endl;
std::cout << "HillipopCIB::HillipopCIB: Initalize CIB model..." << std::endl;
_cib_.initialize();
}
HillipopCIB::~HillipopCIB()
......@@ -149,8 +150,16 @@ void HillipopCIB::computeResiduals(vector<double> ClCMB, vector<double>& nuisanc
// tSZ amplitude
if( _typeStatus[0]) Asz = nuisance[getIndex("Asz")];
// CIB amplitude
if( _typeStatus[0]) Acib = nuisance[getIndex("Acib")];
// CIB parameters
if( _typeStatus[0]) {
cib::cib_parameters params;
params.Meffmax = nuisance[getIndex("Meffmax")];
params.etamax = nuisance[getIndex("etamax")];
params.sigmaMh = nuisance[getIndex("sigmaMh")];
params.tau = nuisance[getIndex("tau_cib")];
// Update CIB model given new parameters
_cib_.update(params, klass);
}
// Dust amplitude
if( _typeStatus[0]) AdustTT = nuisance[getIndex("AdustTT")];
......
......@@ -2,6 +2,7 @@
#define HillipopCIB_hh
#include "CMB/Hillipop.hh"
#include "Astro/cib_interface.h"
class Engine;
......@@ -27,6 +28,8 @@ public:
// Compute residuals
void computeResiduals(vector<double> ClCMB, vector<double>& nuisance, bool fullRange, Engine * engine);
private:
cib::cib_interface _cib_;
};
#endif
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