class Gambit::Spectrum

“Standard Model” (low-energy) plus high-energy model container class

#include <spectrum.hpp>

Public Types

Name
typedef std::vector< YAML::sdd >mc_info
typedef std::vector< YAML::ssdd >mr_info

Public Functions

Name
Spectrum()
Default constructor.
Spectrum(const SubSpectrum & le, const SubSpectrum & he, const SMInputs & smi, const std::map< str, safe_ptr< const double > > * input_Param, const mc_info & mci, const mr_info & mri)
Construct new object, cloning the SubSpectrum objects supplied and taking possession of them.
Spectrum(SubSpectrum *const le, SubSpectrum *const he, const SMInputs & smi, const std::map< str, safe_ptr< const double > > * input_Param, const mc_info & mci, const mr_info & mri)
Spectrum(const SubSpectrum & he, const SMInputs & smi, const std::map< str, safe_ptr< const double > > * input_Param, const mc_info & mci, const mr_info & mri)
Construct new object, automatically creating an SMSimpleSpec as the LE subspectrum, and cloning the HE SubSpectrum object supplied and taking possession of it.
Spectrum(const Spectrum & other)
Spectrum &operator=(const Spectrum & other)
Spectrum(Spectrum && other)
Move constructor.
SubSpectrum &get_LE()
SubSpectrum &get_HE()
SMInputs &get_SMInputs()
const SubSpectrum &get_LE() const
const SubSpectrum &get_HE() const
const SMInputs &get_SMInputs() const
std::unique_ptr< SubSpectrum >clone_LE() const
std::unique_ptr< SubSpectrum >clone_HE() const
boolhas(const Par::Tags partype, const std::string & mass) const
doubleget(const Par::Tags partype, const std::string & mass) const
boolhas(const Par::Tags partype, const std::string & mass, const int index) const
doubleget(const Par::Tags partype, const std::string & mass, const int index) const
boolhas(const Par::Tags partype, const std::string & mass, const int index1, const int index2) const
doubleget(const Par::Tags partype, const std::string & mass, const int index1, const int index2) const
boolhas(const Par::Tags partype, const int pdg_code, const int context) const
PDB getter/checker overloads.
doubleget(const Par::Tags partype, const int pdg_code, const int context) const
boolhas(const Par::Tags partype, const std::pair< int, int > pdgpr) const
doubleget(const Par::Tags partype, const std::pair< int, int > pdgpr) const
boolhas(const Par::Tags partype, const std::pair< str, int > shortpr) const
doubleget(const Par::Tags partype, const std::pair< str, int > shortpr) const
doublesafeget(const Par::Tags partype, const std::string & mass) const
Getters which first check the sanity of the thing they are returning.
doublesafeget(const Par::Tags partype, const std::string & mass, const int index) const
doublesafeget(const Par::Tags partype, const int pdg_code, const int context) const
doublesafeget(const Par::Tags partype, const std::pair< int, int > pdgpr) const
doublesafeget(const Par::Tags partype, const std::pair< str, int > shortpr) const
doubleWolf2V_ud(double l, double A, double rhobar, double etabar)
CKM Wolfenstein –> V_ud standard parameterisation convertor.
doubleWolf2V_us(double l, double A, double rhobar, double etabar)
CKM Wolfenstein –> V_us standard parameterisation convertor.
std::complex< double >Wolf2V_ub(double l, double A, double rhobar, double etabar)
CKM Wolfenstein –> V_ub standard parameterisation convertor.
std::complex< double >Wolf2V_cd(double l, double A, double rhobar, double etabar)
CKM Wolfenstein –> V_cd standard parameterisation convertor.
std::complex< double >Wolf2V_cs(double l, double A, double rhobar, double etabar)
CKM Wolfenstein –> V_cs standard parameterisation convertor.
doubleWolf2V_cb(double l, double A, double rhobar, double etabar)
CKM Wolfenstein –> V_cb standard parameterisation convertor.
std::complex< double >Wolf2V_td(double l, double A, double rhobar, double etabar)
CKM Wolfenstein –> V_td standard parameterisation convertor.
std::complex< double >Wolf2V_ts(double l, double A, double rhobar, double etabar)
CKM Wolfenstein –> V_ts standard parameterisation convertor.
doubleWolf2V_tb(double l, double A, double rhobar, double etabar)
CKM Wolfenstein –> V_tb standard parameterisation convertor.
voidRunBothToScale(double scale)
voidcheck_mass_cuts()
Check the that the spectrum satisifies any mass cuts requested from the yaml file.
SLHAstructgetSLHAea(int slha_version) const
voidwriteSLHAfile(int slha_version, const str & filename) const
Output spectrum contents as an SLHA file, using getSLHAea.
voiddrop_SLHAs_if_requested(const safe_ptr< Options > & runOptions, const str & default_name)
Helper function to drop SLHA files.
const std::map< int, int > &PDG_translator() const
PDG code translation map, for special cases where an SLHA file has been read in and the PDG codes changed.

Friends

Name
voidswap(Spectrum & first, Spectrum & second)
Friend function: swap resources of two Spectrum objects.

Public Types Documentation

typedef mc_info

typedef std::vector<YAML::sdd> Gambit::Spectrum::mc_info;

Typedefs for making it easier to manipulate mass cut and mass ratio cut info.

typedef mr_info

typedef std::vector<YAML::ssdd> Gambit::Spectrum::mr_info;

Public Functions Documentation

function Spectrum

Spectrum()

Default constructor.

Constructors/destructors.

Constructors/Destructors Need custom copy and move constructors plus copy-assignment operator in order to manage the unique_ptrs properly.

Default constructor

function Spectrum

Spectrum(
    const SubSpectrum & le,
    const SubSpectrum & he,
    const SMInputs & smi,
    const std::map< str, safe_ptr< const double > > * input_Param,
    const mc_info & mci,
    const mr_info & mri
)

Construct new object, cloning the SubSpectrum objects supplied and taking possession of them.

function Spectrum

Spectrum(
    SubSpectrum *const le,
    SubSpectrum *const he,
    const SMInputs & smi,
    const std::map< str, safe_ptr< const double > > * input_Param,
    const mc_info & mci,
    const mr_info & mri
)

Construct new object, wrapping existing SubSpectrum objects Make sure the original objects don’t get deleted before this wrapper does!

function Spectrum

Spectrum(
    const SubSpectrum & he,
    const SMInputs & smi,
    const std::map< str, safe_ptr< const double > > * input_Param,
    const mc_info & mci,
    const mr_info & mri
)

Construct new object, automatically creating an SMSimpleSpec as the LE subspectrum, and cloning the HE SubSpectrum object supplied and taking possession of it.

Construct new object, automatically creating an SMSimpleSpec as the LE subspectrum, and cloning the HE SubSpectrum object supplied and taking possession of it. (won’t make a version of this taking a pointer, since this is an “advanced” task, let people use the full contructor to do it.)

function Spectrum

Spectrum(
    const Spectrum & other
)

Copy constructor, clones SubSpectrum objects. Make a non-const copy in order to use e.g. RunBothToScale function.

function operator=

Spectrum & operator=(
    const Spectrum & other
)

Copy-assignment Using “copy-and-swap” idiom

function Spectrum

Spectrum(
    Spectrum && other
)

Move constructor.

function get_LE

SubSpectrum & get_LE()

Standard SubSpectrum getters Return references to internal data members. Make sure original Spectrum object doesn’t get destroyed before you finish using these or you will cause a segfault.

Standard getters Return references to internal data members. Make sure original Spectrum object doesn’t get destroyed before you finish using these or you will cause a segfault.

function get_HE

SubSpectrum & get_HE()

function get_SMInputs

SMInputs & get_SMInputs()

function get_LE

const SubSpectrum & get_LE() const

function get_HE

const SubSpectrum & get_HE() const

function get_SMInputs

const SMInputs & get_SMInputs() const

function clone_LE

std::unique_ptr< SubSpectrum > clone_LE() const

Clone SubSpectrum getters To clone whole object, just use copy constructor.

Clone getters Note: If you want to clone the whole Spectrum object, just use copy constructor, not these.

function clone_HE

std::unique_ptr< SubSpectrum > clone_HE() const

function has

bool has(
    const Par::Tags partype,
    const std::string & mass
) const

Pole mass getters “Shortcut” getters to access pole masses in hosted SubSpectrum objects. HE object given higher priority; if no match found, LE object will be checked. If still no match, error is thrown.

Pole mass getters/checkers “Shortcut” getters/checkers to access pole masses in hosted SubSpectrum objects. HE object given higher priority; if no match found, LE object will be checked. If still no match, error is thrown. TODO: These currently work for anything! Need to restrict them to only allow access to pole masses and their estimated uncertainties Also need to change error messages etc, plus the PDG overloads

function get

double get(
    const Par::Tags partype,
    const std::string & mass
) const

function has

bool has(
    const Par::Tags partype,
    const std::string & mass,
    const int index
) const

function get

double get(
    const Par::Tags partype,
    const std::string & mass,
    const int index
) const

function has

bool has(
    const Par::Tags partype,
    const std::string & mass,
    const int index1,
    const int index2
) const

function get

double get(
    const Par::Tags partype,
    const std::string & mass,
    const int index1,
    const int index2
) const

function has

bool has(
    const Par::Tags partype,
    const int pdg_code,
    const int context
) const

PDB getter/checker overloads.

function get

double get(
    const Par::Tags partype,
    const int pdg_code,
    const int context
) const

function has

bool has(
    const Par::Tags partype,
    const std::pair< int, int > pdgpr
) const

function get

double get(
    const Par::Tags partype,
    const std::pair< int, int > pdgpr
) const

function has

bool has(
    const Par::Tags partype,
    const std::pair< str, int > shortpr
) const

function get

double get(
    const Par::Tags partype,
    const std::pair< str, int > shortpr
) const

function safeget

double safeget(
    const Par::Tags partype,
    const std::string & mass
) const

Getters which first check the sanity of the thing they are returning.

function safeget

double safeget(
    const Par::Tags partype,
    const std::string & mass,
    const int index
) const

function safeget

double safeget(
    const Par::Tags partype,
    const int pdg_code,
    const int context
) const

function safeget

double safeget(
    const Par::Tags partype,
    const std::pair< int, int > pdgpr
) const

function safeget

double safeget(
    const Par::Tags partype,
    const std::pair< str, int > shortpr
) const

function Wolf2V_ud

static double Wolf2V_ud(
    double l,
    double A,
    double rhobar,
    double etabar
)

CKM Wolfenstein –> V_ud standard parameterisation convertor.

CKM Wolfenstein (lambda, A, rhobar, etabar) –> V_qq standard parameterisation convertors

function Wolf2V_us

static double Wolf2V_us(
    double l,
    double A,
    double rhobar,
    double etabar
)

CKM Wolfenstein –> V_us standard parameterisation convertor.

function Wolf2V_ub

static std::complex< double > Wolf2V_ub(
    double l,
    double A,
    double rhobar,
    double etabar
)

CKM Wolfenstein –> V_ub standard parameterisation convertor.

function Wolf2V_cd

static std::complex< double > Wolf2V_cd(
    double l,
    double A,
    double rhobar,
    double etabar
)

CKM Wolfenstein –> V_cd standard parameterisation convertor.

function Wolf2V_cs

static std::complex< double > Wolf2V_cs(
    double l,
    double A,
    double rhobar,
    double etabar
)

CKM Wolfenstein –> V_cs standard parameterisation convertor.

function Wolf2V_cb

static double Wolf2V_cb(
    double l,
    double A,
    double rhobar,
    double etabar
)

CKM Wolfenstein –> V_cb standard parameterisation convertor.

function Wolf2V_td

static std::complex< double > Wolf2V_td(
    double l,
    double A,
    double rhobar,
    double etabar
)

CKM Wolfenstein –> V_td standard parameterisation convertor.

function Wolf2V_ts

static std::complex< double > Wolf2V_ts(
    double l,
    double A,
    double rhobar,
    double etabar
)

CKM Wolfenstein –> V_ts standard parameterisation convertor.

function Wolf2V_tb

static double Wolf2V_tb(
    double l,
    double A,
    double rhobar,
    double etabar
)

CKM Wolfenstein –> V_tb standard parameterisation convertor.

function RunBothToScale

void RunBothToScale(
    double scale
)

Linked running Only possible with non-const object

Overloads for PDG types These just convert the types and then call the properly defined functions Linked running Only possible with non-const object

function check_mass_cuts

void check_mass_cuts()

Check the that the spectrum satisifies any mass cuts requested from the yaml file.

function getSLHAea

SLHAstruct getSLHAea(
    int slha_version
) const

SLHAea object getter First constructs an SLHAea object from the SMINPUTS object, then adds the info from the LE subspectrum (if possible), followed by the HE subspectrum (if possible). Any duplicate entries are overwritten at each step, so HE takes precendence over LE, and LE takes precedence over SMINPUTS.

function writeSLHAfile

void writeSLHAfile(
    int slha_version,
    const str & filename
) const

Output spectrum contents as an SLHA file, using getSLHAea.

function drop_SLHAs_if_requested

void drop_SLHAs_if_requested(
    const safe_ptr< Options > & runOptions,
    const str & default_name
)

Helper function to drop SLHA files.

function PDG_translator

const std::map< int, int > & PDG_translator() const

PDG code translation map, for special cases where an SLHA file has been read in and the PDG codes changed.

Friends

friend swap

friend void swap(
    Spectrum & first,

    Spectrum & second
);

Friend function: swap resources of two Spectrum objects.

Swap resources of two Spectrum objects Note: Not a member function! This is an external function which is a friend of the Spectrum class.


Updated on 2023-06-26 at 21:36:51 +0000