Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
PoPI_baryon.cc
Go to the documentation of this file.
1/*
2# <<BEGIN-copyright>>
3# Copyright 2019, Lawrence Livermore National Security, LLC.
4# This file is part of the gidiplus package (https://github.com/LLNL/gidiplus).
5# gidiplus is licensed under the MIT license (see https://opensource.org/licenses/MIT).
6# SPDX-License-Identifier: MIT
7# <<END-copyright>>
8*/
9
10#include "PoPI.hpp"
11
12namespace PoPI {
13
14/*! \class Baryon
15 * This class represents **PoPs** baryon instance.
16 */
17
18/* *********************************************************************************************************//**
19 * Constructor that parses an **HAPI** instance to create a **PoPs** baryon node.
20 *
21 * @param a_node [in] The **HAPI::Node** to be parsed.
22 * @param a_DB [in] The **PoPI::Database:: instance to add the constructed **Baryon** to.
23 * @param a_parent [in] The parent suite that will contain *this*.
24 ***********************************************************************************************************/
25
26Baryon::Baryon( HAPI::Node const &a_node, Database *a_DB, LUPI_maybeUnused Database *a_parent ) :
28
29 int baryonIndex = -1;
30
31 if( baseId( ) == IDs::neutron ) {
32 baryonIndex = 0; }
33 if( baseId( ) == IDs::proton ) {
34 baryonIndex = 1;
35 }
36 if( baryonIndex != -1 ) setIntid( intidHelper( isAnti( ), Particle_class::baryon, baryonIndex ) );
37
38 addToDatabase( a_DB );
39}
40
41/* *********************************************************************************************************//**
42 ***********************************************************************************************************/
43
45
46}
47
48}
#define LUPI_maybeUnused
#define PoPI_baryonChars
Definition PoPI.hpp:47
virtual ~Baryon()
friend Baryon
Definition PoPI.hpp:675
std::size_t addToDatabase(Database *a_DB)
Definition PoPI_base.cc:95
Particle(HAPI::Node const &a_node, Particle_class a_class, std::string const &a_family, int a_hasNucleus=0)
bool isAnti() const
Definition PoPI.hpp:875
std::string const & baseId(void) const
Definition PoPI.hpp:873
Definition PoPI.hpp:28
int intidHelper(bool a_isAnti, Particle_class a_family, int a_SSSSSSS)
Definition PoPI_intId.cc:47
Particle_class
Definition PoPI.hpp:58
static std::string const neutron
Definition PoPI.hpp:164
static std::string const proton
Definition PoPI.hpp:165