class Gambit::PID_pair

[No description available] More…

#include <PID_pair.hpp>

Public Types

Name
typedef std::pair< int, int >iipair

Public Functions

Name
PID_pair()
Constructors.
PID_pair(int pid1_in, int pid2_in)
PID_pair(const iipair & PIDs_in)
virtual~PID_pair()
Detstructor.
voidset_pids(int pid1_in, int pid2_in)
Set PIDs, with sorting.
voidset_pids(const iipair & PIDs_in)
const iipair &PIDs() const
Get PIDs.
intpid1() const
intpid2() const
PID_paircc_pid_pair() const
Get the charge-conjugated PID pair.
boolis_antiparticle_pair() const
Check if
booloperator==(const PID_pair & rhs) const
booloperator!=(const PID_pair & rhs) const
booloperator<(const PID_pair & rhs) const
booloperator<=(const PID_pair & rhs) const
booloperator>(const PID_pair & rhs) const
booloperator>=(const PID_pair & rhs) const
voidreset()
Reset the PIDs.
std::stringstr() const
Get the PID pair as a string: “_”.

Detailed Description

class Gambit::PID_pair;

Simple class for holding a sorted pair of particle ID (PID) codes. This is essentially just a wrapper around a std::pair<int,int>, with forced ordering (first element <= second element) and some extra bells and whistles.

Public Types Documentation

typedef iipair

typedef std::pair<int,int> Gambit::PID_pair::iipair;

Public Functions Documentation

function PID_pair

inline PID_pair()

Constructors.

function PID_pair

inline PID_pair(
    int pid1_in,
    int pid2_in
)

function PID_pair

inline PID_pair(
    const iipair & PIDs_in
)

function ~PID_pair

inline virtual ~PID_pair()

Detstructor.

function set_pids

inline void set_pids(
    int pid1_in,
    int pid2_in
)

Set PIDs, with sorting.

function set_pids

inline void set_pids(
    const iipair & PIDs_in
)

function PIDs

inline const iipair & PIDs() const

Get PIDs.

function pid1

inline int pid1() const

function pid2

inline int pid2() const

function cc_pid_pair

inline PID_pair cc_pid_pair() const

Get the charge-conjugated PID pair.

function is_antiparticle_pair

inline bool is_antiparticle_pair() const

Check if |pid1| == |pid2|.

function operator==

inline bool operator==(
    const PID_pair & rhs
) const

Relational operators, simply using the relational operators for the underlying pair<int,int>

function operator!=

inline bool operator!=(
    const PID_pair & rhs
) const

function operator<

inline bool operator<(
    const PID_pair & rhs
) const

function operator<=

inline bool operator<=(
    const PID_pair & rhs
) const

function operator>

inline bool operator>(
    const PID_pair & rhs
) const

function operator>=

inline bool operator>=(
    const PID_pair & rhs
) const

function reset

inline void reset()

Reset the PIDs.

function str

inline std::string str() const

Get the PID pair as a string: “_”.


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