class Gambit::Models::partmap

[No description available]

Public Functions

Name
std::pair< str, int >get_antiparticle(std::pair< str, int > shortpr) const
std::pair< str, int >get_antiparticle(str name, int index) const
std::pair< int, int >get_antiparticle(std::pair< int, int > pdgpr) const
std::pair< int, int >get_antiparticle(int pdgcode, int context) const
boolhas_antiparticle(std::pair< str, int > shortpr) const
boolhas_antiparticle(str name, int index) const
boolhas_antiparticle(std::pair< int, int > pdgpr) const
boolhas_antiparticle(int pdgcode, int context) const
boolhas_spinx2(str long_name) const
Check if a particle has a spin (x2) entry, using the long name.
boolhas_spinx2(std::pair< int, int > pdgpr) const
Check if a particle has a spin (x2) entry, using the PDG code and context integer.
boolhas_spinx2(int pdg_code, int context) const
boolhas_spinx2(std::pair< str, int > shortpr) const
Check if a particle has a spin (x2) entry, using the short name and index.
boolhas_spinx2(str name, int index) const
intget_spinx2(std::pair< int, int > pdgpr) const
intget_spinx2(int pdg_code, int context) const
intget_spinx2(str long_name) const
intget_spinx2(std::pair< str, int > shortpr) const
intget_spinx2(str name, int index) const
boolhas_chargex3(str long_name) const
Check if a particle has a charge (x3) entry, using the long name.
boolhas_chargex3(std::pair< int, int > pdgpr) const
Check if a particle has a charge (x3) entry, using the PDG code and context integer.
boolhas_chargex3(int pdg_code, int context) const
boolhas_chargex3(std::pair< str, int > shortpr) const
Check if a particle has a charge (x3) entry, using the short name and index.
boolhas_chargex3(str name, int index) const
intget_chargex3(std::pair< int, int > pdgpr) const
intget_chargex3(int pdg_code, int context) const
intget_chargex3(str long_name) const
intget_chargex3(std::pair< str, int > shortpr) const
intget_chargex3(str name, int index) const
boolhas_color(str long_name) const
Check if a particle has a color entry, using the long name.
boolhas_color(std::pair< int, int > pdgpr) const
Check if a particle has a color entry, using the PDG code and context integer.
boolhas_color(int pdg_code, int context) const
boolhas_color(std::pair< str, int > shortpr) const
Check if a particle has a color entry, using the short name and index.
boolhas_color(str name, int index) const
intget_color(std::pair< int, int > pdgpr) const
intget_color(int pdg_code, int context) const
intget_color(str long_name) const
intget_color(std::pair< str, int > shortpr) const
intget_color(str name, int index) const
partmap()
Constructor.
voidadd(str long_name, std::pair< int, int > pdgpr, int spinx2, int chargex3, int color)
Add a new particle to the database.
voidadd_SM(str long_name, std::pair< int, int > pdgpr, int spinx2, int chargex3, int color)
Add a new Standard Model particle to the database.
voidadd_generic(str long_name, std::pair< int, int > pdgpr, int spinx2, int chargex3, int color)
Add a new generic particle class to the database.
voidadd_with_short_pair(str long_name, std::pair< int, int > pdgpr, std::pair< str, int > shortpr, int spinx2, int chargex3, int color)
Add a new particle to the database with a short name and an index.
voidadd_SM_with_short_pair(str long_name, std::pair< int, int > pdgpr, std::pair< str, int > shortpr, int spinx2, int chargex3, int color)
Add a new Standard Model particle to the database with a short name and an index.
std::pair< int, int >pdg_pair(str long_name) const
Retrieve the PDG code and context integer, from the long name.
std::pair< int, int >pdg_pair(str short_name, int i) const
Retrieve the PDG code and context integer, from the short name and index.
std::pair< int, int >pdg_pair(std::pair< str, int > shortpr) const
Retrieve the PDG code and context integer, from the short name and index pair.
strlong_name(str short_name, int i) const
Retrieve the long name, from the short name and index.
strlong_name(std::pair< int, int > pdgpr) const
Retrieve the long name, from the PDG code and context integer.
strlong_name(int pdg_code, int context) const
Retrieve the long name, from the PDG code and context integer.
std::pair< str, int >short_name_pair(str long_name) const
Retrieve the short name and index, from the long name.
std::pair< str, int >short_name_pair(std::pair< int, int > pdgpr) const
Retrieve the short name and index, from the PDG code and context integer.
std::pair< str, int >short_name_pair(int pdg_code, int context) const
Retrieve the short name and index, from the PDG code and context integer.
const std::vector< std::pair< int, int > > &get_SM_particles() const
Get a vector PDG codes and context integers of Standard Model particles in the database.
const std::vector< std::pair< int, int > > &get_generic_particles() const
Get a vector PDG codes and context integers of generic particle classes in the database.
boolhas_particle(str long_name) const
Check if a particle is in the database, using the long name.
boolhas_particle(str short_name, int i) const
Check if a particle is in the database, using the short name and index.
boolhas_particle(std::pair< str, int > shortpr) const
boolhas_particle(std::pair< int, int > pdgpr) const
Check if a particle is in the database, using the PDG code and context integer.
strget_antiparticle(str lname) const
Get the matching anti-particle long name for a particle in the database, using the long name.
boolhas_antiparticle(str long_name) const
Check if a particle has a matching anti-particle in the database, using the long name.
boolhas_short_name(str long_name) const
Check if a particle has a short name, using the long name.
boolhas_short_name(std::pair< int, int > pdgpr) const
Check if a particle has a short name, using the PDG code and context integer.
voidcheck_contents() const
For debugging: use to check the contents of the particle database.

Public Functions Documentation

function get_antiparticle

std::pair< str, int > get_antiparticle(
    std::pair< str, int > shortpr
) const

Get the matching anti-particle short name and index for a particle in the database, using the short name and index

function get_antiparticle

std::pair< str, int > get_antiparticle(
    str name,
    int index
) const

function get_antiparticle

std::pair< int, int > get_antiparticle(
    std::pair< int, int > pdgpr
) const

Get the matching anti-particle PDG code and index for a particle in the database, using the PDG code and index

Antiparticles are identified by having the opposite sign PDG code to a particle

Else assume particle is its own antiparticle (if this may not be true, use has_anti_particle to check explicitly for match)

function get_antiparticle

std::pair< int, int > get_antiparticle(
    int pdgcode,
    int context
) const

function has_antiparticle

bool has_antiparticle(
    std::pair< str, int > shortpr
) const

Check if a particle has a matching anti-particle in the database, using the short name and index

function has_antiparticle

bool has_antiparticle(
    str name,
    int index
) const

function has_antiparticle

bool has_antiparticle(
    std::pair< int, int > pdgpr
) const

Check if a particle has a matching anti-particle in the database, using the PDG code and context integer

Antiparticles are identified by having the opposite sign PDG code to a particle

function has_antiparticle

bool has_antiparticle(
    int pdgcode,
    int context
) const

function has_spinx2

bool has_spinx2(
    str long_name
) const

Check if a particle has a spin (x2) entry, using the long name.


Check if a particle has the spin (x2), using the long name

function has_spinx2

bool has_spinx2(
    std::pair< int, int > pdgpr
) const

Check if a particle has a spin (x2) entry, using the PDG code and context integer.

Check if a particle has the spin (x2), using the PDG code and context integer

function has_spinx2

bool has_spinx2(
    int pdg_code,
    int context
) const

function has_spinx2

bool has_spinx2(
    std::pair< str, int > shortpr
) const

Check if a particle has a spin (x2) entry, using the short name and index.

Check if a particle has the spin (x2), using short name and index

function has_spinx2

bool has_spinx2(
    str name,
    int index
) const

function get_spinx2

int get_spinx2(
    std::pair< int, int > pdgpr
) const

Get spin (x2) of a given particle, using the PDG code and context integer

Get spin of a given particle, using the PDG code and context integer

function get_spinx2

int get_spinx2(
    int pdg_code,
    int context
) const

function get_spinx2

int get_spinx2(
    str long_name
) const

Get spin (x2) of a given particle, using the long name

Get spin of a given particle, using the long name

function get_spinx2

int get_spinx2(
    std::pair< str, int > shortpr
) const

Get spin (x2) of a given particle, using the short name and index

Get spin of a given particle, using short name and index

function get_spinx2

int get_spinx2(
    str name,
    int index
) const

function has_chargex3

bool has_chargex3(
    str long_name
) const

Check if a particle has a charge (x3) entry, using the long name.

Check if a particle has the charge (x3), using the long name

function has_chargex3

bool has_chargex3(
    std::pair< int, int > pdgpr
) const

Check if a particle has a charge (x3) entry, using the PDG code and context integer.

Check if a particle has the charge (x3), using the PDG code and context integer

function has_chargex3

bool has_chargex3(
    int pdg_code,
    int context
) const

function has_chargex3

bool has_chargex3(
    std::pair< str, int > shortpr
) const

Check if a particle has a charge (x3) entry, using the short name and index.

Check if a particle has the charge (x3), using short name and index

function has_chargex3

bool has_chargex3(
    str name,
    int index
) const

function get_chargex3

int get_chargex3(
    std::pair< int, int > pdgpr
) const

Get charge (x3) of a given particle, using the PDG code and context integer

Get charge of a given particle, using the PDG code and context integer

function get_chargex3

int get_chargex3(
    int pdg_code,
    int context
) const

function get_chargex3

int get_chargex3(
    str long_name
) const

Get charge (x3) of a given particle, using the long name

Get charge of a given particle, using the long name

function get_chargex3

int get_chargex3(
    std::pair< str, int > shortpr
) const

Get charge (x3) of a given particle, using the short name and index

Get charge of a given particle, using short name and index

function get_chargex3

int get_chargex3(
    str name,
    int index
) const

function has_color

bool has_color(
    str long_name
) const

Check if a particle has a color entry, using the long name.

Check if a particle has color information, using the long name

function has_color

bool has_color(
    std::pair< int, int > pdgpr
) const

Check if a particle has a color entry, using the PDG code and context integer.

Check if a particle has color information, using the PDG code and context integer

function has_color

bool has_color(
    int pdg_code,
    int context
) const

function has_color

bool has_color(
    std::pair< str, int > shortpr
) const

Check if a particle has a color entry, using the short name and index.

Check if a particle has color information, using short name and index

function has_color

bool has_color(
    str name,
    int index
) const

function get_color

int get_color(
    std::pair< int, int > pdgpr
) const

Get color of a given particle, using the PDG code and context integer

function get_color

int get_color(
    int pdg_code,
    int context
) const

function get_color

int get_color(
    str long_name
) const

Get color of a given particle, using the long name

function get_color

int get_color(
    std::pair< str, int > shortpr
) const

Get color of a given particle, using the short name and index

Get color of a given particle, using short name and index

function get_color

int get_color(
    str name,
    int index
) const

function partmap

partmap()

Constructor.

function add

void add(
    str long_name,
    std::pair< int, int > pdgpr,
    int spinx2,
    int chargex3,
    int color
)

Add a new particle to the database.

function add_SM

void add_SM(
    str long_name,
    std::pair< int, int > pdgpr,
    int spinx2,
    int chargex3,
    int color
)

Add a new Standard Model particle to the database.

function add_generic

void add_generic(
    str long_name,
    std::pair< int, int > pdgpr,
    int spinx2,
    int chargex3,
    int color
)

Add a new generic particle class to the database.

function add_with_short_pair

void add_with_short_pair(
    str long_name,
    std::pair< int, int > pdgpr,
    std::pair< str, int > shortpr,
    int spinx2,
    int chargex3,
    int color
)

Add a new particle to the database with a short name and an index.

function add_SM_with_short_pair

void add_SM_with_short_pair(
    str long_name,
    std::pair< int, int > pdgpr,
    std::pair< str, int > shortpr,
    int spinx2,
    int chargex3,
    int color
)

Add a new Standard Model particle to the database with a short name and an index.

function pdg_pair

std::pair< int, int > pdg_pair(
    str long_name
) const

Retrieve the PDG code and context integer, from the long name.

function pdg_pair

std::pair< int, int > pdg_pair(
    str short_name,
    int i
) const

Retrieve the PDG code and context integer, from the short name and index.

function pdg_pair

std::pair< int, int > pdg_pair(
    std::pair< str, int > shortpr
) const

Retrieve the PDG code and context integer, from the short name and index pair.

function long_name

str long_name(
    str short_name,
    int i
) const

Retrieve the long name, from the short name and index.

function long_name

str long_name(
    std::pair< int, int > pdgpr
) const

Retrieve the long name, from the PDG code and context integer.

function long_name

str long_name(
    int pdg_code,
    int context
) const

Retrieve the long name, from the PDG code and context integer.

function short_name_pair

std::pair< str, int > short_name_pair(
    str long_name
) const

Retrieve the short name and index, from the long name.

function short_name_pair

std::pair< str, int > short_name_pair(
    std::pair< int, int > pdgpr
) const

Retrieve the short name and index, from the PDG code and context integer.

function short_name_pair

std::pair< str, int > short_name_pair(
    int pdg_code,
    int context
) const

Retrieve the short name and index, from the PDG code and context integer.

function get_SM_particles

const std::vector< std::pair< int, int > > & get_SM_particles() const

Get a vector PDG codes and context integers of Standard Model particles in the database.

Get a vector of PDG codes and context integers of Standard Model particles in the database.

function get_generic_particles

const std::vector< std::pair< int, int > > & get_generic_particles() const

Get a vector PDG codes and context integers of generic particle classes in the database.

Get a vector of PDG codes and context integers of generic particle classes in the database.

function has_particle

bool has_particle(
    str long_name
) const

Check if a particle is in the database, using the long name.

function has_particle

bool has_particle(
    str short_name,
    int i
) const

Check if a particle is in the database, using the short name and index.

function has_particle

bool has_particle(
    std::pair< str, int > shortpr
) const

function has_particle

bool has_particle(
    std::pair< int, int > pdgpr
) const

Check if a particle is in the database, using the PDG code and context integer.

function get_antiparticle

str get_antiparticle(
    str lname
) const

Get the matching anti-particle long name for a particle in the database, using the long name.

function has_antiparticle

bool has_antiparticle(
    str long_name
) const

Check if a particle has a matching anti-particle in the database, using the long name.

Check if a particle has a matching anti-particle in the database, using the long name Note: will throw an error if the particle itself is not in the database!

function has_short_name

bool has_short_name(
    str long_name
) const

Check if a particle has a short name, using the long name.

function has_short_name

bool has_short_name(
    std::pair< int, int > pdgpr
) const

Check if a particle has a short name, using the PDG code and context integer.

function check_contents

void check_contents() const

For debugging: use to check the contents of the particle database.


Updated on 2024-07-18 at 13:53:31 +0000