Commit 03da719d authored by Grégoire Uhlrich's avatar Grégoire Uhlrich
Browse files

gluino - sqR - qR corrected

parent 656d64f3
......@@ -275,7 +275,6 @@ class MSSM_Model: public mty::Model, protected MSSM_Data {
public:
MSSM_Model(
std::string const &flhaFile = "",
std::string const &saveFile = "",
bool init = true
);
......@@ -326,7 +325,6 @@ protected:
void initQuarticSQuarkSLeptons();
void gatherMSSMInputs();
void readFLHA(std::ifstream &flha);
void applyValues();
csl::Expr applyValues(csl::Expr tensor);
......@@ -354,7 +352,6 @@ protected:
private:
std::string flhaFile;
std::string saveFile;
};
......@@ -362,7 +359,6 @@ class MSSM_HEM: public MSSM_Model {
public:
MSSM_HEM(
std::string const &flhaFile = "",
std::string const &saveFile = ""
);
};
......
......@@ -19,18 +19,15 @@ namespace mty {
NMFV_Model(
std::vector<MixingInfo> const &mixings,
std::string const &slhaFile = "",
std::string const &saveFile = ""
);
NMFV_Model(
std::initializer_list<MixingInfo> mixings,
std::string const &slhaFile = "",
std::string const &saveFile = ""
)
:NMFV_Model(
std::vector<MixingInfo>(mixings),
slhaFile,
saveFile
)
{
......
......@@ -32,7 +32,6 @@ class PMSSM_Model: public MSSM_Model {
public:
PMSSM_Model(
std::string const &slhaFile = "",
std::string const &saveFile = "",
bool init = true
);
......
......@@ -44,7 +44,7 @@ struct DefaultComparator
template<class Comparable>
struct DefaultHardComparator {
bool operator()(Comparable const &A, Comparable const &B) const {
bool operator()(Comparable const &, Comparable const &) const {
return false;
}
};
......
// This file is part of MARTY.
//
// MARTY is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// MARTY is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with MARTY. If not, see <https://www.gnu.org/licenses/>.
/*!
* @file
* @author Grégoire Uhlrich
* @version 1.3
* \brief
*/
#ifndef FLHA_H_INCLUDED
#define FLHA_H_INCLUDED
#include <csl.h>
#include "SM.h"
namespace mty::flha {
class InputFlag {
public:
InputFlag(size_t t_id)
:id(t_id),
target(CSL_UNDEF)
{
}
InputFlag(size_t t_id,
csl::Expr const& t_target)
:id(t_id),
target(t_target)
{
}
size_t getID() const
{
return id;
}
void readValue(long double value) const
{
if (target) {
if (target == sm_input::alpha_em)
target->setValue(1L / value);
else
target->setValue(value);
}
}
void readValue(long double value,
std::vector<int> const& pos) const
{
if (pos.empty())
readValue(value);
else if (target)
target->getArgument(pos)->setValue(value);
}
bool operator==(InputFlag const& other) const
{
return id == other.id;
}
bool operator!=(InputFlag const& other) const
{
return not (*this == other);
}
bool operator==(size_t t_id) const
{
return id == t_id;
}
bool operator!=(size_t t_id) const
{
return not (*this == t_id);
}
bool operator<(InputFlag const& other) const
{
return id < other.id;
}
bool operator>(InputFlag const& other) const
{
return other < *this;
}
bool operator<=(InputFlag const& other) const
{
return *this < other or id == other.id;
}
bool operator>=(InputFlag const& other) const
{
return other <= *this;
}
protected:
size_t id;
csl::Expr target;
};
} // End of namespace flha
#endif
// This file is part of MARTY.
//
// MARTY is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// MARTY is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with MARTY. If not, see <https://www.gnu.org/licenses/>.
/**
* @file flhaBlock.h
* @brief Containing mty::flha::Block, allowing to define a lha block (MINPAR,
* EXTPAR etc) with the corresponding variables modified when reading a file.
* @author Grégoire Uhlrich
* @version 1.3
* @date 2020-08-31
*/
#ifndef FLHABLOCK_H_INCLUDED
#define FLHABLOCK_H_INCLUDED
#include "flha.h"
#include "SM.h"
#include "MSSM.h"
namespace mty::flha {
/**
* @brief Enumeration of possible lha block names in MARTY.
*/
enum BlockName {
None,
SMINPUTS,
MINPAR,
EXTPAR,
MSQ2,
MSL2,
MSu2,
MSd2,
MSe2,
TUIN,
TDIN,
TEIN
};
/**
* @brief Converts a std::string to a BlockName.
*
* @param block Namem of the block.
*
* @return The enumeration element of BlockName corresponding to \b block.
*/
BlockName stringToBlock(std::string const& block);
/**
* @brief Type definition. A block is composed of a name, and a set of
* InputFlag for all possible variables in this block.
*/
using Block = std::pair<BlockName, std::set<InputFlag>>;
std::vector<Block> initFLHAFlags();
} // End of namespace mty
#endif
// This file is part of MARTY.
//
// MARTY is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// MARTY is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with MARTY. If not, see <https://www.gnu.org/licenses/>.
/**
* @file flhaReader.h
* @brief File containing the utility class able to read a LesHouches Accord
* file (.lha), in particular for SM and SUSY parameters.
* @author Grégoire Uhlrich
* @version 1.3
* @date 2020-08-31
*/
#ifndef FLHA_READER_INCLUDED
#define FLHA_READER_INCLUDED
#include "flha.h"
#include "flhaBlock.h"
#include <list>
/**
* @brief Namespace containing all lha utilities.
*/
namespace mty::flha {
/**
* @brief This class is purely static (no instance can be created) and
* reads a lha file, using the mty::flha::InputFlag to modify directly,
* as a side-effect, the values of the corresponding quantities.
*/
class Reader {
public:
/**
* @brief Reads a lha file from a file name.
*
* @param fileName Name of the lha file to read.
*/
static
void readFLHA(std::string const& fileName);
/**
* @brief Reads a lha file from a file stream.
*
* @param file Input file stream corresponding to the lha file.
*/
static
void readFLHA(std::ifstream &file);
private:
static
std::list<std::string> parseLine(std::ifstream& in);
static
void interpretLine(std::list<std::string> line);
static
void setValue(size_t id,
long double value,
std::vector<int> const& indices);
private:
static inline size_t indexBlock = size_t(-1);
static inline std::vector<Block> blocks = initFLHAFlags();
};
} // namespace flha
#endif
......@@ -52,8 +52,6 @@
#include "gauge.h"
#include "group.h"
#include "jsonToPhysics.h"
#include "flha.h"
#include "flhaReader.h"
#include "mtylibrary.h"
#include "lhaData.h"
#include "lha.h"
......
......@@ -23,5 +23,5 @@
*/
#pragma once
#define MARTY_VERSION 1.3
#define MARTY_VERSION_STR "_v1_3"
#define MARTY_VERSION 1.5
#define MARTY_VERSION_STR "_v1_5"
// This file is part of MARTY.
//
// MARTY is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// MARTY is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with MARTY. If not, see <https://www.gnu.org/licenses/>.
/*!
* @file
* @author Grégoire Uhlrich
* @version 1.3
* \brief
*/
#ifndef SCALAR_DOT_H_INCLUDED
#define SCALAR_DOT_H_INCLUDED
#include <csl.h>
namespace mty {
class ScalarDot: public csl::AbstractDuoFunc {
public:
ScalarDot() = default;
ScalarDot(csl::Expr const& A,
csl::Expr const& B);
void print(int mode = 0,
std::ostream& out = std::cout,
bool lib = false) const override;
std::string printLaTeX(int mode = 0) const override;
csl::unique_Expr copy_unique() const override;
csl::Expr refresh() const override;
csl::Expr deepCopy() const override;
csl::Expr deepRefresh() const override;
std::optional<csl::Expr> evaluate(
csl::eval::mode user_mode = csl::eval::base) const override;
bool isIndexed() const override;
csl::IndexStructure getIndexStructure() const override;
bool operator==(csl::Expr_info other) const override;
};
inline csl::allocator<ScalarDot> alloc_scalardot;
csl::Expr scalardot_s(csl::Expr const& impulsion,
csl::Expr const& mass);
}
#endif
// This file is part of MARTY.
//
// MARTY is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// MARTY is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with MARTY. If not, see <https://www.gnu.org/licenses/>.
/*!
* @file slashed.h
* @author Grégoire Uhlrich
* @version 1.3
* \brief Contains the slashed object entering expressions.
*/
#pragma once
#include "diracology.h"
namespace mty {
class Slashed: public csl::TensorElement {
public:
Slashed();
~Slashed() override;
bool isIndexed() const override { return true; }
bool empty() const override {
return argument.empty();
}
size_t size() const override {
return argument.size();
}
csl::Expr const &getArgument(int i = 0) const override {
return argument[i];
}
csl::Expr& getArgument(int i = 0) override {
return argument[i];
}
csl::Expr const &operator[](int i) const override {
return argument[i];
}
csl::Expr &operator[](int i) override {
return argument[i];
}
std::vector<csl::Expr> const &getVectorArgument() const override {
return argument;
}
void setArgument(const csl::Expr& t_argument, int iArg=0) override {
argument[iArg] = t_argument;
}
void setVectorArgument(const csl::vector_expr& t_argument) override {
argument = t_argument;
}
void print(int mode = 0,
std::ostream& out = std::cout,
bool lib = false) const override;
std::string printLaTeX(int mode = 0) const override;
void printLib(int mode,
std::ostream& out) const;
csl::LibDependency getLibDependency() const override;
std::optional<csl::Expr> evaluate(csl::eval::mode user_mode
= csl::eval::base) const override;
csl::IndexStructure getIndexStructure() const override;
csl::unique_Expr copy_unique() const override;
csl::Expr deepCopy() const override;
csl::Expr deepRefresh() const override;
bool operator==(csl::Expr_info other) const override;
bool operator<(csl::Expr_info other) const override;
csl::Expr getDivergentFactor() const;
protected:
std::vector<csl::Expr> argument;
};
}
This diff is collapsed.
......@@ -43,116 +43,4 @@ namespace mty {
} // End of namespace mty
// Old way
namespace mty {
enum class OperatorType {
Magnetic,
ChromoMagnetic,
};
std::ostream &operator<<(
std::ostream &out,
OperatorType type
);
namespace OperatorParser {
inline mty::DiracSpace const *diracSpace = &mty::dirac4;
inline csl::Space const *spaceTime = &csl::Minkowski;
struct Requirement {
int spin;
int conjugation;
};
struct Insertion {
mty::QuantumField field;
csl::Tensor momentum;
bool verifies(Requirement const &req) const {
return field.getQuantumParent()->getSpinDimension() - 1 == req.spin
and (field.isComplexConjugate() == req.conjugation
or req.conjugation == -1);
}
};
csl::Expr getMagneticCoefficient(
std::vector<Wilson> const &coefs,
Chirality chirality
);
csl::Expr get_V_x_V_Coefficient(
std::vector<Wilson> const &coefs
);
csl::Expr build_V_x_V(
Insertion const &psi1L,
Insertion const &psi1R,
Insertion const &psi2L,
Insertion const &psi2R
);
csl::Expr get_V_x_V5_Coefficient(
std::vector<Wilson> const &coefs
);
csl::Expr build_V_x_V5(
Insertion const &psi1L,
Insertion const &psi1R,
Insertion const &psi2L,
Insertion const &psi2R
);
csl::Expr get_V5_x_V_Coefficient(
std::vector<Wilson> const &coefs
);
csl::Expr build_V5_x_V(
Insertion const &psi1L,
Insertion const &psi1R,
Insertion const &psi2L,
Insertion const &psi2R
);
csl::Expr get_V5_x_V5_Coefficient(
std::vector<Wilson> const &coefs