Model Class Referenceabstract

A class for the template of models. More...

#include <Model.h>

Inheritance diagram for Model:
[legend]

Detailed Description

A class for the template of models.

Author
HEPfit Collaboration

This template delineates the methods necessary for the construction and updating of a particular model. An example of its use can be found in the StandardModel class.

Definition at line 24 of file Model.h.

Public Member Functions

virtual bool CheckFlags () const =0
 A method to check the sanity of the set of model flags. More...
 
virtual bool CheckParameters (const std::map< std::string, double > &DPars)=0
 A method to check if all the mandatory parameters for the model have been provided in model initialization. More...
 
const double & getModelParam (std::string name) const
 
virtual bool Init (const std::map< std::string, double > &DPars)=0
 A method to initialize the model parameters. More...
 
bool IsModelInitialized () const
 A method to check if the model is initialized. More...
 
bool isModelParam (std::string name) const
 
bool isModelSUSY () const
 
bool isModelTHDM () const
 
bool IsUpdateError () const
 A method to check if there was any error in the model update process. More...
 
 Model ()
 The default constructor. More...
 
std::string ModelName () const
 A method to fetch the name of the model. More...
 
virtual bool PostUpdate ()=0
 The post-update method for the model. More...
 
virtual bool PreUpdate ()=0
 The pre-update method for the model. More...
 
virtual bool setFlag (const std::string name, const bool value)=0
 A method to set a flag of the model. More...
 
virtual bool setFlagStr (const std::string name, const std::string value)=0
 A method to set a flag of the model. More...
 
void setModelInitialized (bool ModelInitialized)
 A set method to fix the failure or success of the initialization of the model. More...
 
void setModelName (const std::string name)
 A method to set the name of the model. More...
 
void setModelSUSY ()
 
void setModelTHDM ()
 
void setUpdateError (bool UpdateError)
 A set method to fix the update status as success or failure. More...
 
virtual bool Update (const std::map< std::string, double > &DPars)=0
 The update method for the model. More...
 
virtual ~Model ()
 The default destructor. More...
 

Protected Member Functions

virtual void setParameter (const std::string name, const double &value)=0
 A method to set the value of a parameter of the model. More...
 

Protected Attributes

std::map< std::string, boost::reference_wrapper< const double > > ModelParamMap
 
bool UpdateError
 A boolean set to false if update is successful. More...
 

Private Attributes

bool flagSUSYmodel
 A flag identifying the model as a SUSY model. More...
 
bool flagTHDMmodel
 A flag identifying the model as a THDM model. More...
 
bool ModelInitialized
 A boolean set to true if the model is successfully initialized. More...
 
std::string name
 The name of the model. More...
 

Constructor & Destructor Documentation

Model::Model ( )
inline

The default constructor.

Definition at line 30 of file Model.h.

31  {
32  ModelInitialized = false;
33  flagSUSYmodel = false;
34  };
bool ModelInitialized
A boolean set to true if the model is successfully initialized.
Definition: Model.h:204
bool flagSUSYmodel
A flag identifying the model as a SUSY model.
Definition: Model.h:205
virtual Model::~Model ( )
inlinevirtual

The default destructor.

Definition at line 39 of file Model.h.

40  {
41  };

Member Function Documentation

virtual bool Model::CheckFlags ( ) const
pure virtual

A method to check the sanity of the set of model flags.

Returns
a boolean that is true if the set of model flags is sane

Implemented in QCD, and StandardModel.

virtual bool Model::CheckParameters ( const std::map< std::string, double > &  DPars)
pure virtual

A method to check if all the mandatory parameters for the model have been provided in model initialization.

Parameters
[in]DParsa map of the parameters that are being updated in the Monte Carlo run (including parameters that are varied and those that are held constant)
Returns
a boolean that is true if the execution is successful

Implemented in QCD, StandardModel, NPEffectiveGIMR, NPEffectiveBS, HiggsKvKfgen, NPZbbbarLinearized, NPZbbbar, NPHiggs, HiggsKvgenKf, NPEpsilons, HiggsKvKf, NPSTUZbbbarLR, THDM, NPEpsilons_pureNP, NPSTU, SUSY, SUSYMassInsertion, FlavourWilsonCoefficient, myModel, and GeneralSUSY.

const double& Model::getModelParam ( std::string  name) const
inline

Definition at line 165 of file Model.h.

166  {
167  return ModelParamMap.at(name);
168  }
std::string name
The name of the model.
Definition: Model.h:203
std::map< std::string, boost::reference_wrapper< const double > > ModelParamMap
Definition: Model.h:200
virtual bool Model::Init ( const std::map< std::string, double > &  DPars)
pure virtual

A method to initialize the model parameters.

Parameters
[in]DParsa map of the parameters that are being updated in the Monte Carlo run (including parameters that are varied and those that are held constant)
Returns
a boolean that is true if the execution is successful

Implemented in QCD, StandardModel, THDM, SUSY, SUSYMassInsertion, FlavourWilsonCoefficient, myModel, and GeneralSUSY.

bool Model::IsModelInitialized ( ) const
inline

A method to check if the model is initialized.

Returns
a boolean that is true if the model has been initialized

Definition at line 133 of file Model.h.

134  {
135  return ModelInitialized;
136  }
bool ModelInitialized
A boolean set to true if the model is successfully initialized.
Definition: Model.h:204
bool Model::isModelParam ( std::string  name) const
inline

Definition at line 170 of file Model.h.

171  {
172  return (ModelParamMap.find(name) != ModelParamMap.end());
173  }
std::string name
The name of the model.
Definition: Model.h:203
std::map< std::string, boost::reference_wrapper< const double > > ModelParamMap
Definition: Model.h:200
bool Model::isModelSUSY ( ) const
inline

Definition at line 179 of file Model.h.

179  {
180  return flagSUSYmodel;
181  }
bool flagSUSYmodel
A flag identifying the model as a SUSY model.
Definition: Model.h:205
bool Model::isModelTHDM ( ) const
inline

Definition at line 187 of file Model.h.

187  {
188  return flagTHDMmodel;
189  }
bool flagTHDMmodel
A flag identifying the model as a THDM model.
Definition: Model.h:206
bool Model::IsUpdateError ( ) const
inline

A method to check if there was any error in the model update process.

Returns
a boolean that is true if the update was not successful

Definition at line 151 of file Model.h.

152  {
153  return UpdateError;
154  }
bool UpdateError
A boolean set to false if update is successful.
Definition: Model.h:192
std::string Model::ModelName ( ) const
inline

A method to fetch the name of the model.

Returns
the name of the model as a string

Definition at line 56 of file Model.h.

57  {
58  return name;
59  }
std::string name
The name of the model.
Definition: Model.h:203
virtual bool Model::PostUpdate ( )
pure virtual

The post-update method for the model.

This method runs all the procedures that are need to be executed after the model is successfully updated. This includes updating any other variable that needs to be updated at this time due to the update of the model parameters

Returns
a boolean that is true if the execution is successful

Implemented in QCD, StandardModel, NPEffectiveGIMR, NPZbbbarLinearized, NPZbbbar, NPEpsilons, THDM, NPbase, SUSY, SUSYMassInsertion, FlavourWilsonCoefficient, myModel, and GeneralSUSY.

virtual bool Model::PreUpdate ( )
pure virtual

The pre-update method for the model.

This method checks if all requisites for the update process of the current model has been completed. Such requisites can be procedures like update of other models or any other procedures that need to be done before the current model can be successfully updated.

Returns
a boolean that is true if the execution is successful

Implemented in QCD, StandardModel, THDM, SUSY, SUSYMassInsertion, FlavourWilsonCoefficient, myModel, and GeneralSUSY.

virtual bool Model::setFlag ( const std::string  name,
const bool  value 
)
pure virtual

A method to set a flag of the model.

Parameters
[in]namename of a model flag
[in]valuethe boolean to be assigned to the flag specified by name
Returns
a boolean that is true if the execution is successful

Implemented in QCD, StandardModel, NPEffectiveGIMR, NPEpsilons, SUSY, FlavourWilsonCoefficient, and myModel.

virtual bool Model::setFlagStr ( const std::string  name,
const std::string  value 
)
pure virtual

A method to set a flag of the model.

Parameters
[in]namename of a model flag
[in]valuethe string to be assigned to the flag specified by name
Returns
a boolean that is true if the execution is successful

Implemented in QCD, StandardModel, and THDM.

void Model::setModelInitialized ( bool  ModelInitialized)
inline

A set method to fix the failure or success of the initialization of the model.

Parameters
[in]ModelInitializedtrue if the model has been successfully initialized

Definition at line 142 of file Model.h.

143  {
145  }
bool ModelInitialized
A boolean set to true if the model is successfully initialized.
Definition: Model.h:204
void Model::setModelName ( const std::string  name)
inline

A method to set the name of the model.

Parameters
[in]namethe name of the model

Definition at line 47 of file Model.h.

48  {
49  this->name = name;
50  }
std::string name
The name of the model.
Definition: Model.h:203
void Model::setModelSUSY ( )
inline

Definition at line 175 of file Model.h.

175  {
176  flagSUSYmodel = true;
177  }
bool flagSUSYmodel
A flag identifying the model as a SUSY model.
Definition: Model.h:205
void Model::setModelTHDM ( )
inline

Definition at line 183 of file Model.h.

183  {
184  flagTHDMmodel = true;
185  }
bool flagTHDMmodel
A flag identifying the model as a THDM model.
Definition: Model.h:206
virtual void Model::setParameter ( const std::string  name,
const double &  value 
)
protectedpure virtual

A method to set the value of a parameter of the model.

Parameters
[in]namename of a model parameter
[in]valuethe value to be assigned to the parameter specified by name

Implemented in StandardModel, NPEffectiveGIMR, SUSY, NPEffectiveBS, NPEpsilons, HiggsKvKfgen, THDM, HiggsKvgenKf, HiggsKvKf, NPZbbbar, SUSYMassInsertion, NPEpsilons_pureNP, NPHiggs, FlavourWilsonCoefficient, NPZbbbarLinearized, NPSTU, NPSTUZbbbarLR, myModel, and GeneralSUSY.

void Model::setUpdateError ( bool  UpdateError)
inline

A set method to fix the update status as success or failure.

Parameters
[in]UpdateErrortrue if update is not successful

Definition at line 160 of file Model.h.

161  {
162  this->UpdateError = UpdateError;
163  }
bool UpdateError
A boolean set to false if update is successful.
Definition: Model.h:192
virtual bool Model::Update ( const std::map< std::string, double > &  DPars)
pure virtual

The update method for the model.

This method updates all the model parameters with given DPars.

Parameters
[in]DParsa map of the parameters that are being updated in the Monte Carlo run (including parameters that are varied and those that are held constant)
Returns
a boolean that is true if the execution is successful

Implemented in QCD, StandardModel, THDM, SUSY, SUSYMassInsertion, FlavourWilsonCoefficient, myModel, and GeneralSUSY.

Member Data Documentation

bool Model::flagSUSYmodel
private

A flag identifying the model as a SUSY model.

Definition at line 205 of file Model.h.

bool Model::flagTHDMmodel
private

A flag identifying the model as a THDM model.

Definition at line 206 of file Model.h.

bool Model::ModelInitialized
private

A boolean set to true if the model is successfully initialized.

Definition at line 204 of file Model.h.

std::map< std::string, boost::reference_wrapper<const double> > Model::ModelParamMap
protected

Definition at line 200 of file Model.h.

std::string Model::name
private

The name of the model.

Definition at line 203 of file Model.h.

bool Model::UpdateError
protected

A boolean set to false if update is successful.

Definition at line 192 of file Model.h.


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