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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 8.0)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                    <<   3 // * DISCLAIMER                                                       *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th <<   5 // * The following disclaimer summarizes all the specific disclaimers *
  6 // * the Geant4 Collaboration.  It is provided <<   6 // * of contributors to this software. The specific disclaimers,which *
  7 // * conditions of the Geant4 Software License <<   7 // * govern, are listed with their locations in:                      *
  8 // * LICENSE and available at  http://cern.ch/ <<   8 // *   http://cern.ch/geant4/license                                  *
  9 // * include a list of copyright holders.      << 
 10 // *                                                9 // *                                                                  *
 11 // * Neither the authors of this software syst     10 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     11 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     12 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     13 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file  <<  14 // * use.                                                             *
 16 // * for the full disclaimer and the limitatio << 
 17 // *                                               15 // *                                                                  *
 18 // * This  code  implementation is the result  <<  16 // * This  code  implementation is the  intellectual property  of the *
 19 // * technical work of the GEANT4 collaboratio <<  17 // * GEANT4 collaboration.                                            *
 20 // * By using,  copying,  modifying or  distri <<  18 // * By copying,  distributing  or modifying the Program (or any work *
 21 // * any work based  on the software)  you  ag <<  19 // * based  on  the Program)  you indicate  your  acceptance of  this *
 22 // * use  in  resulting  scientific  publicati <<  20 // * statement, and all its terms.                                    *
 23 // * acceptance of all terms of the Geant4 Sof << 
 24 // *******************************************     21 // ********************************************************************
 25 //                                                 22 //
 26 // G4ParticleDefinition inline methods impleme << 
 27 //                                                 23 //
 28 // Authors: G.Cosmo, 2 December 1995 - Design, <<  24 // $Id: G4ParticleDefinition.icc,v 1.9 2005/01/14 03:00:38 kurasige Exp $
 29 //          M.Asai, 29 January 1996 - First im <<  25 // GEANT4 tag $Name: geant4-08-00 $
 30 // ------------------------------------------- <<  26 //
 31                                                << 
 32 inline G4int G4ParticleDefinition::GetInstance << 
 33 {                                              << 
 34   return g4particleDefinitionInstanceID;       << 
 35 }                                              << 
 36                                                << 
 37 inline G4bool G4ParticleDefinition::GetPDGStab << 
 38 {                                              << 
 39   if (IsGeneralIon()) {                        << 
 40     return (GetIonLifeTime() < 0.);            << 
 41   }                                            << 
 42                                                << 
 43   return thePDGStable;                         << 
 44 }                                              << 
 45                                                << 
 46 inline G4double G4ParticleDefinition::GetPDGLi << 
 47 {                                              << 
 48   return thePDGLifeTime;                       << 
 49 }                                              << 
 50                                                << 
 51 inline G4double G4ParticleDefinition::GetIonLi << 
 52 {                                              << 
 53   //-- No longer needed to access to G4IonTabl << 
 54   //-- Method GetIonLifeTime() itself is kept  << 
 55                                                    27 
 56   return thePDGLifeTime;                       <<  28 inline 
                                                   >>  29  G4ParticleTable* G4ParticleDefinition::GetParticleTable()
                                                   >>  30 { 
                                                   >>  31   return theParticleTable; 
 57 }                                                  32 }
 58                                                    33 
 59 inline G4ParticleTable* G4ParticleDefinition:: <<  34 inline
 60 {                                              <<  35  G4DecayTable* G4ParticleDefinition::GetDecayTable()
 61   return theParticleTable;                     <<  36 { 
                                                   >>  37   return theDecayTable; 
 62 }                                                  38 }
 63                                                    39 
 64 inline G4DecayTable* G4ParticleDefinition::Get <<  40 inline
 65 {                                              <<  41  void          G4ParticleDefinition::SetDecayTable(G4DecayTable* aDecayTable) 
 66   return theDecayTable;                        <<  42 { 
                                                   >>  43   theDecayTable = aDecayTable; 
 67 }                                                  44 }
 68                                                    45 
 69 inline void G4ParticleDefinition::SetDecayTabl << 
 70 {                                              << 
 71   theDecayTable = aDecayTable;                 << 
 72 }                                              << 
 73                                                    46 
 74 inline void G4ParticleDefinition::SetVerboseLe <<  47 inline 
                                                   >>  48  void G4ParticleDefinition::SetVerboseLevel(G4int value)
 75 {                                                  49 {
 76   verboseLevel = value;                        <<  50    verboseLevel = value;
 77 }                                                  51 }
 78                                                    52 
 79 inline G4int G4ParticleDefinition::GetVerboseL <<  53 inline 
                                                   >>  54  G4int G4ParticleDefinition::GetVerboseLevel() const
 80 {                                                  55 {
 81   return verboseLevel;                         <<  56    return verboseLevel;
 82 }                                                  57 }
 83                                                    58 
 84 inline G4ProcessManager* G4ParticleDefinition: <<  59 inline
                                                   >>  60  G4ProcessManager* G4ParticleDefinition::GetProcessManager() const
 85 {                                                  61 {
 86   return theProcessManagerShadow;              <<  62     return theProcessManager;
 87 }                                                  63 }
 88                                                    64 
 89 inline void G4ParticleDefinition::SetMasterPro <<  65 inline
                                                   >>  66  void G4ParticleDefinition::SetProcessManager(G4ProcessManager *aProcessManager)
 90 {                                                  67 {
 91   theProcessManagerShadow = aNewPM;            <<  68       theProcessManager = aProcessManager;
 92 }                                                  69 }
 93                                                    70 
 94 inline G4int G4ParticleDefinition::GetQuarkCon <<  71 inline
                                                   >>  72  G4int G4ParticleDefinition::GetQuarkContent(G4int flavor) const 
 95 {                                                  73 {
 96   G4int content = 0;                           <<  74   G4int content = 0; 
 97   if ((flavor > 0) && (flavor <= NumberOfQuark <<  75   if ((flavor>0) && (flavor<=NumberOfQuarkFlavor)){
 98     content = theQuarkContent[flavor - 1];     <<  76     content = theQuarkContent[flavor-1];
 99   }                                            <<  77   }else {
100   else {                                       << 
101 #ifdef G4VERBOSE                                   78 #ifdef G4VERBOSE
102     if (verboseLevel > 0) {                    <<  79     if (verboseLevel >0) {
103       std::ostringstream message;              <<  80       G4cout << "Invalid Quark Flavor for G4ParticleDefinition::GetQuarkContent";
104       message << "Invalid Quark Flavor: " << f <<  81       G4cout << ": flavor=" << flavor <<G4endl;
105       G4Exception("G4ParticleDefinition::GetQu <<  82     } 
106     }                                          <<  83 #endif  
107 #endif                                         << 
108   }                                                84   }
109   return content;                              <<  85   return content;  
110 }                                                  86 }
111                                                    87 
112 inline G4int G4ParticleDefinition::GetAntiQuar <<  88 inline
                                                   >>  89  G4int G4ParticleDefinition::GetAntiQuarkContent(G4int flavor) const 
113 {                                                  90 {
114   G4int content = 0;                               91   G4int content = 0;
115   if ((flavor > 0) && (flavor <= NumberOfQuark <<  92   if ((flavor>0) && (flavor<=NumberOfQuarkFlavor)){
116     content = theAntiQuarkContent[flavor - 1]; <<  93     content = theAntiQuarkContent[flavor-1];
117   }                                            <<  94   }else {
118   else {                                       << 
119 #ifdef G4VERBOSE                                   95 #ifdef G4VERBOSE
120     if (verboseLevel > 0) {                    <<  96     if (verboseLevel >0) {
121       std::ostringstream message;              <<  97       G4cout <<"Invalid Quark Flavor for G4ParticleDefinition::GetAntiQuarkContent";
122       message << "Invalid Quark Flavor: " << f <<  98       G4cout << ": flavor=" << flavor <<G4endl;
123       G4Exception("G4ParticleDefinition::GetAn << 
124                   message);                    << 
125     }                                              99     }
126 #endif                                            100 #endif
127   }                                            << 101   }  
128   return content;                                 102   return content;
129 }                                                 103 }
130                                                   104 
131 inline void G4ParticleDefinition::SetParticleS << 105 inline 
                                                   >> 106  void G4ParticleDefinition::SetParticleSubType(const G4String& subtype)
132 {                                                 107 {
133   theParticleSubType = subtype;                   108   theParticleSubType = subtype;
134 }                                                 109 }
135                                                << 110  
136 inline void G4ParticleDefinition::SetAntiPDGEn << 111 inline 
137 {                                              << 112  void             G4ParticleDefinition::SetAntiPDGEncoding(G4int aEncoding)
138   theAntiPDGEncoding = aEncoding;              << 113 { 
                                                   >> 114   theAntiPDGEncoding = aEncoding; 
139 }                                                 115 }
140                                                   116 
141 inline G4bool G4ParticleDefinition::GetApplyCu << 117 inline 
                                                   >> 118 G4bool G4ParticleDefinition::GetApplyCutsFlag() const
142 {                                                 119 {
143   return fApplyCutsFlag;                          120   return fApplyCutsFlag;
144 }                                                 121 }
145                                                   122 
146 inline void G4ParticleDefinition::SetAtomicNum << 123 inline
                                                   >> 124  void G4ParticleDefinition::SetAtomicNumber(G4int i)
147 {                                                 125 {
148   theAtomicNumber = i;                            126   theAtomicNumber = i;
149 }                                                 127 }
150                                                   128 
151 inline G4int G4ParticleDefinition::GetAtomicNu << 129 inline
                                                   >> 130  G4int G4ParticleDefinition::GetAtomicNumber() const
152 {                                                 131 {
153   return theAtomicNumber;                         132   return theAtomicNumber;
154 }                                                 133 }
155                                                   134 
156 inline void G4ParticleDefinition::SetAtomicMas << 135 inline
                                                   >> 136  void G4ParticleDefinition::SetAtomicMass(G4int i)
157 {                                                 137 {
158   theAtomicMass = i;                              138   theAtomicMass = i;
159 }                                                 139 }
160                                                   140 
161 inline G4int G4ParticleDefinition::GetAtomicMa << 141 inline
                                                   >> 142  G4int G4ParticleDefinition::GetAtomicMass() const
162 {                                                 143 {
163   return theAtomicMass;                           144   return theAtomicMass;
164 }                                                 145 }
165                                                   146 
166 inline void G4ParticleDefinition::SetPDGMagnet << 
167 {                                              << 
168   thePDGMagneticMoment = magneticMoment;       << 
169 }                                              << 
170                                                << 
171 inline G4bool G4ParticleDefinition::IsGeneralI << 
172 {                                              << 
173   return isGeneralIon;                         << 
174 }                                              << 
175                                                << 
176 inline G4bool G4ParticleDefinition::IsMuonicAt << 
177 {                                              << 
178   return isMuonicAtom;                         << 
179 }                                              << 
180                                                << 
181 inline G4int G4ParticleDefinition::GetParticle << 
182 {                                              << 
183   return g4particleDefinitionInstanceID;       << 
184 }                                              << 
185                                                << 
186 inline G4bool G4ParticleDefinition::IsHypernuc << 
187 {                                              << 
188   return GetNumberOfLambdasInHypernucleus() >  << 
189 }                                              << 
190                                                << 
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                                                   147