a Code for the Combination of Indirect and Direct Constraints on High Energy Physics Models Logo
Model Class Referenceabstract

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

#include <Model.h>

+ Inheritance diagram for Model:

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 26 of file Model.h.

Public Member Functions

void addMissingModelParameter (const std::string &missingParameterName)
 
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...
 
std::vector< std::string > getmissingModelParameters ()
 
unsigned int getMissingModelParametersCount ()
 
std::string getModelName () const
 A method to fetch the name of the model. 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 isModelGeneralTHDM () const
 
bool isModelGeorgiMachacek () const
 
bool IsModelInitialized () const
 A method to check if the model is initialized. More...
 
bool isModelLinearized () const
 
bool isModelParam (std::string name) const
 
bool isModelSUSY () const
 
bool isModelTHDM () const
 
bool isModelTHDMW () const
 
bool IsUpdateError () const
 A method to check if there was any error in the model update process. More...
 
 Model ()
 The default constructor. 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...
 
void raiseMissingModelParameterCount ()
 
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 setModelGeneralTHDM ()
 
void setModelGeorgiMachacek ()
 
void setModelInitialized (bool ModelInitialized)
 A set method to fix the failure or success of the initialization of the model. More...
 
void setModelLinearized (bool linearized=true)
 
void setModelName (const std::string name)
 A method to set the name of the model. More...
 
void setModelSUSY ()
 
void setModelTHDM ()
 
void setModelTHDMW ()
 
void setSliced (bool Sliced)
 
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

bool isSliced
 A boolean set to true if the current istance is a slice of an extended object. More...
 
std::map< std::string, std::reference_wrapper< const double > > ModelParamMap
 
bool UpdateError
 A boolean set to false if update is successful. More...
 

Private Attributes

bool flagGMmodel
 A flag identifying the model as a GeorgiMachacek model. More...
 
bool flagGTHDMmodel
 A flag identifying the model as a GeneralTHDM model. More...
 
bool flagLinearized
 A flag to identify models where the NP contribution to Higgs observables is linearized. More...
 
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 flagTHDMWmodel
 A flag identifying the model as a THDMW model. More...
 
std::vector< std::string > missingModelParameters
 
unsigned int missingModelParametersCount = 0
 
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::Model ( )
inline

The default constructor.

Definition at line 32 of file Model.h.

33  {
34  ModelInitialized = false;
35  flagSUSYmodel = false;
36  flagLinearized = false;
37  };

◆ ~Model()

virtual Model::~Model ( )
inlinevirtual

The default destructor.

Definition at line 42 of file Model.h.

43  {
44  };

Member Function Documentation

◆ addMissingModelParameter()

void Model::addMissingModelParameter ( const std::string &  missingParameterName)
inline

Definition at line 232 of file Model.h.

233  {
234  missingModelParameters.push_back(missingParameterName);
235  }

◆ CheckFlags()

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 StandardModel, and QCD.

◆ CheckParameters()

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 NPSMEFTd6, StandardModel, HiggsKigen, GeneralTHDM, QCD, HiggsChiral, THDMW, HiggsKvgenKfgen, HiggsKvKfgen, THDM, GeorgiMachacek, NPZbbbarLinearized, NPZbbbar, RealWeakEFTLFV, FlavourWilsonCoefficient, NPEpsilons, FlavourWilsonCoefficient_DF2, HiggsKvKf, NPSTUZbbbarLR, NPEpsilons_pureNP, RealWeakEFTCC, NPSTU, CMFV, NPDF2, myModel, and myModel.

◆ getmissingModelParameters()

std::vector<std::string> Model::getmissingModelParameters ( )
inline

Definition at line 237 of file Model.h.

238  {
239  return missingModelParameters;
240  }

◆ getMissingModelParametersCount()

unsigned int Model::getMissingModelParametersCount ( )
inline

Definition at line 247 of file Model.h.

248  {
250  }

◆ getModelName()

std::string Model::getModelName ( ) const
inline

A method to fetch the name of the model.

Returns
the name of the model as a string

Definition at line 59 of file Model.h.

60  {
61  return name;
62  }

◆ getModelParam()

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

Definition at line 168 of file Model.h.

169  {
170  return ModelParamMap.at(name);
171  }

◆ Init()

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 StandardModel, GeneralTHDM, QCD, THDMW, THDM, GeorgiMachacek, RealWeakEFTLFV, FlavourWilsonCoefficient, RealWeakEFTCC, myModel, and myModel.

◆ isModelGeneralTHDM()

bool Model::isModelGeneralTHDM ( ) const
inline

Definition at line 198 of file Model.h.

198  {
199  return flagGTHDMmodel;
200  }

◆ isModelGeorgiMachacek()

bool Model::isModelGeorgiMachacek ( ) const
inline

Definition at line 214 of file Model.h.

214  {
215  return flagGMmodel;
216  }

◆ IsModelInitialized()

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
Examples
myModel.cpp.

Definition at line 136 of file Model.h.

137  {
138  return ModelInitialized;
139  }

◆ isModelLinearized()

bool Model::isModelLinearized ( ) const
inline

Definition at line 219 of file Model.h.

219  {
220  return flagLinearized;
221  }

◆ isModelParam()

bool Model::isModelParam ( std::string  name) const
inline

Definition at line 173 of file Model.h.

174  {
175  return (ModelParamMap.find(name) != ModelParamMap.end());
176  }

◆ isModelSUSY()

bool Model::isModelSUSY ( ) const
inline

Definition at line 182 of file Model.h.

182  {
183  return flagSUSYmodel;
184  }

◆ isModelTHDM()

bool Model::isModelTHDM ( ) const
inline

Definition at line 190 of file Model.h.

190  {
191  return flagTHDMmodel;
192  }

◆ isModelTHDMW()

bool Model::isModelTHDMW ( ) const
inline

Definition at line 206 of file Model.h.

206  {
207  return flagTHDMWmodel;
208  }

◆ IsUpdateError()

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 154 of file Model.h.

155  {
156  return UpdateError;
157  }

◆ PostUpdate()

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 NPSMEFTd6, StandardModel, GeneralTHDM, QCD, THDMW, HiggsKigen, THDM, GeorgiMachacek, NPZbbbarLinearized, NPZbbbar, RealWeakEFTLFV, FlavourWilsonCoefficient, NPEpsilons, FlavourWilsonCoefficient_DF2, HiggsChiral, RealWeakEFTCC, NPbase, myModel, and myModel.

◆ PreUpdate()

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 StandardModel, GeneralTHDM, QCD, THDMW, THDM, GeorgiMachacek, RealWeakEFTLFV, FlavourWilsonCoefficient, RealWeakEFTCC, myModel, and myModel.

◆ raiseMissingModelParameterCount()

void Model::raiseMissingModelParameterCount ( )
inline

Definition at line 242 of file Model.h.

243  {
245  }

◆ setFlag()

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 GeneralTHDM, GeorgiMachacek, NPSMEFT6dtopquark, NPSMEFTd6, StandardModel, QCD, HiggsKigen, THDM, RealWeakEFTLFV, FlavourWilsonCoefficient, NPEpsilons, HiggsChiral, RealWeakEFTCC, myModel, and myModel.

◆ setFlagStr()

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 StandardModel, GeneralTHDM, QCD, THDMW, and THDM.

◆ setModelGeneralTHDM()

void Model::setModelGeneralTHDM ( )
inline

Definition at line 194 of file Model.h.

194  {
195  flagGTHDMmodel = true;
196  }

◆ setModelGeorgiMachacek()

void Model::setModelGeorgiMachacek ( )
inline

Definition at line 210 of file Model.h.

210  {
211  flagGMmodel = true;
212  }

◆ setModelInitialized()

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
Examples
myModel.cpp.

Definition at line 145 of file Model.h.

146  {
148  }

◆ setModelLinearized()

void Model::setModelLinearized ( bool  linearized = true)
inline

Definition at line 223 of file Model.h.

223  {
224  flagLinearized = linearized;
225  }

◆ setModelName()

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 50 of file Model.h.

51  {
52  this->name = name;
53  }

◆ setModelSUSY()

void Model::setModelSUSY ( )
inline

Definition at line 178 of file Model.h.

178  {
179  flagSUSYmodel = true;
180  }

◆ setModelTHDM()

void Model::setModelTHDM ( )
inline

Definition at line 186 of file Model.h.

186  {
187  flagTHDMmodel = true;
188  }

◆ setModelTHDMW()

void Model::setModelTHDMW ( )
inline

Definition at line 202 of file Model.h.

202  {
203  flagTHDMWmodel = true;
204  }

◆ setParameter()

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 GeneralTHDM, THDMW, GeorgiMachacek, FlavourWilsonCoefficient_DF2, FlavourWilsonCoefficient, myModel, myModel, CMFV, NPSMEFTd6, StandardModel, HiggsKigen, HiggsChiral, QCD, THDM, NPEpsilons, HiggsKvgenKfgen, HiggsKvKfgen, HiggsKvKf, NPZbbbar, NPEpsilons_pureNP, NPZbbbarLinearized, NPSTU, NPSTUZbbbarLR, NPSMEFT6dtopquark, and NPDF2.

◆ setSliced()

void Model::setSliced ( bool  Sliced)
inline

Definition at line 227 of file Model.h.

228  {
229  isSliced = Sliced;
230  }

◆ setUpdateError()

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 163 of file Model.h.

164  {
165  this->UpdateError = UpdateError;
166  }

◆ Update()

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 StandardModel, GeneralTHDM, QCD, THDMW, THDM, GeorgiMachacek, RealWeakEFTLFV, FlavourWilsonCoefficient, RealWeakEFTCC, NPbase, myModel, and myModel.

Member Data Documentation

◆ flagGMmodel

bool Model::flagGMmodel
private

A flag identifying the model as a GeorgiMachacek model.

Definition at line 273 of file Model.h.

◆ flagGTHDMmodel

bool Model::flagGTHDMmodel
private

A flag identifying the model as a GeneralTHDM model.

Definition at line 271 of file Model.h.

◆ flagLinearized

bool Model::flagLinearized
private

A flag to identify models where the NP contribution to Higgs observables is linearized.

Definition at line 274 of file Model.h.

◆ flagSUSYmodel

bool Model::flagSUSYmodel
private

A flag identifying the model as a SUSY model.

Definition at line 269 of file Model.h.

◆ flagTHDMmodel

bool Model::flagTHDMmodel
private

A flag identifying the model as a THDM model.

Definition at line 270 of file Model.h.

◆ flagTHDMWmodel

bool Model::flagTHDMWmodel
private

A flag identifying the model as a THDMW model.

Definition at line 272 of file Model.h.

◆ isSliced

bool Model::isSliced
protected

A boolean set to true if the current istance is a slice of an extended object.

Definition at line 264 of file Model.h.

◆ missingModelParameters

std::vector<std::string> Model::missingModelParameters
private

Definition at line 276 of file Model.h.

◆ missingModelParametersCount

unsigned int Model::missingModelParametersCount = 0
private

Definition at line 275 of file Model.h.

◆ ModelInitialized

bool Model::ModelInitialized
private

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

Definition at line 268 of file Model.h.

◆ ModelParamMap

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

Definition at line 262 of file Model.h.

◆ name

std::string Model::name
private

The name of the model.

Examples
myModel.cpp, and myModel.h.

Definition at line 267 of file Model.h.

◆ UpdateError

bool Model::UpdateError
protected

A boolean set to false if update is successful.

Examples
myModel.cpp.

Definition at line 254 of file Model.h.


The documentation for this class was generated from the following file:
Model::ModelInitialized
bool ModelInitialized
A boolean set to true if the model is successfully initialized.
Definition: Model.h:268
Model::missingModelParameters
std::vector< std::string > missingModelParameters
Definition: Model.h:276
Model::flagGTHDMmodel
bool flagGTHDMmodel
A flag identifying the model as a GeneralTHDM model.
Definition: Model.h:271
Model::flagTHDMWmodel
bool flagTHDMWmodel
A flag identifying the model as a THDMW model.
Definition: Model.h:272
Model::UpdateError
bool UpdateError
A boolean set to false if update is successful.
Definition: Model.h:254
Model::flagGMmodel
bool flagGMmodel
A flag identifying the model as a GeorgiMachacek model.
Definition: Model.h:273
Model::ModelParamMap
std::map< std::string, std::reference_wrapper< const double > > ModelParamMap
Definition: Model.h:262
Model::isSliced
bool isSliced
A boolean set to true if the current istance is a slice of an extended object.
Definition: Model.h:264
Model::flagSUSYmodel
bool flagSUSYmodel
A flag identifying the model as a SUSY model.
Definition: Model.h:269
Model::missingModelParametersCount
unsigned int missingModelParametersCount
Definition: Model.h:275
Model::name
std::string name
The name of the model.
Definition: Model.h:267
Model::flagTHDMmodel
bool flagTHDMmodel
A flag identifying the model as a THDM model.
Definition: Model.h:270
Model::flagLinearized
bool flagLinearized
A flag to identify models where the NP contribution to Higgs observables is linearized.
Definition: Model.h:274