ATLAS Offline Software
Loading...
Searching...
No Matches
MC::DecodedPID Class Reference

Implementation of classification functions according to PDG2022. More...

#include <HepMCHelpers.h>

Inheritance diagram for MC::DecodedPID:
Collaboration diagram for MC::DecodedPID:

Public Member Functions

 DecodedPID (const int &p)
DecodedPID shift (const size_t n) const
const int & operator() (const size_t n) const
const int & last () const
const int & pid () const
int max_digit (const int m, const int n) const
int min_digit (const int m, const int n) const
size_t ndigits () const

Public Attributes

T1 first_type
 STL member.
T2 second_type
 STL member.

Detailed Description

Implementation of classification functions according to PDG2022.

https://pdg.lbl.gov/2023/reviews/rpp2022-rev-monte-carlo-numbering.pdf This code is also available at https://gitlab.cern.ch/averbyts/atlaspid

Definition at line 17 of file HepMCHelpers.h.

Constructor & Destructor Documentation

◆ DecodedPID()

MC::DecodedPID::DecodedPID ( const int & p)
inline

Definition at line 19 of file HepMCHelpers.h.

20{
21 template <class VTX>
22 auto particles_in (const VTX* p) { return p->particles_in(); }
23 template <class VTX>
24 auto particles_in (const std::shared_ptr<VTX>& p) { return p->particles_in(); }
25
auto particles_in(const VTX *p)

Member Function Documentation

◆ last()

const int & MC::DecodedPID::last ( ) const
inline

Definition at line 28 of file HepMCHelpers.h.

◆ max_digit()

int MC::DecodedPID::max_digit ( const int m,
const int n ) const
inline

Definition at line 30 of file HepMCHelpers.h.

◆ min_digit()

int MC::DecodedPID::min_digit ( const int m,
const int n ) const
inline

Definition at line 31 of file HepMCHelpers.h.

31{ return p->status() == 23;}

◆ ndigits()

size_t MC::DecodedPID::ndigits ( ) const
inline

Definition at line 32 of file HepMCHelpers.h.

◆ operator()()

const int & MC::DecodedPID::operator() ( const size_t n) const
inline

Definition at line 27 of file HepMCHelpers.h.

27{

◆ pid()

const int & MC::DecodedPID::pid ( ) const
inline

Definition at line 29 of file HepMCHelpers.h.

29{ return p->status() == 62 || p->status() == 52 || p->status() == 21 || p->status() == 22;}

◆ shift()

DecodedPID MC::DecodedPID::shift ( const size_t n) const
inline

Definition at line 26 of file HepMCHelpers.h.

Member Data Documentation

◆ first_type

T1 std::pair< T1, T2 >::first_type
inherited

STL member.

◆ second_type

T2 std::pair< T1, T2 >::second_type
inherited

STL member.


The documentation for this class was generated from the following file: