Version: SMASH-1.8
decaymodes.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2013-2018
3
* SMASH Team
4
*
5
* GNU General Public License (GPLv3 or later)
6
*/
7
#ifndef SRC_INCLUDE_DECAYMODES_H_
8
#define SRC_INCLUDE_DECAYMODES_H_
9
10
#include <stdexcept>
11
#include <string>
12
#include <utility>
13
#include <vector>
14
15
#include "
processbranch.h
"
16
17
namespace
smash
{
18
29
class
DecayModes
{
30
public
:
39
void
add_mode
(
ParticleTypePtr
mother,
double
ratio,
int
L,
40
ParticleTypePtrList particle_types);
41
47
void
add_mode
(DecayBranchPtr branch) {
48
decay_modes_
.push_back(std::move(branch));
49
}
50
57
bool
renormalize
(
const
std::string &name);
58
60
bool
is_empty
()
const
{
return
decay_modes_
.empty(); }
61
63
const
DecayBranchList &
decay_mode_list
()
const
{
return
decay_modes_
; }
64
86
static
void
load_decaymodes
(
const
std::string &input);
87
97
static
DecayType
*
get_decay_type
(
ParticleTypePtr
mother,
98
ParticleTypePtrList particle_types,
int
L);
99
101
struct
InvalidDecay
:
public
std::invalid_argument {
102
using
std::invalid_argument::invalid_argument;
103
};
105
struct
LoadFailure
:
public
std::runtime_error {
106
using
std::runtime_error::runtime_error;
107
};
109
struct
MissingDecays
:
public
LoadFailure
{
110
using
LoadFailure::LoadFailure;
111
};
113
struct
ReferencedParticleNotFound
:
public
LoadFailure
{
114
using
LoadFailure::LoadFailure;
115
};
116
117
private
:
123
DecayBranchList
decay_modes_
;
124
126
friend
const
DecayModes
&
ParticleType::decay_modes
()
const
;
127
132
static
std::vector<DecayModes> *
all_decay_modes
;
133
};
134
135
}
// namespace smash
136
137
#endif // SRC_INCLUDE_DECAYMODES_H_
smash
Definition:
action.h:24
smash::DecayModes::load_decaymodes
static void load_decaymodes(const std::string &input)
Loads the DecayModes map as described in the input string.
Definition:
decaymodes.cc:164
smash::DecayModes::decay_modes_
DecayBranchList decay_modes_
Vector of decay modes.
Definition:
decaymodes.h:123
processbranch.h
smash::DecayType
DecayType is the abstract base class for all decay types.
Definition:
decaytype.h:23
smash::DecayModes::renormalize
bool renormalize(const std::string &name)
Renormalize the branching ratios to add up to 1.
Definition:
decaymodes.cc:99
smash::DecayModes::decay_mode_list
const DecayBranchList & decay_mode_list() const
Definition:
decaymodes.h:63
smash::DecayModes::get_decay_type
static DecayType * get_decay_type(ParticleTypePtr mother, ParticleTypePtrList particle_types, int L)
Retrieve a decay type.
Definition:
decaymodes.cc:44
smash::DecayModes::ReferencedParticleNotFound
Definition:
decaymodes.h:113
smash::ParticleType::decay_modes
const DecayModes & decay_modes() const
Definition:
particletype.cc:428
smash::DecayModes::InvalidDecay
Definition:
decaymodes.h:101
smash::ParticleTypePtr
Definition:
particletype.h:663
smash::DecayModes::LoadFailure
Definition:
decaymodes.h:105
smash::DecayModes::add_mode
void add_mode(DecayBranchPtr branch)
Add a decay mode from an already existing decay branch.
Definition:
decaymodes.h:47
smash::DecayModes::is_empty
bool is_empty() const
Definition:
decaymodes.h:60
smash::DecayModes
Definition:
decaymodes.h:29
smash::DecayModes::add_mode
void add_mode(ParticleTypePtr mother, double ratio, int L, ParticleTypePtrList particle_types)
Add a decay mode using all necessary information.
Definition:
decaymodes.cc:30
smash::DecayModes::all_decay_modes
static std::vector< DecayModes > * all_decay_modes
A list of all DecayModes objects using the same indexing as all_particle_types.
Definition:
decaymodes.h:132
smash::DecayModes::MissingDecays
Definition:
decaymodes.h:109
src
include
smash
decaymodes.h
Impressum
Data privacy protection
Generated on Tue Apr 7 2020 13:50:10 for SMASH by
Doxygen
1.8.16