ModelFactory Class Reference

A class for. More...

#include <ModelFactory.h>

Detailed Description

A class for.

Author
HEPfit Collaboration

Definition at line 25 of file ModelFactory.h.

Public Member Functions

void addModelToFactory (const std::string name, boost::function< StandardModel *() >)
 
StandardModelCreateModel (const std::string &ModelName)
 
 ModelFactory ()
 
 ModelFactory (const ModelFactory &orig)
 
virtual ~ModelFactory ()
 

Private Attributes

std::map< std::string, boost::function< StandardModel *()> > modelFactory
 

Constructor & Destructor Documentation

ModelFactory::ModelFactory ( )

Definition at line 28 of file ModelFactory.cpp.

29 {
30  modelFactory["StandardModel"] = boost::factory<StandardModel*>();
31  modelFactory["NPSTU"] = boost::factory<NPSTU*>();
32  modelFactory["NPSTUZbbbarLR"] = boost::factory<NPSTUZbbbarLR*>();
33  modelFactory["NPEpsilons"] = boost::factory<NPEpsilons*>();
34  modelFactory["NPEpsilons_pureNP"] = boost::factory<NPEpsilons_pureNP*>();
35  modelFactory["NPHiggs"] = boost::factory<NPHiggs*>();
36  modelFactory["NPZbbbar"] = boost::bind(boost::factory<NPZbbbar*>(), false);
37  modelFactory["NPZbbbarLR"] = boost::bind(boost::factory<NPZbbbar*>(), true);
38  modelFactory["NPZbbbarLinearized"] = boost::bind(boost::factory<NPZbbbarLinearized*>(), false);
39  modelFactory["NPZbbbarLinearizedLR"] = boost::bind(boost::factory<NPZbbbarLinearized*>(), true);
40  modelFactory["NPEffectiveBS"] = boost::bind(boost::factory<NPEffectiveBS*>(), false, false);
41  modelFactory["NPEffectiveBS_LFU"] = boost::bind(boost::factory<NPEffectiveBS*>(), true, false);
42  modelFactory["NPEffectiveBS_QFU"] = boost::bind(boost::factory<NPEffectiveBS*>(), false, true);
43  modelFactory["NPEffectiveBS_LFU_QFU"] = boost::bind(boost::factory<NPEffectiveBS*>(), true, true);
44  modelFactory["NPEffectiveGIMR"] = boost::bind(boost::factory<NPEffectiveGIMR*>(), false, false);
45  //modelFactory["NPEffectiveGIMR_LFU"] = boost::bind(boost::factory<NPEffectiveGIMR*>(), true, false);
46  //modelFactory["NPEffectiveGIMR_QFU"] = boost::bind(boost::factory<NPEffectiveGIMR*>(), false, true);
47  modelFactory["NPEffectiveGIMR_LFU_QFU"] = boost::bind(boost::factory<NPEffectiveGIMR*>(), true, true);
48  modelFactory["HiggsKvKf"] = boost::factory<HiggsKvKf*>();
49  modelFactory["HiggsKvKfgen"] = boost::factory<HiggsKvKfgen*>();
50  modelFactory["HiggsKvgenKf"] = boost::factory<HiggsKvgenKf*>();
51  modelFactory["GeneralSUSY"] = boost::factory<GeneralSUSY*>();
52  modelFactory["SUSYMassInsertion"] = boost::factory<SUSYMassInsertion*>();
53  modelFactory["THDM"] = boost::factory<THDM*>();
54  modelFactory["FlavourWilsonCoefficient"] = boost::factory<FlavourWilsonCoefficient*>();
55 }
std::map< std::string, boost::function< StandardModel *()> > modelFactory
Definition: ModelFactory.h:35
ModelFactory::ModelFactory ( const ModelFactory orig)
virtual ModelFactory::~ModelFactory ( )
inlinevirtual

Definition at line 29 of file ModelFactory.h.

29 {};

Member Function Documentation

void ModelFactory::addModelToFactory ( const std::string  name,
boost::function< StandardModel *() >  funct 
)

Definition at line 57 of file ModelFactory.cpp.

58 {
59  modelFactory[name] = funct;
60 }
std::map< std::string, boost::function< StandardModel *()> > modelFactory
Definition: ModelFactory.h:35
StandardModel * ModelFactory::CreateModel ( const std::string &  ModelName)

Definition at line 62 of file ModelFactory.cpp.

63 {
64  if (modelFactory.find(name) == modelFactory.end())
65  throw std::runtime_error("ERROR: Wrong model " + name + " passed to ModelFactory.\n");
66  return (modelFactory[name]());
67 }
std::map< std::string, boost::function< StandardModel *()> > modelFactory
Definition: ModelFactory.h:35

Member Data Documentation

std::map<std::string, boost::function<StandardModel* ()> > ModelFactory::modelFactory
private

Definition at line 35 of file ModelFactory.h.


The documentation for this class was generated from the following files: