cepgen
is hosted by
Hepforge
,
IPPP Durham
CepGen
1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
HeavyIon.h
Go to the documentation of this file.
1
/*
2
* CepGen: a central exclusive processes event generator
3
* Copyright (C) 2013-2022 Laurent Forthomme
4
*
5
* This program is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation, either version 3 of the License, or
8
* any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
#ifndef CepGen_Physics_HeavyIon_h
20
#define CepGen_Physics_HeavyIon_h
21
22
#include <ostream>
23
24
#include "
CepGen/Physics/ParticleProperties.h
"
25
26
namespace
cepgen
{
28
enum class
Element
{
29
invalid
= -1,
30
neutron
= 0,
31
H
= 1,
32
C
= 6,
33
O
= 8,
34
Al
= 13,
35
Cu
= 29,
36
Xe
= 54,
37
Au
= 79,
38
Pb
= 82,
39
U
= 92
40
};
41
std::ostream&
operator<<
(std::ostream& os,
const
Element
& elem);
42
44
struct
HeavyIon
{
46
explicit
HeavyIon
(
unsigned
short
,
const
Element
&);
47
48
bool
operator==
(
const
HeavyIon
& oth)
const
{
return
Z
== oth.
Z
&&
A
== oth.
A
; }
49
bool
operator!=
(
const
HeavyIon
& oth)
const
{
return
!(*
this
== oth); }
50
52
double
massN
()
const
;
54
double
massP
()
const
;
56
double
mass
()
const
{
return
massN
() +
massP
(); }
58
double
radius
()
const
;
59
61
static
HeavyIon
fromPdgId
(
pdgid_t
);
63
static
bool
isHI
(
const
spdgid_t
&);
65
static
bool
isHI
(
const
ParticleProperties
&);
68
static
double
mass
(
const
HeavyIon
& hi) {
return
hi.
mass
(); }
69
71
static
inline
HeavyIon
proton
() {
return
HeavyIon
(1,
Element::H
); }
73
static
inline
HeavyIon
neutron
() {
return
HeavyIon
(1,
Element::neutron
); }
75
static
inline
HeavyIon
Au
() {
return
HeavyIon
(197,
Element::Au
); }
77
static
inline
HeavyIon
Pb
() {
return
HeavyIon
(207,
Element::Pb
); }
78
80
operator
pdgid_t
()
const
;
82
friend
std::ostream&
operator<<
(std::ostream& os,
const
HeavyIon
& hi);
83
85
Element
Z
{
Element::invalid
};
87
unsigned
short
A
{0};
88
};
89
}
// namespace cepgen
90
91
#endif
ParticleProperties.h
cepgen
Common namespace for this Monte Carlo generator.
Definition
CommandLineHandler.cpp:36
cepgen::Element
Element
Enumeration of chemical elements.
Definition
HeavyIon.h:28
cepgen::Element::Pb
@ Pb
cepgen::Element::C
@ C
cepgen::Element::Al
@ Al
cepgen::Element::U
@ U
cepgen::Element::Au
@ Au
cepgen::Element::Xe
@ Xe
cepgen::Element::Cu
@ Cu
cepgen::Element::H
@ H
cepgen::Element::neutron
@ neutron
cepgen::Element::O
@ O
cepgen::Element::invalid
@ invalid
cepgen::pdgid_t
unsigned long long pdgid_t
Alias for the integer-like particle PDG id.
Definition
ParticleProperties.h:26
cepgen::spdgid_t
long long spdgid_t
Definition
ParticleProperties.h:28
cepgen::operator<<
std::ostream & operator<<(std::ostream &os, const Exception::Type &type)
Definition
Exception.cpp:59
cepgen::HeavyIon
Heavy ion container (Z+A)
Definition
HeavyIon.h:44
cepgen::HeavyIon::mass
static double mass(const HeavyIon &hi)
Mass of a heavy ion, in GeV/c .
Definition
HeavyIon.h:68
cepgen::HeavyIon::massP
double massP() const
Protons mass, in GeV/c2.
Definition
HeavyIon.cpp:60
cepgen::HeavyIon::operator==
bool operator==(const HeavyIon &oth) const
Definition
HeavyIon.h:48
cepgen::HeavyIon::radius
double radius() const
Heavy ion radius, in m.
Definition
HeavyIon.cpp:72
cepgen::HeavyIon::Pb
static HeavyIon Pb()
Standard lead.
Definition
HeavyIon.h:77
cepgen::HeavyIon::Z
Element Z
Atomic number.
Definition
HeavyIon.h:85
cepgen::HeavyIon::fromPdgId
static HeavyIon fromPdgId(pdgid_t)
Build from a custom PDG id.
Definition
HeavyIon.cpp:34
cepgen::HeavyIon::massN
double massN() const
Neutrons mass, in GeV/c2.
Definition
HeavyIon.cpp:66
cepgen::HeavyIon::neutron
static HeavyIon neutron()
Simple neutron.
Definition
HeavyIon.h:73
cepgen::HeavyIon::A
unsigned short A
Mass number.
Definition
HeavyIon.h:87
cepgen::HeavyIon::mass
double mass() const
Total heavy ion mass, in GeV/c2.
Definition
HeavyIon.h:56
cepgen::HeavyIon::operator<<
friend std::ostream & operator<<(std::ostream &os, const HeavyIon &hi)
Human-readable expression of the ion.
Definition
HeavyIon.cpp:95
cepgen::HeavyIon::isHI
static bool isHI(const spdgid_t &)
Check if the PDG id is compatible with a HI.
Definition
HeavyIon.cpp:54
cepgen::HeavyIon::proton
static HeavyIon proton()
Simple proton.
Definition
HeavyIon.h:71
cepgen::HeavyIon::operator!=
bool operator!=(const HeavyIon &oth) const
Definition
HeavyIon.h:49
cepgen::HeavyIon::Au
static HeavyIon Au()
Standard gold.
Definition
HeavyIon.h:75
cepgen::ParticleProperties
A collection of physics constants associated to a single particle.
Definition
ParticleProperties.h:31
CepGen
Physics
HeavyIon.h
Generated on Mon Jul 29 2024 for CepGen by
1.9.7