|
R3BROOT
R3B analysis software
|
#include <R3BPDGConverter.h>
Public Types | |
| enum class | Type : uint8_t { basic , nuclear , invalid } |
Public Member Functions | |
| PDGConverter ()=default | |
| auto | get_pid (const std::string &name) -> int32_t |
| auto | get_name (int32_t pid) -> std::string |
| auto | reset () |
Static Public Member Functions | |
| 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. | |
Static Public Attributes | |
| static constexpr auto | nuclear_id_min = int32_t{ 1000000000 } |
| static constexpr auto | nuclear_id_max = int32_t{ 1009999990 } |
Private Member Functions | |
| void | register_entry (int32_t pid) |
| void | register_entry (const std::string &name) |
| auto | convert_basic_pid_to_name (int32_t pid) -> std::string |
Private Attributes | |
| std::unordered_map< int32_t, std::string > | pid_to_name_ |
| std::unordered_map< std::string, int32_t > | name_to_pid_ |
Definition at line 10 of file R3BPDGConverter.h.
|
strong |
| Enumerator | |
|---|---|
| basic | |
| nuclear | |
| invalid | |
Definition at line 13 of file R3BPDGConverter.h.
|
default |
|
private |
| auto R3B::PDGConverter::get_name | ( | int32_t | pid | ) | -> std::string |
Definition at line 132 of file R3BPDGConverter.cxx.
| auto R3B::PDGConverter::get_pid | ( | const std::string & | name | ) | -> int32_t |
Definition at line 126 of file R3BPDGConverter.cxx.
|
static |
To determine type from a name is a Type::nuclear, it has three criteria:
Otherwise the type is Type::basic
| pid | Pid of the basic particle/nucleus |
Definition at line 151 of file R3BPDGConverter.cxx.
|
static |
The type of the particle can be determined by its PDG ID in the way of:
| name | Name of the basic particle/nucleus |
Definition at line 138 of file R3BPDGConverter.cxx.
|
private |
Definition at line 187 of file R3BPDGConverter.cxx.
|
private |
Definition at line 177 of file R3BPDGConverter.cxx.
| auto R3B::PDGConverter::reset | ( | ) |
Definition at line 171 of file R3BPDGConverter.cxx.
|
private |
Definition at line 62 of file R3BPDGConverter.h.
|
staticconstexpr |
Definition at line 58 of file R3BPDGConverter.h.
|
staticconstexpr |
Definition at line 57 of file R3BPDGConverter.h.
|
private |
Definition at line 61 of file R3BPDGConverter.h.