Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4Ions Class Reference

#include <G4Ions.hh>

+ Inheritance diagram for G4Ions:

Public Types

enum class  G4FloatLevelBase {
  no_Float = 0 , plus_X , plus_Y , plus_Z ,
  plus_U , plus_V , plus_W , plus_R ,
  plus_S , plus_T , plus_A , plus_B ,
  plus_C , plus_D , plus_E
}
 

Public Member Functions

 G4Ions (const G4String &aName, G4double mass, G4double width, G4double charge, G4int iSpin, G4int iParity, G4int iConjugation, G4int iIsospin, G4int iIsospin3, G4int gParity, const G4String &pType, G4int lepton, G4int baryon, G4int encoding, G4bool stable, G4double lifetime, G4DecayTable *decaytable, G4bool shortlived, const G4String &subType="", G4int anti_encoding=0, G4double excitation=0.0, G4int isomer=0)
 
 ~G4Ions () override=default
 
G4IonsIonsDefinition ()
 
G4IonsIons ()
 
G4double GetExcitationEnergy () const
 
G4int GetIsomerLevel () const
 
G4Ions::G4FloatLevelBase GetFloatLevelBase () const
 
G4int GetFloatLevelBaseIndex () const
 
void SetFloatLevelBase (G4Ions::G4FloatLevelBase flb)
 
void SetFloatLevelBase (char flbChar)
 
void SetFloatLevelBase (G4int flbIdx)
 
- Public Member Functions inherited from G4ParticleDefinition
 G4ParticleDefinition (const G4String &aName, G4double mass, G4double width, G4double charge, G4int iSpin, G4int iParity, G4int iConjugation, G4int iIsospin, G4int iIsospinZ, G4int gParity, const G4String &pType, G4int lepton, G4int baryon, G4int encoding, G4bool stable, G4double lifetime, G4DecayTable *decaytable, G4bool shortlived=false, const G4String &subType="", G4int anti_encoding=0, G4double magneticMoment=0.0)
 
virtual ~G4ParticleDefinition ()
 
 G4ParticleDefinition (const G4ParticleDefinition &)=delete
 
G4ParticleDefinitionoperator= (const G4ParticleDefinition &)=delete
 
G4bool operator== (const G4ParticleDefinition &right) const
 
G4bool operator!= (const G4ParticleDefinition &right) const
 
const G4StringGetParticleName () const
 
G4double GetPDGMass () const
 
G4double GetPDGWidth () const
 
G4double GetPDGCharge () const
 
G4double GetPDGSpin () const
 
G4int GetPDGiSpin () const
 
G4int GetPDGiParity () const
 
G4int GetPDGiConjugation () const
 
G4double GetPDGIsospin () const
 
G4double GetPDGIsospin3 () const
 
G4int GetPDGiIsospin () const
 
G4int GetPDGiIsospin3 () const
 
G4int GetPDGiGParity () const
 
G4double GetPDGMagneticMoment () const
 
void SetPDGMagneticMoment (G4double mageticMoment)
 
G4double CalculateAnomaly () const
 
const G4StringGetParticleType () const
 
const G4StringGetParticleSubType () const
 
G4int GetLeptonNumber () const
 
G4int GetBaryonNumber () const
 
G4int GetPDGEncoding () const
 
G4int GetAntiPDGEncoding () const
 
void SetAntiPDGEncoding (G4int aEncoding)
 
G4int GetQuarkContent (G4int flavor) const
 
G4int GetAntiQuarkContent (G4int flavor) const
 
G4bool IsShortLived () const
 
G4bool GetPDGStable () const
 
void SetPDGStable (const G4bool aFlag)
 
G4double GetPDGLifeTime () const
 
void SetPDGLifeTime (G4double aLifeTime)
 
G4double GetIonLifeTime () const
 
G4DecayTableGetDecayTable () const
 
void SetDecayTable (G4DecayTable *aDecayTable)
 
G4ProcessManagerGetProcessManager () const
 
void SetProcessManager (G4ProcessManager *aProcessManager)
 
G4VTrackingManagerGetTrackingManager () const
 
void SetTrackingManager (G4VTrackingManager *aTrackingManager)
 
G4ParticleTableGetParticleTable () const
 
G4int GetAtomicNumber () const
 
G4int GetAtomicMass () const
 
void DumpTable () const
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 
void SetApplyCutsFlag (G4bool)
 
G4bool GetApplyCutsFlag () const
 
G4bool IsGeneralIon () const
 
G4bool IsMuonicAtom () const
 
G4ProcessManagerGetMasterProcessManager () const
 
void SetMasterProcessManager (G4ProcessManager *aNewPM)
 
G4int GetInstanceID () const
 
void SetParticleDefinitionID (G4int id=-1)
 
G4int GetParticleDefinitionID () const
 
G4bool IsHypernucleus () const
 
G4int GetNumberOfLambdasInHypernucleus () const
 
G4bool IsAntiHypernucleus () const
 
G4int GetNumberOfAntiLambdasInAntiHypernucleus () const
 

Static Public Member Functions

static G4Ions::G4FloatLevelBase FloatLevelBase (char flbChar)
 
static G4Ions::G4FloatLevelBase FloatLevelBase (G4int flbIdx)
 
static char FloatLevelBaseChar (G4Ions::G4FloatLevelBase flb)
 
- Static Public Member Functions inherited from G4ParticleDefinition
static const G4PDefManagerGetSubInstanceManager ()
 
static void Clean ()
 

Protected Member Functions

 G4Ions ()=default
 
- Protected Member Functions inherited from G4ParticleDefinition
 G4ParticleDefinition ()
 
G4int FillQuarkContents ()
 
void SetParticleSubType (const G4String &subtype)
 
void SetAtomicNumber (G4int)
 
void SetAtomicMass (G4int)
 

Additional Inherited Members

- Protected Types inherited from G4ParticleDefinition
enum  { NumberOfQuarkFlavor = 6 }
 
- Protected Attributes inherited from G4ParticleDefinition
G4int theQuarkContent [NumberOfQuarkFlavor]
 
G4int theAntiQuarkContent [NumberOfQuarkFlavor]
 
G4bool isGeneralIon = false
 
G4bool isMuonicAtom = false
 

Detailed Description

Definition at line 47 of file G4Ions.hh.

Member Enumeration Documentation

◆ G4FloatLevelBase

enum class G4Ions::G4FloatLevelBase
strong
Enumerator
no_Float 
plus_X 
plus_Y 
plus_Z 
plus_U 
plus_V 
plus_W 
plus_R 
plus_S 
plus_T 
plus_A 
plus_B 
plus_C 
plus_D 
plus_E 

Definition at line 79 of file G4Ions.hh.

Constructor & Destructor Documentation

◆ G4Ions() [1/2]

G4Ions::G4Ions ( const G4String & aName,
G4double mass,
G4double width,
G4double charge,
G4int iSpin,
G4int iParity,
G4int iConjugation,
G4int iIsospin,
G4int iIsospin3,
G4int gParity,
const G4String & pType,
G4int lepton,
G4int baryon,
G4int encoding,
G4bool stable,
G4double lifetime,
G4DecayTable * decaytable,
G4bool shortlived,
const G4String & subType = "",
G4int anti_encoding = 0,
G4double excitation = 0.0,
G4int isomer = 0 )

Definition at line 41 of file G4Ions.cc.

56 : G4ParticleDefinition( aName,mass,width,charge,iSpin,iParity,
57 iConjugation,iIsospin,iIsospin3,gParity,pType,
58 lepton,baryon,encoding,stable,lifetime,decaytable,
59 shortlived, subType, anti_encoding),
60 theExcitationEnergy(excitation),
61 theIsomerLevel(isomer)
62// clang-format on
63{
64 if ((aName == "proton") || (aName == "neutron")) {
65 isGeneralIon = false;
66 }
67 else if ((aName == "GenericIon") || (aName == "alpha") || (aName == "He3")
68 || (aName == "deuteron") || (aName == "triton"))
69 {
70 isGeneralIon = false;
71 }
72 else if ((aName == "anti_He3") || (aName == "anti_deuteron") || (aName == "anti_triton")
73 || (aName == "anti_alpha"))
74 {
75 isGeneralIon = false;
76 }
77 else if ((aName == "iron") || (aName == "oxygen") || (aName == "nitrogen") || (aName == "carbon")
78 || (aName == "helium") || (aName == "alpha+") || (aName == "hydrogen")
79 || (aName == "Ps-1s") || (aName == "Ps-2s"))
80 {
81 isGeneralIon = false;
82 }
83 else if (aName == "hypertriton" || aName == "anti_hypertriton" || aName == "hyperalpha"
84 || aName == "anti_hyperalpha" || aName == "hyperH4" || aName == "anti_hyperH4"
85 || aName == "doublehyperH4" || aName == "anti_doublehyperH4"
86 || aName == "doublehyperdoubleneutron" || aName == "anti_doublehyperdoubleneutron"
87 || aName == "hyperHe5" || aName == "anti_hyperHe5")
88 {
89 isGeneralIon = false;
90 }
91 else {
92 isGeneralIon = true;
93 }
94
95 // isomer level isset to 9
96 // if isomer level is set to 0 for excited state
97 //
98 if ((theExcitationEnergy > 0.0) && (isomer == 0)) isomer = 9;
99
100 if (GetAtomicNumber() == 0) {
101 // AtomicNumber/Mass is positive even for anti_nulceus
102 SetAtomicNumber(std::abs(G4int(GetPDGCharge() / eplus)));
103 SetAtomicMass(std::abs(GetBaryonNumber()));
104 }
105}
int G4int
Definition G4Types.hh:85
G4int GetAtomicNumber() const
void SetAtomicMass(G4int)
void SetAtomicNumber(G4int)

◆ ~G4Ions()

G4Ions::~G4Ions ( )
overridedefault

◆ G4Ions() [2/2]

Member Function Documentation

◆ FloatLevelBase() [1/2]

G4Ions::G4FloatLevelBase G4Ions::FloatLevelBase ( char flbChar)
static

Definition at line 107 of file G4Ions.cc.

108{
110 switch (flbChar) {
111 case 'x':
112 case 'X':
113 flb = plusX;
114 break;
115 case 'y':
116 case 'Y':
117 flb = plusY;
118 break;
119 case 'z':
120 case 'Z':
121 flb = plusZ;
122 break;
123 case 'u':
124 case 'U':
125 flb = plusU;
126 break;
127 case 'v':
128 case 'V':
129 flb = plusV;
130 break;
131 case 'w':
132 case 'W':
133 flb = plusW;
134 break;
135 case 'r':
136 case 'R':
137 flb = plusR;
138 break;
139 case 's':
140 case 'S':
141 flb = plusS;
142 break;
143 case 't':
144 case 'T':
145 flb = plusT;
146 break;
147 case 'a':
148 case 'A':
149 flb = plusA;
150 break;
151 case 'b':
152 case 'B':
153 flb = plusB;
154 break;
155 case 'c':
156 case 'C':
157 flb = plusC;
158 break;
159 case 'd':
160 case 'D':
161 flb = plusD;
162 break;
163 case 'e':
164 case 'E':
165 flb = plusE;
166 break;
167 case '\0':
168 default:
169 break;
170 }
171 return flb;
172}
#define plusA
Definition G4Ions.hh:129
#define plusT
Definition G4Ions.hh:128
#define plusR
Definition G4Ions.hh:126
#define plusV
Definition G4Ions.hh:121
#define plusW
Definition G4Ions.hh:122
#define plusD
Definition G4Ions.hh:132
#define plusU
Definition G4Ions.hh:120
#define plusS
Definition G4Ions.hh:127
#define plusY
Definition G4Ions.hh:124
#define plusX
Definition G4Ions.hh:123
#define plusZ
Definition G4Ions.hh:125
#define plusB
Definition G4Ions.hh:130
#define plusC
Definition G4Ions.hh:131
#define plusE
Definition G4Ions.hh:133
#define noFloat
Definition G4Ions.hh:119
G4FloatLevelBase
Definition G4Ions.hh:80

Referenced by G4ExcitationHandler::BreakItUp(), G4IonTable::CreateIon(), G4ITDecay::DecayIt(), G4IonTable::FindIon(), G4IonTable::FindIon(), G4IonTable::FindIon(), G4IonTable::FindIon(), G4IonTable::GetIon(), G4IonTable::GetIon(), G4IonTable::GetLifeTime(), G4RadioactiveDecay::LoadDecayTable(), SetFloatLevelBase(), SetFloatLevelBase(), and G4IsotopeProperty::SetFloatLevelBase().

◆ FloatLevelBase() [2/2]

G4Ions::G4FloatLevelBase G4Ions::FloatLevelBase ( G4int flbIdx)
static

Definition at line 174 of file G4Ions.cc.

175{
176 // clang-format off
177 static G4Ions::G4FloatLevelBase flb[] =
178 { noFloat,
181 // clang-format on
182 return (flbIdx >= 0 && flbIdx < 15) ? flb[flbIdx] : flb[0];
183}

◆ FloatLevelBaseChar()

char G4Ions::FloatLevelBaseChar ( G4Ions::G4FloatLevelBase flb)
static

Definition at line 185 of file G4Ions.cc.

186{
187 // clang-format off
188 static char flbChar[] = {'\0', 'X', 'Y', 'Z', 'U', 'V', 'W', 'R',
189 'S', 'T', 'A', 'B', 'C', 'D', 'E'};
190 // clang-format on
191 return flbChar[static_cast<G4int>(flb)];
192}

Referenced by G4IonTable::CreateIon(), G4IsotopeProperty::DumpInfo(), and G4IonTable::GetIonName().

◆ GetExcitationEnergy()

G4double G4Ions::GetExcitationEnergy ( ) const
inline

◆ GetFloatLevelBase()

G4Ions::G4FloatLevelBase G4Ions::GetFloatLevelBase ( ) const
inline

Definition at line 159 of file G4Ions.hh.

160{
161 return floatLevelBase;
162}

Referenced by G4RadioactiveDecay::LoadDecayTable().

◆ GetFloatLevelBaseIndex()

G4int G4Ions::GetFloatLevelBaseIndex ( ) const
inline

Definition at line 164 of file G4Ions.hh.

165{
166 return static_cast<G4int>(floatLevelBase);
167}

◆ GetIsomerLevel()

G4int G4Ions::GetIsomerLevel ( ) const
inline

Definition at line 154 of file G4Ions.hh.

155{
156 return theIsomerLevel;
157}

◆ Ions()

G4Ions * G4Ions::Ions ( )
inline

Definition at line 144 of file G4Ions.hh.

145{
146 return this;
147}

◆ IonsDefinition()

G4Ions * G4Ions::IonsDefinition ( )
inline

Definition at line 139 of file G4Ions.hh.

140{
141 return this;
142}

◆ SetFloatLevelBase() [1/3]

void G4Ions::SetFloatLevelBase ( char flbChar)
inline

Definition at line 174 of file G4Ions.hh.

175{
176 floatLevelBase = FloatLevelBase(flbChar);
177}
static G4Ions::G4FloatLevelBase FloatLevelBase(char flbChar)
Definition G4Ions.cc:107

◆ SetFloatLevelBase() [2/3]

void G4Ions::SetFloatLevelBase ( G4int flbIdx)
inline

Definition at line 179 of file G4Ions.hh.

180{
181 floatLevelBase = FloatLevelBase(flbIdx);
182}

◆ SetFloatLevelBase() [3/3]

void G4Ions::SetFloatLevelBase ( G4Ions::G4FloatLevelBase flb)
inline

Definition at line 169 of file G4Ions.hh.

170{
171 floatLevelBase = flb;
172}

Referenced by G4MuonicAtom::G4MuonicAtom().


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