Documentation of MARTY
A Modern ARtificial Theoretical phYsicist
Static Public Member Functions | Static Private Member Functions
mty::JSONToHEP Class Reference

Reads a file in .json format containing data of a model and returns the corresponding Model object via its only static public function readModel. More...

#include <jsonToPhysics.h>

Static Public Member Functions

static std::unique_ptr< ModelreadModel (std::string const &nameFile)
 Reads a file in .json format containing data of a model and returns the corresponding Model object. More...
 

Static Private Member Functions

static std::unique_ptr< GaugereadGauge (JSON::Node *tree)
 Reads the gauge in the root node of the JSON tree and returns it. More...
 
static std::unique_ptr< FlavorreadFlavor (JSON::Node *tree)
 Reads the flavor in the root node of the JSON tree and returns it. More...
 
static std::vector< QuantumNumberreadQuantumNumbers (JSON::Node *tree)
 
static csl::Expr readGaugeCoupling (JSON::Node *couplingNode)
 Reads the gauge coupling in a group Node and returns the corresponding csl csl::Expr. More...
 
static std::vector< std::shared_ptr< QuantumFieldParent > > readField (JSON::Node *tree, Gauge *gauge, Flavor *flavor, Model *model, std::vector< QuantumNumber > const &qNumbers)
 Reads the fields of the model in the root Node of the JSON tree and returns it in the form of a std::vector of QuantumFieldParent*. The parents are newly allocated and only raw pointers are returned. More...
 
static std::vector< std::pair< std::string, JSON::Node * > > readYukawaNodes (JSON::Node *fields)
 
static csl::Expr interpretYukawaCoupling (Model *model, std::string const &nameScalar, JSON::Node *node)
 
static std::vector< int > stringToDinkinLabels (std::string const &str)
 Little helper function that converts a string to a vector of int, corresponding to the dinkin labels of a given representation. More...
 
static GaugeIrrep readIrrep (JSON::Node *node, Gauge *gauge)
 Reads the irreducible representation of a particle in its Node. More...
 
static FlavorIrrep readFlavorIrrep (JSON::Node *node, Flavor *flavor)
 Reads the irreducible representation of a particle in its Node. More...
 
static void readMass (JSON::Node *massNode, QuantumFieldParent *field)
 Reads the mass in a field Node and returns the corresponding csl csl::Expr. More...
 

Detailed Description

Reads a file in .json format containing data of a model and returns the corresponding Model object via its only static public function readModel.

Parameters
nameFileThe name of the .json file.
Returns
The Model filled with the data.

Member Function Documentation

◆ readField()

vector< shared_ptr< QuantumFieldParent > > mty::JSONToHEP::readField ( JSON::Node tree,
Gauge gauge,
Flavor flavor,
Model model,
std::vector< QuantumNumber > const &  qNumbers 
)
staticprivate

Reads the fields of the model in the root Node of the JSON tree and returns it in the form of a std::vector of QuantumFieldParent*. The parents are newly allocated and only raw pointers are returned.

Parameters
treeRoot Node of the file.
gaugePointer the the model's gauge to initialize the fields.
Returns
a std::vector of QuantumFieldParent* containing the particles.

◆ readFlavor()

unique_ptr< Flavor > mty::JSONToHEP::readFlavor ( JSON::Node tree)
staticprivate

Reads the flavor in the root node of the JSON tree and returns it.

Parameters
treePointer to to root Node.
Returns
A raw pointer to a newly allocated Flavor.

◆ readFlavorIrrep()

FlavorIrrep mty::JSONToHEP::readFlavorIrrep ( JSON::Node node,
Flavor flavor 
)
staticprivate

Reads the irreducible representation of a particle in its Node.

For each group, the set of dinkin labels (or numerator and denominator for U(1)) must be given. If not, the trivial representation is supposed for this group. The representation is then created at the gauge level.

Parameters
nodeNode of the representation.
gaugePointer to the gauge to initialize properly the representations.
Returns
A GaugeIrrep read in the file.

◆ readGauge()

unique_ptr< Gauge > mty::JSONToHEP::readGauge ( JSON::Node tree)
staticprivate

Reads the gauge in the root node of the JSON tree and returns it.

Parameters
treePointer to to root Node.
Returns
A raw pointer to a newly allocated Gauge.

◆ readGaugeCoupling()

csl::Expr mty::JSONToHEP::readGaugeCoupling ( JSON::Node couplingNode)
staticprivate

Reads the gauge coupling in a group Node and returns the corresponding csl csl::Expr.

Parameters
couplingNodePointer to the coupling Node.
Returns
The expression (aka csl::Expr) corresponding to the coupling.

◆ readIrrep()

GaugeIrrep mty::JSONToHEP::readIrrep ( JSON::Node node,
Gauge gauge 
)
staticprivate

Reads the irreducible representation of a particle in its Node.

For each group, the set of dinkin labels (or numerator and denominator for U(1)) must be given. If not, the trivial representation is supposed for this group. The representation is then created at the gauge level.

Parameters
nodeNode of the representation.
gaugePointer to the gauge to initialize properly the representations.
Returns
A GaugeIrrep read in the file.

◆ readMass()

void mty::JSONToHEP::readMass ( JSON::Node massNode,
QuantumFieldParent field 
)
staticprivate

Reads the mass in a field Node and returns the corresponding csl csl::Expr.

Parameters
massNodePointer to the mass Node.
Returns
The expression (aka csl::Expr) corresponding to the mass.

◆ readModel()

unique_ptr< Model > mty::JSONToHEP::readModel ( std::string const &  nameFile)
static

Reads a file in .json format containing data of a model and returns the corresponding Model object.

Parameters
nameFileThe name of the .json file.
Returns
The Model filled with the data.

◆ stringToDinkinLabels()

vector< int > mty::JSONToHEP::stringToDinkinLabels ( std::string const &  str)
staticprivate

Little helper function that converts a string to a vector of int, corresponding to the dinkin labels of a given representation.

Parameters
strString to convert.
Returns
a std::vector of int containing the labels.

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