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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 4.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.1 2001/10/15 09:58:31 kurasige Exp $
 29 //          M.Asai, 29 January 1996 - First im <<  25 // GEANT4 tag $Name: geant4-04-00 $
 30 // ------------------------------------------- <<  26 //
 31                                                    27 
 32 inline G4int G4ParticleDefinition::GetInstance <<  28 inline 
 33 {                                              <<  29  G4ParticleTable* G4ParticleDefinition::GetParticleTable()
 34   return g4particleDefinitionInstanceID;       <<  30 { 
                                                   >>  31   return theParticleTable; 
 35 }                                                  32 }
 36                                                    33 
 37 inline G4bool G4ParticleDefinition::GetPDGStab <<  34 inline
 38 {                                              <<  35  G4DecayTable* G4ParticleDefinition::GetDecayTable()
 39   if (IsGeneralIon()) {                        <<  36 { 
 40     return (GetIonLifeTime() < 0.);            <<  37   return theDecayTable; 
 41   }                                            << 
 42                                                << 
 43   return thePDGStable;                         << 
 44 }                                                  38 }
 45                                                    39 
 46 inline G4double G4ParticleDefinition::GetPDGLi <<  40 inline
 47 {                                              <<  41  void          G4ParticleDefinition::SetDecayTable(G4DecayTable* aDecayTable) 
 48   return thePDGLifeTime;                       <<  42 { 
                                                   >>  43   theDecayTable = aDecayTable; 
 49 }                                                  44 }
 50                                                    45 
 51 inline G4double G4ParticleDefinition::GetIonLi <<  46 inline 
                                                   >>  47  void G4ParticleDefinition::SetApplyCutsFlag(G4bool flag)
 52 {                                                  48 {
 53   //-- No longer needed to access to G4IonTabl <<  49   fApplyCutsFlag = flag;
 54   //-- Method GetIonLifeTime() itself is kept  << 
 55                                                << 
 56   return thePDGLifeTime;                       << 
 57 }                                                  50 }
 58                                                    51 
 59 inline G4ParticleTable* G4ParticleDefinition:: <<  52 inline 
                                                   >>  53  G4bool G4ParticleDefinition::GetApplyCutsFlag() const
 60 {                                                  54 {
 61   return theParticleTable;                     <<  55   return fApplyCutsFlag;
 62 }                                              << 
 63                                                << 
 64 inline G4DecayTable* G4ParticleDefinition::Get << 
 65 {                                              << 
 66   return theDecayTable;                        << 
 67 }                                                  56 }
 68                                                    57 
 69 inline void G4ParticleDefinition::SetDecayTabl <<  58 inline 
                                                   >>  59  void G4ParticleDefinition::SetVerboseLevel(G4int value)
 70 {                                                  60 {
 71   theDecayTable = aDecayTable;                 <<  61    verboseLevel = value;
 72 }                                                  62 }
 73                                                    63 
 74 inline void G4ParticleDefinition::SetVerboseLe <<  64 inline 
                                                   >>  65  G4int G4ParticleDefinition::GetVerboseLevel() const
 75 {                                                  66 {
 76   verboseLevel = value;                        <<  67    return verboseLevel;
 77 }                                                  68 }
 78                                                    69 
 79 inline G4int G4ParticleDefinition::GetVerboseL <<  70 inline
                                                   >>  71  G4ProcessManager* G4ParticleDefinition::GetProcessManager() const
 80 {                                                  72 {
 81   return verboseLevel;                         <<  73     return theProcessManager;
 82 }                                                  74 }
 83                                                    75 
 84 inline G4ProcessManager* G4ParticleDefinition: <<  76 inline
                                                   >>  77  void G4ParticleDefinition::SetProcessManager(G4ProcessManager *aProcessManager)
 85 {                                                  78 {
 86   return theProcessManagerShadow;              <<  79       theProcessManager = aProcessManager;
 87 }                                                  80 }
 88                                                    81 
 89 inline void G4ParticleDefinition::SetMasterPro <<  82 inline
 90 {                                              <<  83  G4int G4ParticleDefinition::GetQuarkContent(G4int flavor) const 
 91   theProcessManagerShadow = aNewPM;            <<  84 { 
                                                   >>  85   if ((flavor>0) && (flavor<NumberOfQuarkFlavor)){
                                                   >>  86     return theQuarkContent[flavor-1];
                                                   >>  87   }else {
                                                   >>  88     if (verboseLevel >0) {
                                                   >>  89       G4cout << "Invalid Quark Flavor for G4ParticleDefinition::GetQuarkContent";
                                                   >>  90       G4cout << ": flavor=" << flavor <<G4endl;
                                                   >>  91     }
                                                   >>  92     return 0;
                                                   >>  93   }  
 92 }                                                  94 }
 93                                                    95 
 94 inline G4int G4ParticleDefinition::GetQuarkCon <<  96 inline
 95 {                                              <<  97  G4int G4ParticleDefinition::GetAntiQuarkContent(G4int flavor) const 
 96   G4int content = 0;                           <<  98 { 
 97   if ((flavor > 0) && (flavor <= NumberOfQuark <<  99   if ((flavor>0) && (flavor<NumberOfQuarkFlavor)){
 98     content = theQuarkContent[flavor - 1];     << 100     return theAntiQuarkContent[flavor-1];
 99   }                                            << 101   }else {
100   else {                                       << 102     if (verboseLevel >0) {
101 #ifdef G4VERBOSE                               << 103       G4cout <<"Invalid Quark Flavor for G4ParticleDefinition::GetAntiQuarkContent";
102     if (verboseLevel > 0) {                    << 104       G4cout << ": flavor=" << flavor <<G4endl;
103       std::ostringstream message;              << 
104       message << "Invalid Quark Flavor: " << f << 
105       G4Exception("G4ParticleDefinition::GetQu << 
106     }                                             105     }
107 #endif                                         << 106     return 0;
108   }                                            << 107   }  
109   return content;                              << 
110 }                                              << 
111                                                << 
112 inline G4int G4ParticleDefinition::GetAntiQuar << 
113 {                                              << 
114   G4int content = 0;                           << 
115   if ((flavor > 0) && (flavor <= NumberOfQuark << 
116     content = theAntiQuarkContent[flavor - 1]; << 
117   }                                            << 
118   else {                                       << 
119 #ifdef G4VERBOSE                               << 
120     if (verboseLevel > 0) {                    << 
121       std::ostringstream message;              << 
122       message << "Invalid Quark Flavor: " << f << 
123       G4Exception("G4ParticleDefinition::GetAn << 
124                   message);                    << 
125     }                                          << 
126 #endif                                         << 
127   }                                            << 
128   return content;                              << 
129 }                                                 108 }
130                                                   109 
131 inline void G4ParticleDefinition::SetParticleS << 110 inline 
                                                   >> 111  void G4ParticleDefinition::SetParticleSubType(const G4String& subtype)
132 {                                                 112 {
133   theParticleSubType = subtype;                   113   theParticleSubType = subtype;
134 }                                                 114 }
135                                                   115 
136 inline void G4ParticleDefinition::SetAntiPDGEn << 116 inline 
137 {                                              << 117  void             G4ParticleDefinition::ResetCuts(){}
138   theAntiPDGEncoding = aEncoding;              << 
139 }                                              << 
140                                                << 
141 inline G4bool G4ParticleDefinition::GetApplyCu << 
142 {                                              << 
143   return fApplyCutsFlag;                       << 
144 }                                              << 
145                                                << 
146 inline void G4ParticleDefinition::SetAtomicNum << 
147 {                                              << 
148   theAtomicNumber = i;                         << 
149 }                                              << 
150                                                << 
151 inline G4int G4ParticleDefinition::GetAtomicNu << 
152 {                                              << 
153   return theAtomicNumber;                      << 
154 }                                              << 
155                                                << 
156 inline void G4ParticleDefinition::SetAtomicMas << 
157 {                                              << 
158   theAtomicMass = i;                           << 
159 }                                              << 
160                                                << 
161 inline G4int G4ParticleDefinition::GetAtomicMa << 
162 {                                              << 
163   return theAtomicMass;                        << 
164 }                                              << 
165                                                << 
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                                                   118 
181 inline G4int G4ParticleDefinition::GetParticle << 119 inline 
182 {                                              << 120  void             G4ParticleDefinition::SetCuts(G4double ){}
183   return g4particleDefinitionInstanceID;       << 
184 }                                              << 
185                                                   121 
186 inline G4bool G4ParticleDefinition::IsHypernuc << 122 inline 
187 {                                              << 123  void             G4ParticleDefinition::SetRangeCut(G4double, const G4Material*){}
188   return GetNumberOfLambdasInHypernucleus() >  << 
189 }                                              << 
190                                                   124 
191 inline G4int G4ParticleDefinition::GetNumberOf << 125 inline 
192 {                                              << 126  void             G4ParticleDefinition::SetRangeCutVector(G4std::vector<G4double>&){}
193   G4int numberOfLambdas = 0;                   << 127 
194   // PDG code of hypernuclei: 10LZZZAAAI       << 128 inline 
195   if (thePDGEncoding > 0 && thePDGEncoding / 1 << 129  void             G4ParticleDefinition::ReCalcCuts(){}
196     numberOfLambdas = (thePDGEncoding / 100000 << 130 
197   }                                            << 131 inline 
198   return numberOfLambdas;                      << 132  G4double*        G4ParticleDefinition::GetLengthCuts() const {return 0;}
199 }                                              << 133 
200                                                << 134 inline 
201 inline G4bool G4ParticleDefinition::IsAntiHype << 135  G4double       G4ParticleDefinition::GetRangeThreshold(const G4Material* ) const     
202 {                                              << 136 {      
203   return GetNumberOfAntiLambdasInAntiHypernucl << 137   return -1.0 * mm;   
204 }                                              << 138 }
205                                                << 139  
206 inline G4int G4ParticleDefinition::GetNumberOf << 140 inline 
207 {                                              << 141  G4double*    G4ParticleDefinition::GetEnergyCuts() const {return 0;}
208   G4int numberOfAntiLambdas = 0;               << 142 
209   // PDG code of anti-hypernuclei: -10LZZZAAAI << 143 inline 
210   if (thePDGEncoding < 0 && thePDGEncoding / 1 << 144  G4double       G4ParticleDefinition::GetEnergyThreshold(const G4Material* ) const     
211     numberOfAntiLambdas = (std::abs(thePDGEnco << 145 {      
212   }                                            << 146   return -1.0 * eV;   
213   return numberOfAntiLambdas;                  << 147 }
                                                   >> 148  
                                                   >> 149 inline 
                                                   >> 150  void             G4ParticleDefinition::SetAntiPDGEncoding(G4int aEncoding)
                                                   >> 151 { 
                                                   >> 152   theAntiPDGEncoding = aEncoding; 
214 }                                                 153 }
215                                                   154