#include <R3BPDGConverter.h>
|
static auto | get_type (const std::string &name) -> Type |
| Get the type of the particle from its name.
|
|
static auto | get_type (int32_t pid) -> Type |
| Get the type of the particle from its PDG ID.
|
|
Definition at line 10 of file R3BPDGConverter.h.
◆ Type
◆ PDGConverter()
R3B::PDGConverter::PDGConverter |
( |
| ) |
|
|
default |
◆ convert_basic_pid_to_name()
auto R3B::PDGConverter::convert_basic_pid_to_name |
( |
int32_t | pid | ) |
-> std::string |
|
private |
◆ get_name()
auto R3B::PDGConverter::get_name |
( |
int32_t | pid | ) |
-> std::string |
◆ get_pid()
auto R3B::PDGConverter::get_pid |
( |
const std::string & | name | ) |
-> int32_t |
◆ get_type() [1/2]
auto R3B::PDGConverter::get_type |
( |
const std::string & | name | ) |
-> Type |
|
static |
To determine type from a name is a Type::nuclear, it has three criteria:
- the name contains a dash "-"
- At least one letter after dash "-"
- At most two letters before dash "-"
Otherwise the type is Type::basic
- Parameters
-
pid | Pid of the basic particle/nucleus |
- Returns
- Type of the particle
Definition at line 151 of file R3BPDGConverter.cxx.
◆ get_type() [2/2]
auto R3B::PDGConverter::get_type |
( |
int32_t | pid | ) |
-> Type |
|
static |
The type of the particle can be determined by its PDG ID in the way of:
- Parameters
-
name | Name of the basic particle/nucleus |
- Returns
- Type of the particle
Definition at line 138 of file R3BPDGConverter.cxx.
◆ register_entry() [1/2]
void R3B::PDGConverter::register_entry |
( |
const std::string & | name | ) |
|
|
private |
◆ register_entry() [2/2]
void R3B::PDGConverter::register_entry |
( |
int32_t | pid | ) |
|
|
private |
◆ reset()
auto R3B::PDGConverter::reset |
( |
| ) |
|
◆ name_to_pid_
std::unordered_map<std::string, int32_t> R3B::PDGConverter::name_to_pid_ |
|
private |
◆ nuclear_id_max
auto R3B::PDGConverter::nuclear_id_max = int32_t{ 1009999990 } |
|
staticconstexpr |
◆ nuclear_id_min
auto R3B::PDGConverter::nuclear_id_min = int32_t{ 1000000000 } |
|
staticconstexpr |
◆ pid_to_name_
std::unordered_map<int32_t, std::string> R3B::PDGConverter::pid_to_name_ |
|
private |
The documentation for this class was generated from the following files: