File indexing completed on 2025-01-18 09:58:51
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032 inline G4int G4ParticleDefinition::GetInstanceID() const
0033 {
0034 return g4particleDefinitionInstanceID;
0035 }
0036
0037 inline G4bool G4ParticleDefinition::GetPDGStable() const
0038 {
0039 if (IsGeneralIon()) {
0040 return (GetIonLifeTime() < 0.);
0041 }
0042
0043 return thePDGStable;
0044 }
0045
0046 inline G4double G4ParticleDefinition::GetPDGLifeTime() const
0047 {
0048 return thePDGLifeTime;
0049 }
0050
0051 inline G4double G4ParticleDefinition::GetIonLifeTime() const
0052 {
0053
0054
0055
0056 return thePDGLifeTime;
0057 }
0058
0059 inline G4ParticleTable* G4ParticleDefinition::GetParticleTable() const
0060 {
0061 return theParticleTable;
0062 }
0063
0064 inline G4DecayTable* G4ParticleDefinition::GetDecayTable() const
0065 {
0066 return theDecayTable;
0067 }
0068
0069 inline void G4ParticleDefinition::SetDecayTable(G4DecayTable* aDecayTable)
0070 {
0071 theDecayTable = aDecayTable;
0072 }
0073
0074 inline void G4ParticleDefinition::SetVerboseLevel(G4int value)
0075 {
0076 verboseLevel = value;
0077 }
0078
0079 inline G4int G4ParticleDefinition::GetVerboseLevel() const
0080 {
0081 return verboseLevel;
0082 }
0083
0084 inline G4ProcessManager* G4ParticleDefinition::GetMasterProcessManager() const
0085 {
0086 return theProcessManagerShadow;
0087 }
0088
0089 inline void G4ParticleDefinition::SetMasterProcessManager(G4ProcessManager* aNewPM)
0090 {
0091 theProcessManagerShadow = aNewPM;
0092 }
0093
0094 inline G4int G4ParticleDefinition::GetQuarkContent(G4int flavor) const
0095 {
0096 G4int content = 0;
0097 if ((flavor > 0) && (flavor <= NumberOfQuarkFlavor)) {
0098 content = theQuarkContent[flavor - 1];
0099 }
0100 else {
0101 #ifdef G4VERBOSE
0102 if (verboseLevel > 0) {
0103 std::ostringstream message;
0104 message << "Invalid Quark Flavor: " << flavor;
0105 G4Exception("G4ParticleDefinition::GetQuarkContent()", "InvalidFlavor", JustWarning, message);
0106 }
0107 #endif
0108 }
0109 return content;
0110 }
0111
0112 inline G4int G4ParticleDefinition::GetAntiQuarkContent(G4int flavor) const
0113 {
0114 G4int content = 0;
0115 if ((flavor > 0) && (flavor <= NumberOfQuarkFlavor)) {
0116 content = theAntiQuarkContent[flavor - 1];
0117 }
0118 else {
0119 #ifdef G4VERBOSE
0120 if (verboseLevel > 0) {
0121 std::ostringstream message;
0122 message << "Invalid Quark Flavor: " << flavor;
0123 G4Exception("G4ParticleDefinition::GetAntiQuarkContent()", "InvalidFlavor", JustWarning,
0124 message);
0125 }
0126 #endif
0127 }
0128 return content;
0129 }
0130
0131 inline void G4ParticleDefinition::SetParticleSubType(const G4String& subtype)
0132 {
0133 theParticleSubType = subtype;
0134 }
0135
0136 inline void G4ParticleDefinition::SetAntiPDGEncoding(G4int aEncoding)
0137 {
0138 theAntiPDGEncoding = aEncoding;
0139 }
0140
0141 inline G4bool G4ParticleDefinition::GetApplyCutsFlag() const
0142 {
0143 return fApplyCutsFlag;
0144 }
0145
0146 inline void G4ParticleDefinition::SetAtomicNumber(G4int i)
0147 {
0148 theAtomicNumber = i;
0149 }
0150
0151 inline G4int G4ParticleDefinition::GetAtomicNumber() const
0152 {
0153 return theAtomicNumber;
0154 }
0155
0156 inline void G4ParticleDefinition::SetAtomicMass(G4int i)
0157 {
0158 theAtomicMass = i;
0159 }
0160
0161 inline G4int G4ParticleDefinition::GetAtomicMass() const
0162 {
0163 return theAtomicMass;
0164 }
0165
0166 inline void G4ParticleDefinition::SetPDGMagneticMoment(G4double magneticMoment)
0167 {
0168 thePDGMagneticMoment = magneticMoment;
0169 }
0170
0171 inline G4bool G4ParticleDefinition::IsGeneralIon() const
0172 {
0173 return isGeneralIon;
0174 }
0175
0176 inline G4bool G4ParticleDefinition::IsMuonicAtom() const
0177 {
0178 return isMuonicAtom;
0179 }
0180
0181 inline G4int G4ParticleDefinition::GetParticleDefinitionID() const
0182 {
0183 return g4particleDefinitionInstanceID;
0184 }
0185
0186 inline G4bool G4ParticleDefinition::IsHypernucleus() const
0187 {
0188 return GetNumberOfLambdasInHypernucleus() > 0;
0189 }
0190
0191 inline G4int G4ParticleDefinition::GetNumberOfLambdasInHypernucleus() const
0192 {
0193 G4int numberOfLambdas = 0;
0194
0195 if (thePDGEncoding > 0 && thePDGEncoding / 1000000000 != 0) {
0196 numberOfLambdas = (thePDGEncoding / 10000000) % 100;
0197 }
0198 return numberOfLambdas;
0199 }
0200
0201 inline G4bool G4ParticleDefinition::IsAntiHypernucleus() const
0202 {
0203 return GetNumberOfAntiLambdasInAntiHypernucleus() > 0;
0204 }
0205
0206 inline G4int G4ParticleDefinition::GetNumberOfAntiLambdasInAntiHypernucleus() const
0207 {
0208 G4int numberOfAntiLambdas = 0;
0209
0210 if (thePDGEncoding < 0 && thePDGEncoding / 1000000000 != 0) {
0211 numberOfAntiLambdas = (std::abs(thePDGEncoding) / 10000000) % 100;
0212 }
0213 return numberOfAntiLambdas;
0214 }