Commit 5d370ad3 authored by Plaszczynski Stephane's avatar Plaszczynski Stephane
Browse files

rename Parameters as Variables

parent ebe31038
......@@ -21,7 +21,7 @@ using namespace std;
//constructor
BAO2D_chi2::BAO2D_chi2(const string& fileBAO, const Parameters& par, Engine* klass ):Chi2Data(par,klass)
BAO2D_chi2::BAO2D_chi2(const string& fileBAO, const Variables& par, Engine* klass ):Chi2Data(par,klass)
{
Chi2Data::_name=basename(const_cast<char*>(fileBAO.c_str()));
//need it to fill _data, _cov_matrix, _z;
......@@ -115,7 +115,7 @@ void BAO2D_chi2::read_par_file(const string fileName)
cout <<" _data= " << _data << endl;
cout << "_z= " << _z << endl;
cout << " - Parameters all decoded - " <<endl;
cout << " - Variables all decoded - " <<endl;
}
......
......@@ -3,7 +3,7 @@
#include "Chi2Data.hh"
#include "Engine.hh"
#include "Parameters.hh"
#include "Variables.hh"
#include "CLHEP/Matrix/Vector.h"
#include "CLHEP/Matrix/Matrix.h"
......@@ -22,7 +22,7 @@ public:
//constructors
//should take in input BAO.par and fill the Matrix and vectors with it
BAO2D_chi2(const std::string& fileBAO, const Parameters& par, Engine * klass);
BAO2D_chi2(const std::string& fileBAO, const Variables& par, Engine * klass);
//toy constructor
BAO2D_chi2(const std::string fileBAO);
......
......@@ -18,7 +18,7 @@ using namespace std;
//constructor
//should take in input BAO.par and fill the Matrix and vectors with it
BAO_chi2::BAO_chi2(const string& fileBAO, const Parameters& par, Engine* klass ):Chi2Data(par,klass)
BAO_chi2::BAO_chi2(const string& fileBAO, const Variables& par, Engine* klass ):Chi2Data(par,klass)
{
Chi2Data::_name=basename(const_cast<char*>(fileBAO.c_str()));
......
......@@ -6,7 +6,7 @@
#include "Chi2Data.hh"
#include "Engine.hh"
#include "Parameters.hh"
#include "Variables.hh"
#include "CLHEP/Matrix/Vector.h"
#include "CLHEP/Matrix/Matrix.h"
......@@ -21,7 +21,7 @@ class BAO_chi2 : public Chi2Data
public:
//constructors
BAO_chi2(const std::string& fileBAO, const Parameters& par, Engine * klass);
BAO_chi2(const std::string& fileBAO, const Variables& par, Engine * klass);
// destructor
......
......@@ -34,7 +34,7 @@ using namespace std;
// Constructors --
//----------------
Chi2CMB::Chi2CMB(std::vector<ClLikelihood*>& mylik, Engine* klass,const Parameters& p):Chi2Data(p,klass),vlik(mylik),verbose(false),_lmax(-1)
Chi2CMB::Chi2CMB(std::vector<ClLikelihood*>& mylik, Engine* klass,const Variables& p):Chi2Data(p,klass),vlik(mylik),verbose(false),_lmax(-1)
{
Chi2Data::_name="CMB_all";
//max des max
......@@ -45,7 +45,7 @@ Chi2CMB::Chi2CMB(std::vector<ClLikelihood*>& mylik, Engine* klass,const Paramete
buildIndex();
}
Chi2CMB::Chi2CMB(const Parameters& p):Chi2Data(p),verbose(false),_lmax(-1){
Chi2CMB::Chi2CMB(const Variables& p):Chi2Data(p),verbose(false),_lmax(-1){
Chi2Data::_name="CMB_all";
}
......
......@@ -30,11 +30,11 @@ class Chi2CMB : public Chi2Data
public:
//constructors
Chi2CMB(std::vector<ClLikelihood*>& _mylik, Engine* _klass,const Parameters& params);
Chi2CMB(std::vector<ClLikelihood*>& _mylik, Engine* _klass,const Variables& params);
//better : use the dynamic add method afterwards
Chi2CMB(const Parameters& params);
Chi2CMB(const Variables& params);
// destructor
~Chi2CMB();
......
......@@ -79,7 +79,7 @@ void HiLLiPOP_3d::Init(const string fileName)
ProcessXSpectraErrors(pathToXSpectraErrors);
ProcessNuisanceParameters(SZFile,pathToCIBSpectra,pathToDustSpectra,kSZFile,pathToSZxCIBSpectra);
ProcessNuisanceVariables(SZFile,pathToCIBSpectra,pathToDustSpectra,kSZFile,pathToSZxCIBSpectra);
ProcessCovMatrix(pathToCovMatrix);
}
......@@ -433,7 +433,7 @@ void HiLLiPOP_3d::ProcessCovMatrix(const string pathToCovMatrix)
}
void HiLLiPOP_3d::ProcessNuisanceParameters(const string SZFile,const string pathToCIBSpectra,const string pathToDustSpectra,const string kSZFile,const string pathToSZxCIBSpectra)
void HiLLiPOP_3d::ProcessNuisanceVariables(const string SZFile,const string pathToCIBSpectra,const string pathToDustSpectra,const string kSZFile,const string pathToSZxCIBSpectra)
{
string gFreqPlanckHFI[] = {"100","143","217","353","545","857"};
......
......@@ -83,7 +83,7 @@ private:
void ProcessCovMatrix(const std::string pathToMatrix);
// Process the nuisance parameters
void ProcessNuisanceParameters(const std::string SZFile,const std::string pathToCIBSpectra,const std::string pathToDustSpectra,const std::string kSZFile,const std::string pathToSZxCIBSpectra);
void ProcessNuisanceVariables(const std::string SZFile,const std::string pathToCIBSpectra,const std::string pathToDustSpectra,const std::string kSZFile,const std::string pathToSZxCIBSpectra);
// Output file with all the relevant information
void WriteOutput(const std::vector<double>& ClCMB,const std::vector<double>& nuisance);
......
......@@ -23,7 +23,7 @@ DataSet::DataSet()
Lollipop::Lollipop(const string fileName)
{
// Parameters
// Variables
planck_assert(file_present(fileName),string("missing file : ")+fileName);
Init(fileName);
_name = "Lollipop";
......
......@@ -28,7 +28,7 @@ using namespace std;
//---------------
// Constructors --
//----------------
Chi2Combiner::Chi2Combiner(const Parameters& p,Engine* e):Chi2Data(p,e),iter(0),timer(new Timer()),verbose(true)
Chi2Combiner::Chi2Combiner(const Variables& p,Engine* e):Chi2Data(p,e),iter(0),timer(new Timer()),verbose(true)
{
Chi2Data::_name="Chi2Combiner";
}
......
......@@ -18,7 +18,7 @@
#include "Chi2Data.hh"
#include "Engine.hh"
#include "Parameters.hh"
#include "Variables.hh"
#include<vector>
#include<string>
......@@ -30,7 +30,7 @@ class Chi2Combiner : public Chi2Data
public:
//constructors: takes ownership of engine : deletes it.
Chi2Combiner(const Parameters& p,Engine* e=0);
Chi2Combiner(const Variables& p,Engine* e=0);
// destructor
~Chi2Combiner();
......
......@@ -27,7 +27,7 @@ using namespace ROOT::Minuit2;
//---------------
// Constructors --
//----------------
Chi2Data::Chi2Data(const Parameters& upar,Engine* e):user_par(upar),engine(e),_name("unknown")
Chi2Data::Chi2Data(const Variables& upar,Engine* e):user_par(upar),engine(e),_name("unknown")
{
//updateIndex();
}
......
......@@ -30,7 +30,7 @@
#define Chi2Data_hh
#include"Engine.hh"
#include "Parameters.hh"
#include "Variables.hh"
#include "Minuit2/FCNBase.h"
......@@ -45,7 +45,7 @@ public:
//constructors
//user_par is the complete list of user_parameters as provided by the Parser
Chi2Data(const Parameters& user_par,Engine* e=0);
Chi2Data(const Variables& user_par,Engine* e=0);
//destructor: prints the name and last chi2 value
virtual ~Chi2Data();
......@@ -78,7 +78,7 @@ public:
protected: // these should be used by sub-classes:
Engine* engine;
Parameters user_par;
Variables user_par;
std::string _name;
......
......@@ -14,7 +14,7 @@
#include "Chi2Combiner.hh"
#include "Chi2Data.hh"
#include "Parser.hh"
#include"Parameters.hh"
#include"Variables.hh"
//Engine
#include"Class/ClassEngine.hh"
......@@ -192,7 +192,7 @@ Chi2Factory::gimeChi2(Parser& parser){
//le calculateur de spectres
//MnUserParameters upar(parser.upar);
//MnUserVariables upar(parser.upar);
e=new MnClassEngine(parser.user_par,
classparms,
pre);
......@@ -286,7 +286,7 @@ Chi2Factory::gimeChi2(Parser& parser){
comb->dumpIndex();
//single print
Parameters upar(parser.user_par);
Variables upar(parser.user_par);
cout << "it | " ;
for (size_t i=0;i<upar.Params().size();i++) cout << upar.Name(i) <<" | ";
cout << "status | chi2 | ptime"<<endl;
......
......@@ -30,7 +30,7 @@ using namespace std;
//---------------
// Constructors --
//----------------
MnClassEngine::MnClassEngine(const Parameters& _upar,
MnClassEngine::MnClassEngine(const Variables& _upar,
const ClassParams& config,const std::string& prefile)
{
......
......@@ -16,7 +16,7 @@
#ifndef MnClassEngine_hh
#define MnClassEngine_hh
#include "Parameters.hh"
#include "Variables.hh"
#include "Engine.hh"
#include "ClassEngine.hh"
......@@ -33,7 +33,7 @@ class MnClassEngine : public Engine
public:
//constructors
MnClassEngine(const Parameters& upar,
MnClassEngine(const Variables& upar,
const ClassParams& config,
const std::string& prefile);
......@@ -41,7 +41,7 @@ public:
~MnClassEngine();
//this will update the CLASS computations for a realization of par
//conistent with the MnUserParameters
//conistent with the MnUserVariables
bool updateParValues(const std::vector<double>& minuitPars);
//then read with this one
......
......@@ -26,7 +26,7 @@ using namespace std;
// Constructors --
//----------------
Chi2Gauss1::Chi2Gauss1(const string& varname,double mean,double sigma,
const Parameters& p):Chi2Data(p),mu(mean),sig(sigma)
const Variables& p):Chi2Data(p),mu(mean),sig(sigma)
{
ostringstream os;
......
......@@ -17,7 +17,7 @@
#define Chi2Gauss1_hh
#include"Chi2Data.hh"
#include"Parameters.hh"
#include"Variables.hh"
#include<string>
#include<vector>
......@@ -31,7 +31,7 @@ public:
//constructors
Chi2Gauss1(const string& varname,double mean,double sigma,
const Parameters& params);
const Variables& params);
// destructor
~Chi2Gauss1();
......
......@@ -26,7 +26,7 @@ using namespace std;
// Constructors --
//----------------
Chi2GaussSum::Chi2GaussSum(const string& var1,const string& var2,double weight1, double weight2, double mean,double sigma,
const Parameters& p):Chi2Data(p),w1(weight1),w2(weight2),mu(mean),sig(sigma)
const Variables& p):Chi2Data(p),w1(weight1),w2(weight2),mu(mean),sig(sigma)
{
ostringstream os;
os << "Gauss2 weighted constraint (" << weight1 << "*" << var1 << "+" << weight2<< "*" << var2 << "=" << mean << " +- " << sigma << ")";
......
......@@ -30,7 +30,7 @@ public:
//constructors
Chi2GaussSum(const string& var1,const string& var2,double weight1, double weight2,
double mean,double sigma,
const Parameters& par);
const Variables& par);
// destructor
~Chi2GaussSum();
......
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