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[ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /particles/management/include/G4ParticleDefinition.icc (Version 11.3.0) and /particles/management/include/G4ParticleDefinition.icc (Version 10.6.p3)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 // G4ParticleDefinition inline methods impleme << 
 27 //                                                 26 //
 28 // Authors: G.Cosmo, 2 December 1995 - Design, <<  27 //
 29 //          M.Asai, 29 January 1996 - First im << 
 30 // ------------------------------------------- << 
 31                                                    28 
 32 inline G4int G4ParticleDefinition::GetInstance <<  29 inline 
 33 {                                              <<  30  G4int G4ParticleDefinition::GetInstanceID() const
 34   return g4particleDefinitionInstanceID;       <<  31 { 
                                                   >>  32   return g4particleDefinitionInstanceID; 
 35 }                                                  33 }
 36                                                    34 
 37 inline G4bool G4ParticleDefinition::GetPDGStab <<  35 inline
                                                   >>  36  G4bool G4ParticleDefinition::GetPDGStable() const
 38 {                                                  37 {
 39   if (IsGeneralIon()) {                        <<  38   if(IsGeneralIon())
 40     return (GetIonLifeTime() < 0.);            <<  39   { return (GetIonLifeTime()<0.); }
 41   }                                            <<  40   else
 42                                                <<  41   { return thePDGStable; }
 43   return thePDGStable;                         << 
 44 }                                                  42 }
 45                                                    43 
 46 inline G4double G4ParticleDefinition::GetPDGLi <<  44 inline
 47 {                                              <<  45  G4double G4ParticleDefinition::GetPDGLifeTime() const
 48   return thePDGLifeTime;                       <<  46 { return thePDGLifeTime; }
 49 }                                              << 
 50                                                    47 
 51 inline G4double G4ParticleDefinition::GetIonLi <<  48 inline 
 52 {                                              <<  49  G4double G4ParticleDefinition::GetIonLifeTime() const
 53   //-- No longer needed to access to G4IonTabl <<  50 { return thePDGLifeTime; }
 54   //-- Method GetIonLifeTime() itself is kept  << 
 55                                                    51 
 56   return thePDGLifeTime;                       <<  52 //-- No longer needed to access to G4IonTable.
 57 }                                              <<  53 //-- Method GetIonLifeTime() itself is kept for compatibility
                                                   >>  54 //-- but moved to icc file as an inlined method.
                                                   >>  55 //inline
                                                   >>  56 // G4double G4ParticleDefinition::GetPDGLifeTime() const
                                                   >>  57 //{
                                                   >>  58 //  if(IsGeneralIon())
                                                   >>  59 //  { return GetIonLifeTime(); }
                                                   >>  60 //  else
                                                   >>  61 //  { return thePDGLifeTime; }
                                                   >>  62 //}
 58                                                    63 
 59 inline G4ParticleTable* G4ParticleDefinition:: <<  64 inline 
 60 {                                              <<  65  G4ParticleTable* G4ParticleDefinition::GetParticleTable() const
 61   return theParticleTable;                     <<  66 { 
                                                   >>  67   return theParticleTable; 
 62 }                                                  68 }
 63                                                    69 
 64 inline G4DecayTable* G4ParticleDefinition::Get <<  70 inline
 65 {                                              <<  71  G4DecayTable* G4ParticleDefinition::GetDecayTable() const
 66   return theDecayTable;                        <<  72 { 
                                                   >>  73   return theDecayTable; 
 67 }                                                  74 }
 68                                                    75 
 69 inline void G4ParticleDefinition::SetDecayTabl <<  76 inline
 70 {                                              <<  77  void G4ParticleDefinition::SetDecayTable(G4DecayTable* aDecayTable) 
 71   theDecayTable = aDecayTable;                 <<  78 { 
                                                   >>  79   theDecayTable = aDecayTable; 
 72 }                                                  80 }
 73                                                    81 
 74 inline void G4ParticleDefinition::SetVerboseLe <<  82 inline 
                                                   >>  83  void G4ParticleDefinition::SetVerboseLevel(G4int value)
 75 {                                                  84 {
 76   verboseLevel = value;                        <<  85    verboseLevel = value;
 77 }                                                  86 }
 78                                                    87 
 79 inline G4int G4ParticleDefinition::GetVerboseL <<  88 inline 
                                                   >>  89  G4int G4ParticleDefinition::GetVerboseLevel() const
 80 {                                                  90 {
 81   return verboseLevel;                         <<  91    return verboseLevel;
 82 }                                                  92 }
 83                                                    93 
 84 inline G4ProcessManager* G4ParticleDefinition: <<  94 inline
                                                   >>  95  G4ProcessManager* G4ParticleDefinition::GetMasterProcessManager() const
 85 {                                                  96 {
 86   return theProcessManagerShadow;              <<  97     return theProcessManagerShadow;
 87 }                                                  98 }
 88                                                    99 
 89 inline void G4ParticleDefinition::SetMasterPro << 100 inline
                                                   >> 101   void G4ParticleDefinition::SetMasterProcessManager( G4ProcessManager* aNewPM )
 90 {                                                 102 {
 91   theProcessManagerShadow = aNewPM;            << 103    theProcessManagerShadow = aNewPM;
 92 }                                                 104 }
 93                                                   105 
 94 inline G4int G4ParticleDefinition::GetQuarkCon << 106 inline
                                                   >> 107  G4int G4ParticleDefinition::GetQuarkContent(G4int flavor) const 
 95 {                                                 108 {
 96   G4int content = 0;                           << 109   G4int content = 0; 
 97   if ((flavor > 0) && (flavor <= NumberOfQuark << 110   if ((flavor>0) && (flavor<=NumberOfQuarkFlavor))
 98     content = theQuarkContent[flavor - 1];     << 111   {
                                                   >> 112     content = theQuarkContent[flavor-1];
 99   }                                               113   }
100   else {                                       << 114   else
                                                   >> 115   {
101 #ifdef G4VERBOSE                                  116 #ifdef G4VERBOSE
102     if (verboseLevel > 0) {                    << 117     if (verboseLevel >0)
                                                   >> 118     {
103       std::ostringstream message;                 119       std::ostringstream message;
104       message << "Invalid Quark Flavor: " << f    120       message << "Invalid Quark Flavor: " << flavor;
105       G4Exception("G4ParticleDefinition::GetQu << 121       G4Exception("G4ParticleDefinition::GetQuarkContent()",
106     }                                          << 122                   "InvalidFlavor", JustWarning, message);
107 #endif                                         << 123     } 
                                                   >> 124 #endif  
108   }                                               125   }
109   return content;                              << 126   return content;  
110 }                                                 127 }
111                                                   128 
112 inline G4int G4ParticleDefinition::GetAntiQuar << 129 inline
                                                   >> 130  G4int G4ParticleDefinition::GetAntiQuarkContent(G4int flavor) const 
113 {                                                 131 {
114   G4int content = 0;                              132   G4int content = 0;
115   if ((flavor > 0) && (flavor <= NumberOfQuark << 133   if ((flavor>0) && (flavor<=NumberOfQuarkFlavor))
116     content = theAntiQuarkContent[flavor - 1]; << 134   {
                                                   >> 135     content = theAntiQuarkContent[flavor-1];
117   }                                               136   }
118   else {                                       << 137   else
                                                   >> 138   {
119 #ifdef G4VERBOSE                                  139 #ifdef G4VERBOSE
120     if (verboseLevel > 0) {                    << 140     if (verboseLevel >0)
                                                   >> 141     {
121       std::ostringstream message;                 142       std::ostringstream message;
122       message << "Invalid Quark Flavor: " << f    143       message << "Invalid Quark Flavor: " << flavor;
123       G4Exception("G4ParticleDefinition::GetAn << 144       G4Exception("G4ParticleDefinition::GetAntiQuarkContent()",
124                   message);                    << 145                   "InvalidFlavor", JustWarning, message);
125     }                                             146     }
126 #endif                                            147 #endif
127   }                                            << 148   }  
128   return content;                                 149   return content;
129 }                                                 150 }
130                                                   151 
131 inline void G4ParticleDefinition::SetParticleS << 152 inline 
                                                   >> 153  void G4ParticleDefinition::SetParticleSubType(const G4String& subtype)
132 {                                                 154 {
133   theParticleSubType = subtype;                   155   theParticleSubType = subtype;
134 }                                                 156 }
135                                                << 157  
136 inline void G4ParticleDefinition::SetAntiPDGEn << 158 inline 
137 {                                              << 159  void             G4ParticleDefinition::SetAntiPDGEncoding(G4int aEncoding)
138   theAntiPDGEncoding = aEncoding;              << 160 { 
                                                   >> 161   theAntiPDGEncoding = aEncoding; 
139 }                                                 162 }
140                                                   163 
141 inline G4bool G4ParticleDefinition::GetApplyCu << 164 inline 
                                                   >> 165 G4bool G4ParticleDefinition::GetApplyCutsFlag() const
142 {                                                 166 {
143   return fApplyCutsFlag;                          167   return fApplyCutsFlag;
144 }                                                 168 }
145                                                   169 
146 inline void G4ParticleDefinition::SetAtomicNum << 170 inline
                                                   >> 171  void G4ParticleDefinition::SetAtomicNumber(G4int i)
147 {                                                 172 {
148   theAtomicNumber = i;                            173   theAtomicNumber = i;
149 }                                                 174 }
150                                                   175 
151 inline G4int G4ParticleDefinition::GetAtomicNu << 176 inline
                                                   >> 177  G4int G4ParticleDefinition::GetAtomicNumber() const
152 {                                                 178 {
153   return theAtomicNumber;                         179   return theAtomicNumber;
154 }                                                 180 }
155                                                   181 
156 inline void G4ParticleDefinition::SetAtomicMas << 182 inline
                                                   >> 183  void G4ParticleDefinition::SetAtomicMass(G4int i)
157 {                                                 184 {
158   theAtomicMass = i;                              185   theAtomicMass = i;
159 }                                                 186 }
160                                                   187 
161 inline G4int G4ParticleDefinition::GetAtomicMa << 188 inline
                                                   >> 189  G4int G4ParticleDefinition::GetAtomicMass() const
162 {                                                 190 {
163   return theAtomicMass;                           191   return theAtomicMass;
164 }                                                 192 }
165                                                   193 
166 inline void G4ParticleDefinition::SetPDGMagnet << 194 inline 
                                                   >> 195   void  G4ParticleDefinition::SetPDGMagneticMoment(G4double magneticMoment)
167 {                                                 196 {
168   thePDGMagneticMoment = magneticMoment;       << 197    thePDGMagneticMoment = magneticMoment;
169 }                                                 198 }
170                                                   199 
171 inline G4bool G4ParticleDefinition::IsGeneralI << 200 inline      
                                                   >> 201   G4bool G4ParticleDefinition::IsGeneralIon() const
172 {                                                 202 {
173   return isGeneralIon;                            203   return isGeneralIon;
174 }                                                 204 }
175                                                   205 
176 inline G4bool G4ParticleDefinition::IsMuonicAt << 206 inline
                                                   >> 207   G4bool G4ParticleDefinition::IsMuonicAtom() const
177 {                                                 208 {
178   return isMuonicAtom;                            209   return isMuonicAtom;
179 }                                                 210 }
180                                                   211 
181 inline G4int G4ParticleDefinition::GetParticle << 212 inline
182 {                                              << 213   G4int G4ParticleDefinition::GetParticleDefinitionID() const
183   return g4particleDefinitionInstanceID;       << 
184 }                                              << 
185                                                << 
186 inline G4bool G4ParticleDefinition::IsHypernuc << 
187 {                                                 214 {
188   return GetNumberOfLambdasInHypernucleus() >  << 215   return g4particleDefinitionInstanceID; 
189 }                                                 216 }
190                                                   217 
191 inline G4int G4ParticleDefinition::GetNumberOf << 
192 {                                              << 
193   G4int numberOfLambdas = 0;                   << 
194   // PDG code of hypernuclei: 10LZZZAAAI       << 
195   if (thePDGEncoding > 0 && thePDGEncoding / 1 << 
196     numberOfLambdas = (thePDGEncoding / 100000 << 
197   }                                            << 
198   return numberOfLambdas;                      << 
199 }                                              << 
200                                                << 
201 inline G4bool G4ParticleDefinition::IsAntiHype << 
202 {                                              << 
203   return GetNumberOfAntiLambdasInAntiHypernucl << 
204 }                                              << 
205                                                << 
206 inline G4int G4ParticleDefinition::GetNumberOf << 
207 {                                              << 
208   G4int numberOfAntiLambdas = 0;               << 
209   // PDG code of anti-hypernuclei: -10LZZZAAAI << 
210   if (thePDGEncoding < 0 && thePDGEncoding / 1 << 
211     numberOfAntiLambdas = (std::abs(thePDGEnco << 
212   }                                            << 
213   return numberOfAntiLambdas;                  << 
214 }                                              << 
215                                                   218