a Code for the Combination of Indirect and Direct Constraints on High Energy Physics Models Logo
ModelFactory.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 HEPfit Collaboration
3  *
4  *
5  * For the licensing terms see doc/COPYING.
6  */
7 
8 #include "ModelFactory.h"
9 #include "NPSTU.h"
10 #include "NPSTUZbbbarLR.h"
11 #include "NPEpsilons.h"
12 #include "NPEpsilons_pureNP.h"
13 #include "NPZbbbar.h"
14 #include "NPZbbbarLinearized.h"
15 #include "NPSMEFTd6.h"
16 #include "NPSMEFT6dtopquark.h"
17 #include "HiggsKvKf.h"
18 #include "HiggsKvKfgen.h"
19 #include "HiggsKvgenKfgen.h"
20 #include "HiggsKigen.h"
21 #include "HiggsChiral.h"
22 #include "SUSY.h"
23 #include "THDM.h"
26 #include "RealWeakEFTLFV.h"
27 #include "RealWeakEFTCC.h"
28 #include "NPDF2.h"
29 #include "CMFV.h"
30 #include "GeorgiMachacek.h"
31 #include "GeneralSUSY.h"
32 #include "GeneralTHDM.h"
33 #include "THDMW.h"
34 #include <boost/bind.hpp>
35 
37 {
38  modelFactory["StandardModel"] = boost::factory<StandardModel*>();
39  modelFactory["NPSTU"] = boost::factory<NPSTU*>();
40  modelFactory["NPSTUZbbbarLR"] = boost::factory<NPSTUZbbbarLR*>();
41  modelFactory["NPEpsilons"] = boost::factory<NPEpsilons*>();
42  modelFactory["NPEpsilons_pureNP"] = boost::factory<NPEpsilons_pureNP*>();
43  modelFactory["NPZbbbar"] = boost::bind(boost::factory<NPZbbbar*>(), false);
44  modelFactory["NPZbbbarLR"] = boost::bind(boost::factory<NPZbbbar*>(), true);
45  modelFactory["NPZbbbarLinearized"] = boost::bind(boost::factory<NPZbbbarLinearized*>(), false);
46  modelFactory["NPZbbbarLinearizedLR"] = boost::bind(boost::factory<NPZbbbarLinearized*>(), true);
47  modelFactory["NPSMEFTd6"] = boost::bind(boost::factory<NPSMEFTd6*>(), false, false);
48  modelFactory["NPSMEFT6dtopquark"] = boost::factory<NPSMEFT6dtopquark*>();
49  modelFactory["NPSMEFTd6_LFU_QFU"] = boost::bind(boost::factory<NPSMEFTd6*>(), true, true);
50  modelFactory["HiggsKvKf"] = boost::factory<HiggsKvKf*>();
51  modelFactory["HiggsKvKfgen"] = boost::factory<HiggsKvKfgen*>();
52  modelFactory["HiggsKvgenKfgen"] = boost::factory<HiggsKvgenKfgen*>();
53  modelFactory["HiggsKigen"] = boost::factory<HiggsKigen*>();
54  modelFactory["HiggsChiral"] = boost::factory<HiggsChiral*>();
55  modelFactory["NPDF2"] = boost::factory<NPDF2*>();
56  modelFactory["CMFV"] = boost::factory<CMFV*>();
57  modelFactory["FlavourWilsonCoefficient"] = boost::factory<FlavourWilsonCoefficient*>();
58  modelFactory["FlavourWilsonCoefficient_DF2"] = boost::factory<FlavourWilsonCoefficient_DF2*>();
59  modelFactory["RealWeakEFTLFV"] = boost::factory<RealWeakEFTLFV*>();
60  modelFactory["RealWeakEFTCC"] = boost::bind(boost::factory<RealWeakEFTCC*>(), 0);
61  modelFactory["RealWeakEFTCCPM"] = boost::bind(boost::factory<RealWeakEFTCC*>(), 1);
62  modelFactory["THDM"] = boost::factory<THDM*>();
63  modelFactory["GeorgiMachacek"] = boost::factory<GeorgiMachacek*>();
64  modelFactory["GeneralSUSY"] = boost::factory<GeneralSUSY*>();
65  modelFactory["GeneralTHDM"] = boost::factory<GeneralTHDM*>();
66  modelFactory["THDMW"] = boost::factory<THDMW*>();
67 }
68 
69 void ModelFactory::addModelToFactory(const std::string name, boost::function<StandardModel*() > funct)
70 {
71  modelFactory[name] = funct;
72 }
73 
74 StandardModel* ModelFactory::CreateModel(const std::string& name)
75 {
76  if (modelFactory.find(name) == modelFactory.end())
77  throw std::runtime_error("ERROR: Wrong model " + name + " passed to ModelFactory.\n");
78  return (modelFactory[name]());
79 }
HiggsKvKfgen.h
NPSTU.h
GeorgiMachacek.h
NPSMEFT6dtopquark.h
THDMW.h
ModelFactory::addModelToFactory
void addModelToFactory(const std::string name, boost::function< StandardModel *() >)
Definition: ModelFactory.cpp:69
NPEpsilons_pureNP.h
StandardModel
A model class for the Standard Model.
Definition: StandardModel.h:474
ModelFactory.h
NPSTUZbbbarLR.h
ModelFactory::modelFactory
std::map< std::string, boost::function< StandardModel *()> > modelFactory
Definition: ModelFactory.h:35
NPZbbbar.h
NPZbbbarLinearized.h
ModelFactory::ModelFactory
ModelFactory()
Definition: ModelFactory.cpp:36
CMFV.h
GeneralTHDM.h
HiggsKigen.h
HiggsChiral.h
RealWeakEFTLFV.h
GeneralSUSY.h
ModelFactory::CreateModel
StandardModel * CreateModel(const std::string &ModelName)
Definition: ModelFactory.cpp:74
HiggsKvKf.h
NPEpsilons.h
RealWeakEFTCC.h
NPDF2.h
FlavourWilsonCoefficient.h
THDM.h
NPSMEFTd6.h
SUSY.h
HiggsKvgenKfgen.h
FlavourWilsonCoefficient_DF2.h