Documentation of MARTY
A Modern ARtificial Theoretical phYsicist
Data Structures | Typedefs | Enumerations | Functions
mty::lha Namespace Reference

Namespace containing all lha utilities. More...

Data Structures

struct  Comparator
 Helper class to define a comparison function for positions. More...
 
class  LHABlock
 LHABlock, containing a vector of LHAElement. More...
 
struct  LHAElement
 Corresponds to a line of a .lha file. More...
 
struct  LHAElementInputData
 Helper struct to define easily an object on which LHA data will apply. More...
 
class  LHAFileData
 Final class containing all the data coming from a LHA file. More...
 
struct  LHAInputData
 Helper struct to define a block of LHAElementInputData to make easy the definition of a modifiable block of expressions. More...
 
class  Reader
 Class the reads .lha file, parses them and create a LHAFileData containing all blocks with their elements. More...
 

Typedefs

using FloatType = long double
 Floating point type for LHA support. Long double is 64 bits usually.
 

Enumerations

enum  BlockType {
  BlockType::None,
  BlockType::SMINPUTS,
  BlockType::MINPAR,
  BlockType::EXTPAR,
  BlockType::MSQ2,
  BlockType::MSL2,
  BlockType::MSu2,
  BlockType::MSd2,
  BlockType::MSe2,
  BlockType::TUIN,
  BlockType::TDIN,
  BlockType::TEIN
}
 Enumeration of possible LHA blocks in MARTY. More...
 

Functions

void readFile (std::string const &fileName)
 Load a .lha file for built-in values in MARTY, in particular SM and MSSM inputs. More...
 
void readFile (std::ifstream &file)
 Load a .lha file for built-in values in MARTY, in particular SM and MSSM inputs. More...
 
bool applyLHA (LHAFileData const &data, std::string_view nameBlock, size_t id, csl::Expr &expr)
 Applies a lha element on an expression, calling csl::Abstract::setValue(). More...
 
bool applyLHA (LHAFileData const &data, std::string_view nameBlock, size_t i, size_t j, csl::Expr &expr)
 Applies a lha element on an expression, calling csl::Abstract::setValue(). More...
 
bool applyLHA (LHAFileData const &data, std::string_view nameBlock, csl::Expr &expr)
 Applies a matrix lha element on an expression, calling csl::Abstract::setValue(). More...
 
void applyLHAOnInputs (LHAFileData const &data, LHAInputData &inputs)
 Applies LHA data on a LHAInputData element. More...
 
LHAInputDatagetSMInput ()
 Returns all the input data for the SM. More...
 
LHAInputData getMINPARInput (int model)
 Returnrs all the input data for MINPAR block. More...
 
LHAInputData getEXTPARInput ()
 Returns the input data for the EXTPAR block. More...
 
LHAInputData getMatrixInput (csl::Expr &matrix, std::string const &name)
 Returns the input data for a matrix input. More...
 
std::vector< LHAInputData > & getMSSMInput (int model)
 Returns all the input data for the MSSM. More...
 
BlockType blockType (std::string_view name)
 Returns the BlockType corresponding to its name. The name must correspond to the enumeration name (see BlockType). More...
 
std::ostream & operator<< (std::ostream &out, BlockType type)
 Output stream overload for BlockType. More...
 
std::ostream & operator<< (std::ostream &out, LHAElement const &element)
 Displays a LHAElement in an output stream. More...
 
std::ostream & operator<< (std::ostream &out, LHABlock const &block)
 Displays a LHABlock in an output stream. More...
 
std::ostream & operator<< (std::ostream &out, LHAFileData const &data)
 Displays a LHAFileData in an output stream. More...
 
std::string tolower (std::string const &str)
 
int nSpace (size_t n)
 Returns the number of spaces needed to display correctly an integer. More...
 

Detailed Description

Namespace containing all lha utilities.

Enumeration Type Documentation

◆ BlockType

enum mty::lha::BlockType
strong

Enumeration of possible LHA blocks in MARTY.

Enumerator
None 

Invalid Block.

SMINPUTS 

Standard Model inputs.

MINPAR 

SUSY breaking input parameters.

EXTPAR 

Optional input parameters for non-minimal / non-universal models.

MSQ2 

Soft SUSY breaking left squark mass matrix.

MSL2 

Soft SUSY breaking left slepton mass matrix.

MSu2 

Soft SUSY breaking right up-squark mass matrix.

MSd2 

Soft SUSY breaking right down-squark mass matrix.

MSe2 

Soft SUSY breaking right selectron mass matrix.

TUIN 

Trilinear up-type coupling.

TDIN 

Trilinear down-type coupling.

TEIN 

Trilinear electron-type coupling.

Function Documentation

◆ applyLHA() [1/3]

bool mty::lha::applyLHA ( LHAFileData const &  data,
std::string_view  nameBlock,
size_t  id,
csl::Expr expr 
)

Applies a lha element on an expression, calling csl::Abstract::setValue().

Parameters
dataLHAFileData read from the file.
nameBlockName of the block in which the value appears.
idID of the value.
exprExpression, should be a literal (a csl::Constant typically).
Returns
True if the value of expr has been changed.
False else.

◆ applyLHA() [2/3]

bool mty::lha::applyLHA ( LHAFileData const &  data,
std::string_view  nameBlock,
size_t  i,
size_t  j,
csl::Expr expr 
)

Applies a lha element on an expression, calling csl::Abstract::setValue().

Parameters
dataLHAFileData read from the file.
nameBlockName of the block in which the value appears.
iRow position (starts from 1) of the matrix element.
jColumn position (starts from 1) of the matrix element.
exprExpression, should be a literal (a csl::Constant typically).
Returns
True if the value of expr has been changed.
False else.

◆ applyLHA() [3/3]

bool mty::lha::applyLHA ( LHAFileData const &  data,
std::string_view  nameBlock,
csl::Expr expr 
)

Applies a matrix lha element on an expression, calling csl::Abstract::setValue().

Parameters
dataLHAFileData read from the file.
nameBlockName of the block in which the value appears.
exprExpression, should be a csl::Matrix.
Returns
True if the values in expr have been changed.
False else.
Note
If no value is found for matrix, nothing happens and this function returns false. If at least one value is found, all other values are set to zero by default.

◆ applyLHAOnInputs()

void mty::lha::applyLHAOnInputs ( LHAFileData const &  data,
LHAInputData inputs 
)

Applies LHA data on a LHAInputData element.

Parameters
dataLHAFileData read from a .lha file.
inputsList of inputs for a given block.

◆ blockType()

BlockType mty::lha::blockType ( std::string_view  name)

Returns the BlockType corresponding to its name. The name must correspond to the enumeration name (see BlockType).

Parameters
nameName of the type.
Returns
The BlockType corresponding to name.

◆ getEXTPARInput()

LHAInputData mty::lha::getEXTPARInput ( )

Returns the input data for the EXTPAR block.

Returns
The input data for the EXTPAR block.

◆ getMatrixInput()

LHAInputData mty::lha::getMatrixInput ( csl::Expr matrix,
std::string const &  name 
)

Returns the input data for a matrix input.

Parameters
matrixMatrix associated to the LHA input.
nameName of the block defining the matrix.
Returns
The input data of the block named name, associated to the matric matrix.

◆ getMINPARInput()

LHAInputData mty::lha::getMINPARInput ( int  model)

Returnrs all the input data for MINPAR block.

Parameters
modelModel type (Block MODSEL, id = 0)
Returns
The input data for MINPAR block in the model model.

◆ getMSSMInput()

std::vector< LHAInputData > & mty::lha::getMSSMInput ( int  model)

Returns all the input data for the MSSM.

Parameters
modelModel integer corresponding to id 0 on MODSEL block.
Returns
A LHAInputData containing the various blocks of expressions for MSSM inputs.

◆ getSMInput()

LHAInputData & mty::lha::getSMInput ( )

Returns all the input data for the SM.

Returns
A LHAInputData containing the SMINPUTS block of expressions.

◆ nSpace()

int mty::lha::nSpace ( size_t  n)

Returns the number of spaces needed to display correctly an integer.

Parameters
nInteger to display.
Returns
std::ceil(std::log10(n)) >= 4 ? 10 : 5

◆ operator<<() [1/4]

std::ostream & mty::lha::operator<< ( std::ostream &  out,
BlockType  type 
)

Output stream overload for BlockType.

Parameters
outOutput stream.
typeBlockType to display.
Returns
A reference to out.

◆ operator<<() [2/4]

std::ostream & mty::lha::operator<< ( std::ostream &  out,
LHAElement const &  element 
)

Displays a LHAElement in an output stream.

Parameters
outOutput stream.
elementLHAElement to display.
Returns
A reference to out.

◆ operator<<() [3/4]

std::ostream & mty::lha::operator<< ( std::ostream &  out,
LHABlock const &  block 
)

Displays a LHABlock in an output stream.

Parameters
outOutput stream.
elementLHABlock to display.
Returns
A reference to out.

◆ operator<<() [4/4]

std::ostream & mty::lha::operator<< ( std::ostream &  out,
LHAFileData const &  data 
)

Displays a LHAFileData in an output stream.

Parameters
outOutput stream.
elementLHAFileData to display.
Returns
A reference to out.

◆ readFile() [1/2]

void mty::lha::readFile ( std::string const &  fileName)

Load a .lha file for built-in values in MARTY, in particular SM and MSSM inputs.

Reading this function will automatically set values for all constants appearing in expressions if you are using SM or MSSM (or more generally variables in mty::sm_input or mty::mssm_input namespaces).

Note
This function applies directly the file content on the expressions it knows. If you want to simply get the file data, consider using Reader::readFile() instead.
Parameters
fileNameName of the file to read.
See also
Reader, Reader::readFile()

◆ readFile() [2/2]

void mty::lha::readFile ( std::ifstream &  file)

Load a .lha file for built-in values in MARTY, in particular SM and MSSM inputs.

Reading this function will automatically set values for all constants appearing in expressions if you are using SM or MSSM (or more generally variables in mty::sm_input or mty::mssm_input namespaces).

Note
This function applies directly the file content on the expressions it knows. If you want to simply get the file data, consider using Reader::readFile() instead.
Parameters
fileInput file stream for the .lha file.
See also
Reader, Reader::readFile()