Geant4-11
G4Ions.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26// G4Ions
27//
28// Class Description:
29//
30// This is the base class for all nuclei including pre-defined
31// light nuclei such as deuteron, alpha, and proton (Hydrogen).
32// All nuclei/ions created on the fly are objects of this class.
33// Atomic number and atomic mass are valid only for particles derived
34// from this class. This class has Excitation Energy in addition to
35// the normal particle properties.
36
37// Authors: G.Cosmo, 4 April 1996 - Design based on object model
38// H.Kurashige, 27 June 1998 - First implementation
39// --------------------------------------------------------------------
40#ifndef G4Ions_hh
41#define G4Ions_hh 1
42
43#include "globals.hh"
44#include "G4ios.hh"
46
47// ######################################################################
48// ### Ions ###
49// ######################################################################
50
52{
53 public:
54
55 G4Ions(
56 const G4String& aName, G4double mass,
57 G4double width, G4double charge,
58 G4int iSpin, G4int iParity,
59 G4int iConjugation, G4int iIsospin,
60 G4int iIsospin3, G4int gParity,
61 const G4String& pType, G4int lepton,
63 G4bool stable, G4double lifetime,
64 G4DecayTable* decaytable, G4bool shortlived,
65 const G4String& subType ="",
66 G4int anti_encoding =0,
67 G4double excitation = 0.0,
68 G4int isomer = 0
69 );
70
71 virtual ~G4Ions();
72
73 inline G4Ions* IonsDefinition();
74 inline G4Ions* Ions();
75
76 inline G4double GetExcitationEnergy() const;
77 // Get excitation energy of nucleus
78
79 inline G4int GetIsomerLevel() const;
80 // Get Isomer level (=0 for ground state)
81
82 enum class G4FloatLevelBase // enumerator for floating level base
83 {
84 no_Float=0,
85 plus_X, plus_Y, plus_Z, plus_U, plus_V, plus_W,
86 plus_R, plus_S, plus_T, plus_A, plus_B, plus_C, plus_D, plus_E
87 };
88
89 static G4Ions::G4FloatLevelBase FloatLevelBase(char flbChar);
92
93 // Set/Get methods for floating level base
94 //
96 inline G4int GetFloatLevelBaseIndex() const;
98 inline void SetFloatLevelBase(char flbChar);
99 inline void SetFloatLevelBase(G4int flbIdx);
100
101 protected:
102
103 G4Ions();
104
105 private:
106
110};
111
112#define noFloat G4Ions::G4FloatLevelBase::no_Float
113#define plusU G4Ions::G4FloatLevelBase::plus_U
114#define plusV G4Ions::G4FloatLevelBase::plus_V
115#define plusW G4Ions::G4FloatLevelBase::plus_W
116#define plusX G4Ions::G4FloatLevelBase::plus_X
117#define plusY G4Ions::G4FloatLevelBase::plus_Y
118#define plusZ G4Ions::G4FloatLevelBase::plus_Z
119#define plusR G4Ions::G4FloatLevelBase::plus_R
120#define plusS G4Ions::G4FloatLevelBase::plus_S
121#define plusT G4Ions::G4FloatLevelBase::plus_T
122#define plusA G4Ions::G4FloatLevelBase::plus_A
123#define plusB G4Ions::G4FloatLevelBase::plus_B
124#define plusC G4Ions::G4FloatLevelBase::plus_C
125#define plusD G4Ions::G4FloatLevelBase::plus_D
126#define plusE G4Ions::G4FloatLevelBase::plus_E
127
128// ------------------------
129// Inline methods
130// ------------------------
131
132inline
134{
135 return this;
136}
137
138inline
140{
141 return this;
142}
143
144inline
146{
147 return theExcitationEnergy;
148}
149
150inline
152{
153 return theIsomerLevel;
154}
155
156inline
158{
159 return floatLevelBase;
160}
161
162inline
164{
165 return static_cast<G4int>(floatLevelBase);
166}
167
168inline
170{
171 floatLevelBase = flb;
172}
173
174inline
176{
178}
179
180inline
182{
184}
185
186#endif
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
Definition: G4Ions.hh:52
G4double GetExcitationEnergy() const
Definition: G4Ions.hh:145
G4double theExcitationEnergy
Definition: G4Ions.hh:107
G4int GetIsomerLevel() const
Definition: G4Ions.hh:151
virtual ~G4Ions()
Definition: G4Ions.cc:99
G4Ions * Ions()
Definition: G4Ions.hh:139
static char FloatLevelBaseChar(G4Ions::G4FloatLevelBase flb)
Definition: G4Ions.cc:165
G4Ions::G4FloatLevelBase GetFloatLevelBase() const
Definition: G4Ions.hh:157
static G4Ions::G4FloatLevelBase FloatLevelBase(char flbChar)
Definition: G4Ions.cc:103
G4FloatLevelBase floatLevelBase
Definition: G4Ions.hh:109
void SetFloatLevelBase(G4Ions::G4FloatLevelBase flb)
Definition: G4Ions.hh:169
G4Ions()
Definition: G4Ions.cc:95
G4Ions * IonsDefinition()
Definition: G4Ions.hh:133
G4int theIsomerLevel
Definition: G4Ions.hh:108
G4FloatLevelBase
Definition: G4Ions.hh:83
G4int GetFloatLevelBaseIndex() const
Definition: G4Ions.hh:163