Geant4
11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
PoPI_lepton.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
12
namespace
PoPI
{
13
14
#define PoPI_generationChars "generation"
15
16
/*! \class Lepton
17
* This class represents **PoPs** lepton instance.
18
*/
19
20
/* *********************************************************************************************************/
/**
21
* Constructor that parses an **HAPI** instance to create a **PoPs** lepton node.
22
*
23
* @param a_node [in] The **HAPI::Node** to be parsed.
24
* @param a_DB [in] The **PoPI::Database:: instance to add the constructed **Lepton** to.
25
* @param a_parent [in] The parent suite that will contain *this*.
26
***********************************************************************************************************/
27
28
Lepton::Lepton
(
HAPI::Node
const
&a_node,
Database
*a_DB,
LUPI_maybeUnused
Database
*a_parent ) :
29
Particle
( a_node,
Particle_class
::
lepton
,
PoPI_leptonChars
),
30
m_generation( a_node.attribute(
PoPI_generationChars
).value( ) ) {
31
32
if
(
ID
( ).substr(0, 2) ==
IDs::electron
) setIntid(
intidHelper
(
isAnti
( ),
Particle_class::lepton
, 0 ) );
33
34
addToDatabase
( a_DB );
35
}
36
37
/* *********************************************************************************************************/
/**
38
***********************************************************************************************************/
39
40
Lepton::~Lepton
( ) {
41
42
}
43
44
/* *********************************************************************************************************/
/**
45
* Returns the generation attribute.
46
***********************************************************************************************************/
47
48
std::string
Lepton::toXMLListExtraAttributes
(
void
)
const
{
49
50
return
( std::string(
" generation=\""
+ m_generation +
"\""
) );
51
}
52
53
}
LUPI_maybeUnused
#define LUPI_maybeUnused
Definition
LUPI_defines.hpp:16
PoPI.hpp
PoPI_leptonChars
#define PoPI_leptonChars
Definition
PoPI.hpp:46
PoPI_generationChars
#define PoPI_generationChars
Definition
PoPI_lepton.cc:14
HAPI::Node
Definition
HAPI.hpp:166
PoPI::Base::Lepton
friend Lepton
Definition
PoPI.hpp:677
PoPI::Base::ID
std::string const & ID(void) const
Definition
PoPI.hpp:652
PoPI::Database
Definition
PoPI.hpp:1128
PoPI::IDBase::addToDatabase
std::size_t addToDatabase(Database *a_DB)
Definition
PoPI_base.cc:95
PoPI::Lepton::~Lepton
virtual ~Lepton()
Definition
PoPI_lepton.cc:40
PoPI::Lepton::toXMLListExtraAttributes
virtual std::string toXMLListExtraAttributes(void) const
Definition
PoPI_lepton.cc:48
PoPI::Particle::Particle
Particle(HAPI::Node const &a_node, Particle_class a_class, std::string const &a_family, int a_hasNucleus=0)
Definition
PoPI_particle.cc:25
PoPI::Particle::isAnti
bool isAnti() const
Definition
PoPI.hpp:875
PoPI
Definition
PoPI.hpp:28
PoPI::intidHelper
int intidHelper(bool a_isAnti, Particle_class a_family, int a_SSSSSSS)
Definition
PoPI_intId.cc:47
PoPI::Particle_class
Particle_class
Definition
PoPI.hpp:58
PoPI::Particle_class::lepton
@ lepton
Definition
PoPI.hpp:61
PoPI::IDs::electron
static std::string const electron
Definition
PoPI.hpp:163
geant4-v11.4.0
source
processes
hadronic
models
lend
src
PoPI_lepton.cc
Generated by
1.16.1