Geant4 Cross Reference |
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 // INCL++ intra-nuclear cascade model 26 // INCL++ intra-nuclear cascade model 27 // Alain Boudard, CEA-Saclay, France << 27 // Pekka Kaitaniemi, CEA and Helsinki Institute of Physics 28 // Joseph Cugnon, University of Liege, Belgium << 28 // Davide Mancusi, CEA 29 // Jean-Christophe David, CEA-Saclay, France << 29 // Alain Boudard, CEA 30 // Pekka Kaitaniemi, CEA-Saclay, France, and H << 30 // Sylvie Leray, CEA 31 // Sylvie Leray, CEA-Saclay, France << 31 // Joseph Cugnon, University of Liege 32 // Davide Mancusi, CEA-Saclay, France << 32 // >> 33 // INCL++ revision: v5.0_rc3 33 // 34 // 34 #define INCLXX_IN_GEANT4_MODE 1 35 #define INCLXX_IN_GEANT4_MODE 1 35 36 36 #include "globals.hh" 37 #include "globals.hh" 37 38 38 #ifndef G4INCLParticleTable_hh 39 #ifndef G4INCLParticleTable_hh 39 #define G4INCLParticleTable_hh 1 40 #define G4INCLParticleTable_hh 1 40 41 41 #include <string> 42 #include <string> 42 #include <vector> << 43 // #include <cassert> << 44 43 45 #include "G4INCLParticleType.hh" 44 #include "G4INCLParticleType.hh" 46 #include "G4INCLParticleSpecies.hh" << 45 #include "G4INCLIParticleDataSource.hh" 47 #include "G4INCLLogger.hh" 46 #include "G4INCLLogger.hh" 48 #include "G4INCLConfig.hh" << 49 #include "G4INCLHFB.hh" << 50 << 51 #ifdef INCLXX_IN_GEANT4_MODE << 52 #include "G4IonTable.hh" << 53 #include "G4ParticleTable.hh" << 54 #endif << 55 #include "G4INCLGlobals.hh" << 56 #include "G4INCLNaturalIsotopicDistributions.h << 57 47 58 namespace G4INCL { 48 namespace G4INCL { 59 << 49 class ParticleTable { 60 namespace ParticleTable { << 50 public: 61 << 51 /// Initialize the particle table and use the default particle 62 const G4int maxClusterMass = 12; << 52 /// data source (PDS) 63 const G4int maxClusterCharge = 8; << 53 static void initialize(); 64 << 54 65 const G4int clusterTableZSize = maxCluster << 55 static void initialize(IParticleDataSource*); 66 const G4int clusterTableASize = maxCluster << 56 67 const G4int clusterTableSSize = 4; << 57 /** Delete the particle table */ 68 << 58 static void deletePDS() { 69 const G4double effectiveNucleonMass = 938. << 59 delete pds; 70 const G4double effectiveNucleonMass2 = 8.8 << 60 } 71 const G4double effectiveDeltaMass = 1232.0 << 61 72 const G4double effectiveDeltaWidth = 130.0 << 62 /// Get the isospin of a particle 73 const G4double effectivePionMass = 138.0; << 63 static G4int getIsospin(const ParticleType t); 74 const G4double effectiveLambdaMass = 1115. << 64 75 const G4double effectiveSigmaMass = 1197.4 << 65 /// Get the native INCL name of the particle 76 const G4double effectiveXiMass = 1321.71; << 66 static std::string getName(const ParticleType t); 77 const G4double effectiveKaonMass = 497.614 << 67 78 const G4double effectiveAntiKaonMass = 497 << 68 /// Get the native INCL name of the ion 79 const G4double effectiveEtaMass = 547.862; << 69 static std::string getName(const G4int A, const G4int Z); 80 const G4double effectiveOmegaMass = 782.65 << 70 81 const G4double effectiveEtaPrimeMass = 957 << 71 /// \brief Convert a string to particle type. 82 const G4double effectivePhotonMass = 0.0; << 72 static ParticleType getParticleType(const std::string &pS); 83 extern G4ThreadLocal G4double minDeltaMass << 73 84 extern G4ThreadLocal G4double minDeltaMass << 74 // Get the name of the particle from the particle data source 85 extern G4ThreadLocal G4double minDeltaMass << 75 // implementation (e.g. the Geant4 particle name) 86 << 76 static std::string getPDSName(const ParticleType t); 87 /// \brief Initialize the particle table << 77 static std::string getPDSName(const G4int A, const G4int Z); 88 void initialize(Config const * const theCo << 78 89 << 79 // Get particle mass (in MeV) 90 /// \brief Get the isospin of a particle << 80 static G4double getMass(const G4INCL::ParticleType t); 91 G4int getIsospin(const ParticleType t); << 81 static G4double getMass(const G4int A, const G4int Z); 92 << 93 /// \brief Get the native INCL name of the << 94 std::string getName(const ParticleType t); << 95 << 96 /// \brief Get the short INCL name of the << 97 std::string getShortName(const ParticleTyp << 98 << 99 /// \brief Get the native INCL name of the << 100 std::string getName(const ParticleSpecies << 101 << 102 /// \brief Get the short INCL name of the << 103 std::string getShortName(const ParticleSpe << 104 << 105 /// \brief Get the native INCL name of the << 106 std::string getName(const G4int A, const G << 107 << 108 /// \brief Get the native INCL name of the << 109 std::string getName(const G4int A, const G << 110 << 111 /// \brief Get the short INCL name of the << 112 std::string getShortName(const G4int A, co << 113 << 114 /// \brief Get INCL nuclear mass (in MeV/c << 115 G4double getINCLMass(const G4int A, const << 116 << 117 /// \brief Get INCL particle mass (in MeV/ << 118 G4double getINCLMass(const ParticleType t) << 119 << 120 #ifndef INCLXX_IN_GEANT4_MODE << 121 /// \brief Do we have this particle mass? << 122 G4double hasMassTable(const unsigned int A << 123 << 124 /** \brief Weizsaecker mass formula << 125 * << 126 * Return the nuclear mass, as calculated << 127 * Adapted from the Geant4 source. << 128 * << 129 * \param A the mass number << 130 * \param Z the charge number << 131 * \return the nuclear mass [MeV/c^2] << 132 */ << 133 G4double getWeizsaeckerMass(const G4int A, << 134 #endif << 135 << 136 ///\brief Get particle mass (in MeV/c^2) << 137 G4double getRealMass(const G4INCL::Particl << 138 ///\brief Get nuclear mass (in MeV/c^2) << 139 G4double getRealMass(const G4int A, const << 140 << 141 /**\brief Get Q-value (in MeV/c^2) << 142 * << 143 * Uses the getTableMass function to compu << 144 * following reaction: << 145 * \f[ (A_1,Z_1) + (A_2, Z_2) --> (A_1+A_2 << 146 */ << 147 G4double getTableQValue(const G4int A1, co << 148 << 149 /**\brief Get Q-value (in MeV/c^2) << 150 * << 151 * Uses the getTableMass function to compu << 152 * following reaction: << 153 * \f[ (A_1,Z_1) + (A_2, Z_2) --> (A_3,Z_3 << 154 */ << 155 G4double getTableQValue(const G4int A1, co << 156 << 157 G4double getTableSpeciesMass(const Particl << 158 82 159 /// \brief Get mass number from particle t 83 /// \brief Get mass number from particle type 160 G4int getMassNumber(const ParticleType t); << 84 static G4int getMassNumber(const ParticleType t) { >> 85 switch(t) { >> 86 case Proton: >> 87 case Neutron: >> 88 case DeltaPlusPlus: >> 89 case DeltaPlus: >> 90 case DeltaZero: >> 91 case DeltaMinus: >> 92 return 1; >> 93 break; >> 94 case PiPlus: >> 95 case PiMinus: >> 96 case PiZero: >> 97 return 0; >> 98 break; >> 99 default: >> 100 FATAL("Can't determine mass number for particle type " << t << std::endl); >> 101 std::abort(); >> 102 return 0; >> 103 break; >> 104 } >> 105 } 161 106 162 /// \brief Get charge number from particle 107 /// \brief Get charge number from particle type 163 G4int getChargeNumber(const ParticleType t << 108 static G4int getChargeNumber(const ParticleType t) { >> 109 switch(t) { >> 110 case DeltaPlusPlus: >> 111 return 2; >> 112 break; >> 113 case Proton: >> 114 case DeltaPlus: >> 115 case PiPlus: >> 116 return 1; >> 117 break; >> 118 case Neutron: >> 119 case DeltaZero: >> 120 case PiZero: >> 121 return 0; >> 122 break; >> 123 case DeltaMinus: >> 124 case PiMinus: >> 125 return -1; >> 126 break; >> 127 default: >> 128 FATAL("Can't determine charge number for particle type " << t << std::endl); >> 129 std::abort(); >> 130 return 0; >> 131 break; >> 132 } >> 133 } >> 134 >> 135 /// \brief Get RMS radius for clusters >> 136 static G4double getClusterRMS(const G4int A, const G4int Z); >> 137 >> 138 static G4double getNuclearRadius(const G4int A, const G4int Z); >> 139 static G4double getMaximumNuclearRadius(const G4int A, const G4int Z); >> 140 static G4double getSurfaceDiffuseness(const G4int A, const G4int Z); >> 141 >> 142 /// \brief Get the separation energy for a particle type. >> 143 static G4double getSeparationEnergy(const ParticleType t) { >> 144 if(t==Proton || t==DeltaPlusPlus || t==DeltaPlus) >> 145 return protonSeparationEnergy; >> 146 else if(t==Neutron || t==DeltaZero || t==DeltaMinus) >> 147 return neutronSeparationEnergy; >> 148 else { >> 149 ERROR("ParticleTable::getSeparationEnergy : Unknown particle type." << std::endl); >> 150 return 0.0; >> 151 } >> 152 } >> 153 >> 154 const static G4double effectiveNucleonMass; >> 155 const static G4double effectiveNucleonMass2; >> 156 const static G4double effectiveDeltaMass; >> 157 const static G4double effectivePionMass; >> 158 const static G4double effectiveDeltaDecayThreshold; >> 159 >> 160 static const G4int maxClusterMass = 12; >> 161 static const G4int maxClusterCharge = 8; >> 162 >> 163 const static G4int clusterTableZSize = ParticleTable::maxClusterCharge+1; >> 164 const static G4int clusterTableASize = ParticleTable::maxClusterMass+1; >> 165 const static G4double binding[clusterTableZSize][clusterTableASize]; >> 166 const static G4double rmsc[clusterTableZSize][clusterTableASize]; >> 167 const static G4double clusterPosFact[maxClusterMass+1]; >> 168 const static G4double clusterPosFact2[maxClusterMass+1]; >> 169 const static G4int clusterZMin[maxClusterMass+1]; // Lower limit of Z for cluster of mass A >> 170 const static G4int clusterZMax[maxClusterMass+1]; // Upper limit of Z for cluster of mass A >> 171 const static G4double clusterPhaseSpaceCut[maxClusterMass+1]; >> 172 >> 173 // Enumerator for cluster-decay channels >> 174 enum ClusterDecayType { >> 175 StableCluster, >> 176 NeutronDecay, >> 177 ProtonDecay, >> 178 AlphaDecay, >> 179 TwoProtonDecay, >> 180 TwoNeutronDecay >> 181 }; >> 182 const static ClusterDecayType clusterDecayMode[clusterTableZSize][clusterTableASize]; >> 183 >> 184 protected: >> 185 ParticleTable() {}; >> 186 ~ParticleTable() {}; >> 187 >> 188 private: >> 189 static IParticleDataSource *pds; >> 190 static G4double protonMass; >> 191 static G4double neutronMass; >> 192 static G4double piPlusMass, piMinusMass, piZeroMass; >> 193 >> 194 const static G4int mediumNucleiTableSize = 30; >> 195 const static G4double mediumDiffuseness[mediumNucleiTableSize]; >> 196 const static G4double pf[mediumNucleiTableSize]; >> 197 const static G4double mediumRadius[mediumNucleiTableSize]; >> 198 const static G4double rms[mediumNucleiTableSize]; 164 199 165 /// \brief Get strangeness number from par << 200 const static G4double neutronSeparationEnergy, protonSeparationEnergy; 166 G4int getStrangenessNumber(const ParticleT << 167 << 168 G4double getNuclearRadius(const ParticleTy << 169 G4double getLargestNuclearRadius(const G4i << 170 G4double getRadiusParameter(const Particle << 171 G4double getMaximumNuclearRadius(const Par << 172 G4double getSurfaceDiffuseness(const Parti << 173 << 174 /// \brief Return the RMS of the momentum << 175 G4double getMomentumRMS(const G4int A, con << 176 << 177 /// \brief Return INCL's default separatio << 178 G4double getSeparationEnergyINCL(const Par << 179 << 180 /// \brief Return the real separation ener << 181 G4double getSeparationEnergyReal(const Par << 182 << 183 /// \brief Return the real separation ener << 184 G4double getSeparationEnergyRealForLight(c << 185 << 186 /// \brief Getter for protonSeparationEner << 187 G4double getProtonSeparationEnergy(); << 188 << 189 /// \brief Getter for neutronSeparationEne << 190 G4double getNeutronSeparationEnergy(); << 191 << 192 /// \brief Setter for protonSeparationEner << 193 void setProtonSeparationEnergy(const G4dou << 194 << 195 /// \brief Setter for protonSeparationEner << 196 void setNeutronSeparationEnergy(const G4do << 197 << 198 /// \brief Get the name of the element fro << 199 std::string getElementName(const G4int Z); << 200 << 201 /// \brief Get the name of an unnamed elem << 202 std::string getIUPACElementName(const G4in << 203 << 204 /// \brief Get the name of the element fro << 205 G4int parseElement(std::string pS); << 206 << 207 /** \brief Parse a IUPAC element name << 208 * << 209 * Note: this function is UGLY. Look at it << 210 * << 211 * \param pS a normalised string (lowercas << 212 * \return the charge number of the nuclid << 213 */ << 214 G4int parseIUPACElement(std::string const << 215 << 216 IsotopicDistribution const &getNaturalIsot << 217 << 218 G4int drawRandomNaturalIsotope(const G4int << 219 << 220 // Typedefs and pointers for transparent h << 221 //typedef G4double (*NuclearMassFn)(const << 222 typedef G4double (*NuclearMassFn)(const G4 << 223 typedef G4double (*ParticleMassFn)(const P << 224 /// \brief Static pointer to the mass func << 225 extern G4ThreadLocal NuclearMassFn getTabl << 226 /// \brief Static pointer to the mass func << 227 extern G4ThreadLocal ParticleMassFn getTab << 228 << 229 // Typedefs and pointers for transparent h << 230 typedef G4double (*SeparationEnergyFn)(con << 231 /// \brief Static pointer to the separatio << 232 extern G4ThreadLocal SeparationEnergyFn ge << 233 << 234 // Typedefs and pointers for transparent h << 235 typedef G4double (*FermiMomentumFn)(const << 236 extern G4ThreadLocal FermiMomentumFn getFe << 237 << 238 /// \brief Return the constant value of th << 239 G4double getFermiMomentumConstant(const G4 << 240 << 241 /** \brief Return the constant value of th << 242 * << 243 * This function should always return Phys << 244 * nuclei, and values from the momentumRMS << 245 * << 246 * \param A mass number << 247 * \param Z charge number << 248 */ << 249 G4double getFermiMomentumConstantLight(con << 250 << 251 /** \brief Return the value Fermi momentum << 252 * << 253 * This function returns a fitted Fermi mo << 254 * et al., Phys. Rev. Lett. 26 (1971) 445. << 255 * \f[ << 256 * p_F(A)=\alpha-\beta\cdot e^{(-A\cdot\ga << 257 * \f] << 258 * with \f$\alpha=259.416\f$ MeV/\f$c\f$, << 259 * and \f$\gamma=9.5157\cdot10^{-2}\f$. << 260 * << 261 * \param A mass number << 262 */ << 263 G4double getFermiMomentumMassDependent(con << 264 << 265 /** \brief Get the value of the r-p correl << 266 * << 267 * \param t the type of the particle (Prot << 268 * \return the value of the r-p correlatio << 269 */ << 270 G4double getRPCorrelationCoefficient(const << 271 << 272 /// \brief Get the thickness of the neutro << 273 G4double getNeutronSkin(); << 274 << 275 /// \brief Get the size of the neutron hal << 276 G4double getNeutronHalo(); << 277 << 278 /// \brief Get the type of pion << 279 ParticleType getPionType(const G4int isosp << 280 201 281 /// \brief Get the type of nucleon << 202 }; 282 ParticleType getNucleonType(const G4int is << 283 << 284 /// \brief Get the type of delta << 285 ParticleType getDeltaType(const G4int isos << 286 << 287 /// \brief Get the type of sigma << 288 ParticleType getSigmaType(const G4int isos << 289 << 290 /// \brief Get the type of kaon << 291 ParticleType getKaonType(const G4int isosp << 292 << 293 /// \brief Get the type of antikaon << 294 ParticleType getAntiKaonType(const G4int i << 295 << 296 /// \brief Get the type of xi << 297 ParticleType getXiType(const G4int isosp); << 298 << 299 /// \brief Get the type of antinucleon << 300 ParticleType getAntiNucleonType(const G4in << 301 << 302 /// \brief Get the type of antidelta << 303 ParticleType getAntiXiType(const G4int iso << 304 << 305 /// \brief Get the type of antisigma << 306 ParticleType getAntiSigmaType(const G4int << 307 << 308 /// \brief Get particle width (in s) << 309 G4double getWidth(const ParticleType t); << 310 } << 311 } 203 } 312 204 313 #endif 205 #endif 314 << 315 206