Commit d708fe1f authored by Plaszczynski Stephane's avatar Plaszczynski Stephane
Browse files

switch to Parameters for MnClass/Pico engines

parent 2fff33a9
......@@ -163,8 +163,7 @@ Chi2Factory::gimeChi2(Parser& parser){
if (engine=="pico") {
cout << "USING pico ENGINE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" << endl;
MnUserParameters upar(parser.upar);
e=new MnPicoEngine(upar,lmax,PICODATA,false);
e=new MnPicoEngine(parser.user_par,lmax,PICODATA,false);
}
else{
//extra class params
......@@ -190,9 +189,8 @@ Chi2Factory::gimeChi2(Parser& parser){
//le calculateur de spectres
MnUserParameters upar(parser.upar);
e=new MnClassEngine(upar,
parser.nuisance,
//MnUserParameters upar(parser.upar);
e=new MnClassEngine(parser.user_par,
classparms,
pre);
......@@ -281,7 +279,7 @@ Chi2Factory::gimeChi2(Parser& parser){
comb->setVerbose(verb);
//single print
MnUserParameters upar(parser.upar);
Parameters 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;
......
......@@ -26,14 +26,11 @@
//--------------------
// C
//----------------
using namespace ROOT::Minuit2;
using namespace std;
//---------------
// Constructors --
//----------------
MnClassEngine::MnClassEngine(const MnUserParameters& _upar,
const vector<bool>& nui,
MnClassEngine::MnClassEngine(const Parameters& _upar,
const ClassParams& config,const std::string& prefile)
{
......@@ -49,7 +46,7 @@ MnClassEngine::MnClassEngine(const MnUserParameters& _upar,
//loop to create adapters and locate corresponding indices
for (size_t i=0;i<vals.size();i++){
//skip nuisance
if (nui[i]) continue;
if (_upar.isNui(i)) continue;
string name=trim(_upar.Name(i));
//cout << name << "=" << vals[i] <<endl;
......
......@@ -16,7 +16,7 @@
#ifndef MnClassEngine_hh
#define MnClassEngine_hh
#include "Minuit2/MnUserParameters.h"
#include "Parameters.hh"
#include "Engine.hh"
#include "ClassEngine.hh"
......@@ -33,9 +33,9 @@ class MnClassEngine : public Engine
public:
//constructors
MnClassEngine(const ROOT::Minuit2::MnUserParameters& upar,
const std::vector<bool>& isNuisance,
const ClassParams& config,const std::string& prefile);
MnClassEngine(const Parameters& upar,
const ClassParams& config,
const std::string& prefile);
// destructor
~MnClassEngine();
......
......@@ -25,8 +25,7 @@ int main(int argc,char** argv){
Engine *e;
if (engine=="pico") {
MnUserParameters upar(parser.upar);
e=new MnPicoEngine(upar,lmax,PICODATA,true);
e=new MnPicoEngine(parser.user_par,lmax,PICODATA,true);
}
else{
......@@ -47,9 +46,7 @@ int main(int argc,char** argv){
cout << "CLASS \t--> precision parameters taken from file=" << pre << endl;
MnUserParameters upar(parser.upar);
e=new MnClassEngine(upar,
parser.nuisance,
e=new MnClassEngine(parser.user_par,
classparms,
pre);
......
......@@ -23,7 +23,6 @@
//--------------------
// C
//----------------
using namespace ROOT::Minuit2;
using namespace std;
......@@ -37,7 +36,7 @@ char* MnPicoEngine::clNames[]={"cl_TT","cl_EE","cl_TE","cl_BB","cl_pp","cl_pT"};
//---------------
// Constructors --
//----------------
MnPicoEngine::MnPicoEngine(const MnUserParameters& _upar,const int& lmax, const string& picodata,bool verbose ):iAs(-1),ins(-1),inu(-1),pResult(NULL){
MnPicoEngine::MnPicoEngine(const Parameters& _upar,const int& lmax, const string& picodata,bool verbose ):iAs(-1),ins(-1),inu(-1),pResult(NULL){
//superclass
_lmax=lmax;
......
......@@ -16,7 +16,7 @@
#ifndef MnPicoEngine_hh
#define MnPicoEngine_hh
#include "Minuit2/MnUserParameters.h"
#include "Parameters.hh"
#include "Engine.hh"
#include"pico/cpico.h"
......@@ -32,7 +32,7 @@ class MnPicoEngine : public Engine
public:
//constructors
MnPicoEngine(const ROOT::Minuit2::MnUserParameters& upar,
MnPicoEngine(const Parameters& upar,
const int& lmax, const std::string& picodata,bool verbose=false);
// destructor
......
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